Class DelayFuture
java.lang.Object
com.kosdev.kos.commons.util.concurrent.future.FutureWork
com.kosdev.kos.commons.util.concurrent.future.DelayFuture
- All Implemented Interfaces:
Abortable,AttributeAware,Cancelable,ClientAttributeAware,Terminable,Runnable
A future that simply delays for the specified duration but is
interruptable. This is simply a convenience class for inserting
delays into future sequences.
- Since:
- 8
- Version:
- 8
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.kosdev.kos.commons.util.ClientAttributeAware
ClientAttributeAware.Hidden -
Field Summary
Fields inherited from class com.kosdev.kos.commons.util.concurrent.future.FutureWork
REASON_errStartCallbackFailed, REASON_errTimedOut -
Constructor Summary
ConstructorsConstructorDescriptionDelayFuture(String name, int delay) Creates a future that will delay for the specified duration and then end successfully. -
Method Summary
Methods inherited from class com.kosdev.kos.commons.util.concurrent.future.FutureWork
_getClientAttributeMap, abort, abort, abort, append, cancel, cancel, cancel, cancelTimeout, disableAbortAbandoned, execute, extend, fail, fail, fail, getAbortAbandonedTimeoutMs, getAttribute, getClientData, getData, getEndState, getEstimatedEndTimeMono, getEstimatedTimeMs, getId, getName, getNote, getProgress, getReason, getReasonData, getRemainingTimeMs, getRootFuture, getStartTimeMono, getTracker, interruptableSleep, interruptIfPending, isAbort, isCancel, isDone, isEndState, isFail, isInterruptable, isInterrupted, isRunComplete, isRunStarted, isSuccess, isTerminate, prepend, remove, removeAttribute, run, setAbortAbandonedTimeoutMs, setAttribute, setClientData, setData, setEstimatedTimeMs, setInterruptable, setNote, setParent, setProgress, setRemainingTimeMs, setRunnable, setTimeout, setTimeout, setTimeout, sleep, success, successAfterDelay, toString, waitUntilFinished, whenFinishedMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.kosdev.kos.commons.util.ClientAttributeAware
getClientAttribute, getClientAttributes, removeClientAttribute, setClientAttribute, setHiddenClientAttribute
-
Constructor Details
-
DelayFuture
Creates a future that will delay for the specified duration and then end successfully.- Parameters:
name- the name of this future (for diagnostics)delay- the delay duration in ms- Since:
- 8
-