net.spy.concurrent
Class ScheduledExecutorCompletionService<V>
java.lang.Object
net.spy.concurrent.RetryableExecutorCompletionService<V>
net.spy.concurrent.ScheduledExecutorCompletionService<V>
- Type Parameters:
V -
- All Implemented Interfaces:
- java.util.concurrent.CompletionService<V>, ScheduledCompletionService<V>
public class ScheduledExecutorCompletionService<V>
- extends RetryableExecutorCompletionService<V>
- implements ScheduledCompletionService<V>
Completion service that allows completion tracking on scheduled items as
well as
|
Method Summary |
java.util.concurrent.Future<V> |
schedule(java.util.concurrent.Callable<V> c,
long d,
java.util.concurrent.TimeUnit unit)
Schedule a callable to be run in the future. |
java.util.concurrent.Future<?> |
schedule(java.lang.Runnable r,
long d,
java.util.concurrent.TimeUnit unit)
Schedule a runnable to be run in the future. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.util.concurrent.CompletionService |
poll, poll, submit, submit, take |
ScheduledExecutorCompletionService
public ScheduledExecutorCompletionService(java.util.concurrent.ScheduledExecutorService ex)
schedule
public java.util.concurrent.Future<V> schedule(java.util.concurrent.Callable<V> c,
long d,
java.util.concurrent.TimeUnit unit)
- Description copied from interface:
ScheduledCompletionService
- Schedule a callable to be run in the future.
- Specified by:
schedule in interface ScheduledCompletionService<V>
- Parameters:
c - the callabled - how long to waitunit - time unit for the delay
- Returns:
- the future to track the result
schedule
public java.util.concurrent.Future<?> schedule(java.lang.Runnable r,
long d,
java.util.concurrent.TimeUnit unit)
- Description copied from interface:
ScheduledCompletionService
- Schedule a runnable to be run in the future.
- Specified by:
schedule in interface ScheduledCompletionService<V>
- Parameters:
r - the runnabled - how long to waitunit - time unit for the delay
- Returns:
- the future to track the result
Copyright © 1995-2007 SPY Internetworking. All Rights Reserved.