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.-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class CompleteFuture
addListener, addListeners, await, await, await, awaitUninterruptibly, awaitUninterruptibly, awaitUninterruptibly, cancel, executor, isCancellable, isCancelled, isDone, removeListener, removeListeners, sync, syncUninterruptiblyMethods inherited from class AbstractFuture
get, get
-
Constructor Details
-
SucceededFuture
Creates a new instance.- Parameters:
executor- theEventExecutorassociated with this future
-
-
Method Details
-
cause
-
isSuccess
public boolean isSuccess()Description copied from interface:FutureReturnstrueif and only if the I/O operation was completed successfully. -
getNow
Description copied from interface:FutureReturn the result without blocking. If the future is not done yet this will returnnull.As it is possible that a
nullvalue 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 returnednullvalue.
-