org.richfaces.cdk.concurrent
Class CountingExecutorCompletionService<T>

java.lang.Object
  extended by java.util.concurrent.ExecutorCompletionService<T>
      extended by org.richfaces.cdk.concurrent.CountingExecutorCompletionService<T>
All Implemented Interfaces:
CompletionService<T>

public class CountingExecutorCompletionService<T>
extends ExecutorCompletionService<T>

Author:
Nick Belaevski

Constructor Summary
CountingExecutorCompletionService(Executor executor)
           
CountingExecutorCompletionService(Executor executor, BlockingQueue<Future<T>> completionQueue)
           
 
Method Summary
 Future<T> submit(Callable<T> task)
           
 Future<T> submit(Runnable task, T result)
           
 Future<T> take()
           
 
Methods inherited from class java.util.concurrent.ExecutorCompletionService
poll, poll
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CountingExecutorCompletionService

public CountingExecutorCompletionService(Executor executor)

CountingExecutorCompletionService

public CountingExecutorCompletionService(Executor executor,
                                         BlockingQueue<Future<T>> completionQueue)
Method Detail

submit

public Future<T> submit(Callable<T> task)
Specified by:
submit in interface CompletionService<T>
Overrides:
submit in class ExecutorCompletionService<T>

submit

public Future<T> submit(Runnable task,
                        T result)
Specified by:
submit in interface CompletionService<T>
Overrides:
submit in class ExecutorCompletionService<T>

take

public Future<T> take()
               throws InterruptedException
Specified by:
take in interface CompletionService<T>
Overrides:
take in class ExecutorCompletionService<T>
Throws:
InterruptedException


Copyright © 2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.