public interface DelayedEvent
Modifier and Type | Method and Description |
---|---|
void |
cancel()
Cancels this delayed event.
|
java.lang.Runnable |
getCall()
Returns the actual Runnable to be executed when this event runs.
|
long |
getTime()
Returns the time when this event will execute.
|
void cancel()
Note that cancelling a delayed event is *not* guaranteed to remove the event from the queue. But it is guaranteed to clear the reference to the Runnable associated with the event. The method may be called multiple times with no ill effect.
Cancelling an event while it is executing will not prevent it from executing.
This metod is thread-safe.
java.lang.Runnable getCall()
This will value will be null if this event has been cancelled.
long getTime()