类 SettableFutureTask<V>
java.lang.Object
cn.taketoday.util.concurrent.AbstractFuture<V>
cn.taketoday.util.concurrent.DefaultFuture<V>
cn.taketoday.util.concurrent.SettableFutureTask<V>
- 所有已实现的接口:
ListenableFuture<V>,SettableFuture<V>,Runnable,Future<V>,RunnableFuture<V>
- 直接已知子类:
ListenableFutureTask
-
嵌套类概要
嵌套类修饰符和类型类说明private static final classprivate static class -
字段概要
字段修饰符和类型字段说明private static final Runnableprivate static final Runnableprivate static final Runnableprivate Object从类继承的字段 cn.taketoday.util.concurrent.DefaultFuture
defaultExecutor -
构造器概要
构造器构造器说明SettableFutureTask(Executor executor, Runnable runnable, V result) SettableFutureTask(Executor executor, Callable<V> callable) -
方法概要
修饰符和类型方法说明booleancancel(boolean mayInterruptIfRunning) If the cancellation was successful it will fail the future with aCancellationException.private booleanclearTaskAfterCompletion(boolean done, Runnable result) final booleanfinal inthashCode()voidrun()(专用程序包) VrunTask()final SettableFuture<V>setFailure(Throwable cause) Marks this future as a failure and notifies all listeners.protected final SettableFuture<V>setFailureInternal(Throwable cause) final SettableFuture<V>setSuccess(V result) Marks this future as a success and notifies all listeners.protected final SettableFuture<V>setSuccessInternal(V result) final booleanMake this future impossible to cancel.protected final booleanprotected StringBuilderfinal booleantryFailure(Throwable cause) Marks this future as a failure and notifies all listeners.final booleantrySuccess(V result) Marks this future as a success and notifies all listeners.从类继承的方法 cn.taketoday.util.concurrent.DefaultFuture
addListener, addListeners, await, await, await, awaitUninterruptibly, awaitUninterruptibly, awaitUninterruptibly, get, get, getCause, getNow, interruptTask, isCancellable, isCancelled, isDone, isSuccess, notifyListener, notifyProgressiveListeners, removeListener, removeListeners, sync, syncUninterruptibly, toString从类继承的方法 cn.taketoday.util.concurrent.AbstractFuture
obtain从接口继承的方法 java.util.concurrent.Future
get, get, isCancelled, isDone从接口继承的方法 cn.taketoday.util.concurrent.ListenableFuture
completable, obtain从接口继承的方法 cn.taketoday.util.concurrent.SettableFuture
addListener, onFailure, onSuccess
-
字段详细资料
-
COMPLETED
-
CANCELLED
-
FAILED
-
task
-
-
构造器详细资料
-
SettableFutureTask
-
SettableFutureTask
-
-
方法详细资料
-
hashCode
public final int hashCode() -
equals
-
runTask
- 抛出:
Throwable
-
run
public void run()- 指定者:
run在接口中Runnable- 指定者:
run在接口中RunnableFuture<V>
-
clearTaskAfterCompletion
-
setFailure
从接口复制的说明:SettableFutureMarks this future as a failure and notifies all listeners. If it is success or failed already it will throw anIllegalStateException.- 指定者:
setFailure在接口中SettableFuture<V>- 覆盖:
setFailure在类中DefaultFuture<V>
-
setFailureInternal
-
tryFailure
从接口复制的说明:SettableFutureMarks this future as a failure and notifies all listeners.- 指定者:
tryFailure在接口中SettableFuture<V>- 覆盖:
tryFailure在类中DefaultFuture<V>- 返回:
trueif and only if successfully marked this future as a failure. Otherwisefalsebecause this future is already marked as either a success or a failure.
-
setSuccess
从接口复制的说明:SettableFutureMarks this future as a success and notifies all listeners. If it is success or failed already it will throw anIllegalStateException.- 指定者:
setSuccess在接口中SettableFuture<V>- 覆盖:
setSuccess在类中DefaultFuture<V>
-
setSuccessInternal
-
trySuccess
从接口复制的说明:SettableFutureMarks this future as a success and notifies all listeners.- 指定者:
trySuccess在接口中SettableFuture<V>- 覆盖:
trySuccess在类中DefaultFuture<V>- 返回:
trueif and only if successfully marked this future as a success. Otherwisefalsebecause this future is already marked as either a success or a failure.
-
setUncancellable
public final boolean setUncancellable()从接口复制的说明:SettableFutureMake this future impossible to cancel.- 指定者:
setUncancellable在接口中SettableFuture<V>- 覆盖:
setUncancellable在类中DefaultFuture<V>- 返回:
trueif and only if successfully marked this future as uncancellable or it is already done without being cancelled.falseif this future has been cancelled already.
-
setUncancellableInternal
protected final boolean setUncancellableInternal() -
cancel
public boolean cancel(boolean mayInterruptIfRunning) 从类复制的说明:DefaultFutureIf the cancellation was successful it will fail the future with aCancellationException.- 指定者:
cancel在接口中Future<V>- 指定者:
cancel在接口中ListenableFuture<V>- 覆盖:
cancel在类中DefaultFuture<V>- 参数:
mayInterruptIfRunning- this value has no effect in this implementation.
-
toStringBuilder
- 覆盖:
toStringBuilder在类中DefaultFuture<V>
-