March 2005
Beginner to intermediate
1254 pages
104h 21m
English
Delayed
An object
that implements this interface has an associated delay. Typically, it
is some kind of task, such as a Callable, that has
been scheduled to execute at some future time. getDelay(
) returns the remaining time, measured in the specified
TimeUnit. If no time remains, getDelay(
) should return zero or a negative value. See
ScheduledFuture and DelayQueue.
Figure 16-80. java.util.concurrent.Delayed
public interface Delayed extends Comparable<Delayed> { // Public Instance Methods long getDelay(TimeUnit unit); }
ScheduledFuture
DelayQueue.{add( ), offer( ),
put( )}
DelayQueue.{peek( ), poll( ),
take( )}
Read now
Unlock full access