net.spy.concurrent
Class RetryableExecutorCompletionService<V>
java.lang.Object
net.spy.concurrent.RetryableExecutorCompletionService<V>
- Type Parameters:
V -
- All Implemented Interfaces:
- java.util.concurrent.CompletionService<V>
- Direct Known Subclasses:
- ScheduledExecutorCompletionService
public class RetryableExecutorCompletionService<V>
- extends java.lang.Object
- implements java.util.concurrent.CompletionService<V>
CompletionService that honors RetryableCallable instances.
|
Method Summary |
java.util.concurrent.Future<V> |
poll()
|
java.util.concurrent.Future<V> |
poll(long timeout,
java.util.concurrent.TimeUnit unit)
|
java.util.concurrent.Future<V> |
submit(java.util.concurrent.Callable<V> c)
|
java.util.concurrent.Future<V> |
submit(java.lang.Runnable task,
V result)
|
java.util.concurrent.Future<V> |
take()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RetryableExecutorCompletionService
public RetryableExecutorCompletionService(java.util.concurrent.ExecutorService e)
poll
public java.util.concurrent.Future<V> poll()
- Specified by:
poll in interface java.util.concurrent.CompletionService<V>
poll
public java.util.concurrent.Future<V> poll(long timeout,
java.util.concurrent.TimeUnit unit)
throws java.lang.InterruptedException
- Specified by:
poll in interface java.util.concurrent.CompletionService<V>
- Throws:
java.lang.InterruptedException
submit
public java.util.concurrent.Future<V> submit(java.util.concurrent.Callable<V> c)
- Specified by:
submit in interface java.util.concurrent.CompletionService<V>
submit
public java.util.concurrent.Future<V> submit(java.lang.Runnable task,
V result)
- Specified by:
submit in interface java.util.concurrent.CompletionService<V>
take
public java.util.concurrent.Future<V> take()
throws java.lang.InterruptedException
- Specified by:
take in interface java.util.concurrent.CompletionService<V>
- Throws:
java.lang.InterruptedException
Copyright © 1995-2007 SPY Internetworking. All Rights Reserved.