net.spy.concurrent
Class ScheduledExecutorCompletionService<V>

java.lang.Object
  extended by net.spy.concurrent.RetryableExecutorCompletionService<V>
      extended by 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


Constructor Summary
ScheduledExecutorCompletionService(java.util.concurrent.ScheduledExecutorService ex)
           
 
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 net.spy.concurrent.RetryableExecutorCompletionService
poll, poll, submit, submit, take
 
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
 

Constructor Detail

ScheduledExecutorCompletionService

public ScheduledExecutorCompletionService(java.util.concurrent.ScheduledExecutorService ex)
Method Detail

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 callable
d - how long to wait
unit - 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 runnable
d - 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.