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:
java.util.concurrent.CompletionService<T>

public class CountingExecutorCompletionService<T>
extends java.util.concurrent.ExecutorCompletionService<T>

Author:
Nick Belaevski

Constructor Summary
CountingExecutorCompletionService(java.util.concurrent.Executor executor)
           
CountingExecutorCompletionService(java.util.concurrent.Executor executor, java.util.concurrent.BlockingQueue<java.util.concurrent.Future<T>> completionQueue)
           
 
Method Summary
 java.util.concurrent.Future<T> submit(java.util.concurrent.Callable<T> task)
           
 java.util.concurrent.Future<T> submit(java.lang.Runnable task, T result)
           
 java.util.concurrent.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(java.util.concurrent.Executor executor)

CountingExecutorCompletionService

public CountingExecutorCompletionService(java.util.concurrent.Executor executor,
                                         java.util.concurrent.BlockingQueue<java.util.concurrent.Future<T>> completionQueue)
Method Detail

submit

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

submit

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

take

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


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