Class ExecutableFuture<R,S,T extends ExecutableTask<R,S>>
java.lang.Object
de.linusdev.lutils.async.AbstractFuture<R,S,T>
de.linusdev.lutils.async.executable.ExecutableFuture<R,S,T>
- All Implemented Interfaces:
Future<R,,S> HasAsyncManager
- Direct Known Subclasses:
ConditionedFuture,QueueableFuture
public class ExecutableFuture<R,S,T extends ExecutableTask<R,S>>
extends AbstractFuture<R,S,T>
implements HasAsyncManager
-
Field Summary
Fields inherited from class de.linusdev.lutils.async.AbstractFuture
asyncManager, before, canceled, done, lock, result, started, task, then -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@Nullable ComputationResult<R,S> booleanChecks if thisFuturecan execute now.Methods inherited from class de.linusdev.lutils.async.AbstractFuture
beforeExecution, cancel, get, getAsyncManager, getTask, hasStarted, isCanceled, isDone, thenMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.linusdev.lutils.async.manager.HasAsyncManager
getAsyncManager
-
Constructor Details
-
ExecutableFuture
-
-
Method Details
-
isExecutable
public boolean isExecutable()Checks if thisFuturecan execute now.- Returns:
trueif this future can be executed
-
executeHere
Executes theFutureif it has not beencanceledand is notdoneorAbstractFuture.started.
isExecutable()will be ignored by this implementation- Returns:
resultornullif this future wascanceled.- Throws:
InterruptedException
-