Class DelayFuture
java.lang.Object
com.tccc.kos.commons.util.concurrent.future.FutureWork
com.tccc.kos.commons.util.concurrent.future.DelayFuture
- All Implemented Interfaces:
Abortable
,Cancelable
,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:
- 1.8
- Version:
- 2025-06-05
-
Field Summary
Fields inherited from class com.tccc.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.tccc.kos.commons.util.concurrent.future.FutureWork
abort, abort, abort, append, cancel, cancel, cancel, cancelTimeout, disableAbortAbandoned, execute, fail, fail, fail, getAbortAbandonedTimeoutMs, getClientData, getData, getEndState, getEstimatedEndTimeMono, getEstimatedTimeMs, getId, getName, getNote, getProgress, getReason, getReasonData, getRemainingTimeMs, getRootFuture, getStartTimeMono, getTracker, interruptIfPending, isAbort, isCancel, isDone, isFail, isInterruptable, isInterrupted, isRunComplete, isRunStarted, isSuccess, isTerminate, prepend, remove, run, setAbortAbandonedTimeoutMs, setData, setEstimatedTimeMs, setInterruptable, setNote, setParent, setProgress, setRemainingTimeMs, setRunnable, setState, setState, setTimeout, setTimeout, setTimeout, success, toString, waitUntilFinished, whenFinished
-
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
-