net.spy.concurrent
Interface ScheduledCompletionService<V>

All Superinterfaces:
CompletionService<V>
All Known Implementing Classes:
ScheduledExecutorCompletionService

public interface ScheduledCompletionService<V>
extends CompletionService<V>

Extended completion service allowing future tasks to also be tracked.


Method Summary
 Future<V> schedule(Callable<V> c, long delay, TimeUnit unit)
          Schedule a callable to be run in the future.
 Future<?> schedule(Runnable r, long delay, TimeUnit unit)
          Schedule a runnable to be run in the future.
 
Methods inherited from interface java.util.concurrent.CompletionService
poll, poll, submit, submit, take
 

Method Detail

schedule

Future<V> schedule(Callable<V> c,
                   long delay,
                   TimeUnit unit)
Schedule a callable to be run in the future.

Parameters:
c - the callable
delay - how long to wait
unit - time unit for the delay
Returns:
the future to track the result

schedule

Future<?> schedule(Runnable r,
                   long delay,
                   TimeUnit unit)
Schedule a runnable to be run in the future.

Parameters:
r - the runnable
delay - how long to wait
unit - time unit for the delay
Returns:
the future to track the result


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