r1757 - trunk/maven-i18n-plugin/src/main/java/org/nuiton/i18n/plugin/parser
Author: tchemit Date: 2010-04-28 12:39:33 +0200 (Wed, 28 Apr 2010) New Revision: 1757 Log: update license header + remove redundant svn keywords Modified: trunk/maven-i18n-plugin/src/main/java/org/nuiton/i18n/plugin/parser/ParserExecutor.java Modified: trunk/maven-i18n-plugin/src/main/java/org/nuiton/i18n/plugin/parser/ParserExecutor.java =================================================================== --- trunk/maven-i18n-plugin/src/main/java/org/nuiton/i18n/plugin/parser/ParserExecutor.java 2010-04-28 07:46:33 UTC (rev 1756) +++ trunk/maven-i18n-plugin/src/main/java/org/nuiton/i18n/plugin/parser/ParserExecutor.java 2010-04-28 10:39:33 UTC (rev 1757) @@ -1,19 +1,27 @@ -/* *##% - * Copyright (c) 2010 poussin. All rights reserved. +/* + * #%L + * I18n :: Maven Plugin * + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2010 poussin. All rights reserved. + * %% * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * GNU General Lesser Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - *##%*/ + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/lgpl-3.0.html>. + * #L% + */ package org.nuiton.i18n.plugin.parser; @@ -32,10 +40,7 @@ /** * * @author poussin - * @version $Revision$ - * - * Last update: $Date$ - * by : $Author$ + * @since 1.2.2 */ public class ParserExecutor extends ThreadPoolExecutor implements I18nParserConfiguration { @@ -55,14 +60,12 @@ /** number of files registred to consume */ protected int nbFiles; - /** permit to stop thread and executor */ - public ParserExecutor(I18nParserConfiguration configuration) { super(8, 10, 1L, TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>()); this.configuration = configuration; touchedFiles = new ArrayList<File>(); treatedFiles = new ArrayList<File>(); - } + } @Override protected void afterExecute(Runnable r, Throwable t) { @@ -104,8 +107,6 @@ return touchedFiles; } - - /** clean internal state after usage of the thread. */ public void clear() { treatedFiles.clear(); @@ -139,6 +140,8 @@ * <p/> * <b>Note:</b> The method does not return until all files are not * consumed. + * @throws InterruptedException if something wrong while waiting end of + * executor */ public void terminatesAndWaits() throws InterruptedException { // ask executor to terminate @@ -155,7 +158,6 @@ } } - try { // wait until all submited jobs are terminated // i don't want timeout, i think 2 days is good :)
participants (1)
-
tchemit@users.nuiton.org