net.spy.concurrent
Interface ScheduledCompletionService<V>

All Superinterfaces:
java.util.concurrent.CompletionService<V>
All Known Implementing Classes:
ScheduledExecutorCompletionService

public interface ScheduledCompletionService<V>
extends java.util.concurrent.CompletionService<V>

Extended completion service allowing future tasks to also be tracked.


Method Summary
 java.util.concurrent.Future<V> schedule(java.util.concurrent.Callable<V> c, long delay, java.util.concurrent.TimeUnit unit)
          Schedule a callable to be run in the future.
 java.util.concurrent.Future<?> schedule(java.lang.Runnable r, long delay, java.util.concurrent.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

java.util.concurrent.Future<V> schedule(java.util.concurrent.Callable<V> c,
                                        long delay,
                                        java.util.concurrent.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

java.util.concurrent.Future<?> schedule(java.lang.Runnable r,
                                        long delay,
                                        java.util.concurrent.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.