net.spy.concurrent
Class RetryableExecutorCompletionService<V>

java.lang.Object
  extended by net.spy.concurrent.RetryableExecutorCompletionService<V>
Type Parameters:
V -
All Implemented Interfaces:
CompletionService<V>
Direct Known Subclasses:
ScheduledExecutorCompletionService

public class RetryableExecutorCompletionService<V>
extends Object
implements CompletionService<V>

CompletionService that honors RetryableCallable instances.


Constructor Summary
RetryableExecutorCompletionService(ExecutorService e)
           
 
Method Summary
 Future<V> poll()
           
 Future<V> poll(long timeout, TimeUnit unit)
           
 Future<V> submit(Callable<V> c)
           
 Future<V> submit(Runnable task, V result)
           
 Future<V> take()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RetryableExecutorCompletionService

public RetryableExecutorCompletionService(ExecutorService e)
Method Detail

poll

public Future<V> poll()
Specified by:
poll in interface CompletionService<V>

poll

public Future<V> poll(long timeout,
                      TimeUnit unit)
               throws InterruptedException
Specified by:
poll in interface CompletionService<V>
Throws:
InterruptedException

submit

public Future<V> submit(Callable<V> c)
Specified by:
submit in interface CompletionService<V>

submit

public Future<V> submit(Runnable task,
                        V result)
Specified by:
submit in interface CompletionService<V>

take

public Future<V> take()
               throws InterruptedException
Specified by:
take in interface CompletionService<V>
Throws:
InterruptedException


Copyright © 1995-2007 SPY Internetworking. All Rights Reserved.