Package io.netty.util.concurrent
Class SucceededFuture<V>
java.lang.Object
io.netty.util.concurrent.AbstractFuture<V>
io.netty.util.concurrent.CompleteFuture<V>
io.netty.util.concurrent.SucceededFuture<V>
The
CompleteFuture
which is succeeded already. It is
recommended to use EventExecutor.newSucceededFuture(Object)
instead of
calling the constructor of this future.-
Nested Class Summary
Nested classes/interfaces inherited from interface java.util.concurrent.Future
Future.State
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class io.netty.util.concurrent.CompleteFuture
addListener, addListeners, await, await, await, awaitUninterruptibly, awaitUninterruptibly, awaitUninterruptibly, cancel, executor, isCancellable, isCancelled, isDone, removeListener, removeListeners, sync, syncUninterruptibly
Methods inherited from class io.netty.util.concurrent.AbstractFuture
get, get
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.concurrent.Future
exceptionNow, resultNow, state
-
Field Details
-
result
-
-
Constructor Details
-
SucceededFuture
Creates a new instance.- Parameters:
executor
- theEventExecutor
associated with this future
-
-
Method Details
-
cause
Description copied from interface:Future
Returns the cause of the failed I/O operation if the I/O operation has failed.- Returns:
- the cause of the failure.
null
if succeeded or this future is not completed yet.
-
isSuccess
public boolean isSuccess()Description copied from interface:Future
Returnstrue
if and only if the I/O operation was completed successfully. -
getNow
Description copied from interface:Future
Return the result without blocking. If the future is not done yet this will returnnull
. As it is possible that anull
value is used to mark the future as successful you also need to check if the future is really done withFuture.isDone()
and not rely on the returnednull
value.
-