Author: siren
Date: Sat Nov 11 07:24:44 2006
New Revision: 473725

URL: http://svn.apache.org/viewvc?view=rev&rev=473725
Log:
NUTCH-399 Change CommandRunner to use concurrent api from jdk

Removed:
    lucene/nutch/trunk/lib/concurrent-1.3.4.LICENSE.txt
    lucene/nutch/trunk/lib/concurrent-1.3.4.jar
Modified:
    lucene/nutch/trunk/src/java/org/apache/nutch/util/CommandRunner.java

Modified: lucene/nutch/trunk/src/java/org/apache/nutch/util/CommandRunner.java
URL: 
http://svn.apache.org/viewvc/lucene/nutch/trunk/src/java/org/apache/nutch/util/CommandRunner.java?view=diff&rev=473725&r1=473724&r2=473725
==============================================================================
--- lucene/nutch/trunk/src/java/org/apache/nutch/util/CommandRunner.java 
(original)
+++ lucene/nutch/trunk/src/java/org/apache/nutch/util/CommandRunner.java Sat 
Nov 11 07:24:44 2006
@@ -33,10 +33,10 @@
 import java.io.InputStream;
 import java.io.OutputStream;
 import java.io.InterruptedIOException;
-
-import EDU.oswego.cs.dl.util.concurrent.BrokenBarrierException;
-import EDU.oswego.cs.dl.util.concurrent.CyclicBarrier;
-import EDU.oswego.cs.dl.util.concurrent.TimeoutException;
+import java.util.concurrent.BrokenBarrierException;
+import java.util.concurrent.CyclicBarrier;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.TimeoutException;
 
 public class CommandRunner {
 
@@ -116,9 +116,9 @@
     //
     try {
       if (_timeout == 0) {
-        _barrier.barrier(); // JDK 1.5: // _barrier.await();
+        _barrier.await();
       } else {
-        _barrier.attemptBarrier(_timeout * 1000); // JDK 1.5: //  
_barrier.await(_timeout, TimeUnit.SECONDS);
+        _barrier.await(_timeout, TimeUnit.SECONDS);
       }
     } catch (TimeoutException ex) {
       _timedout = true;
@@ -217,7 +217,7 @@
         }
       }
       try {
-         _barrier.barrier();
+         _barrier.await();
        } catch (InterruptedException ie) {
          /* IGNORE */
        } catch (BrokenBarrierException bbe) {


Reply via email to