Example usage for Java io.netty.util.concurrent Promise fields, constructors, methods, implement or subclass
The text is from its open source code.
Promise | addListener(GenericFutureListener extends Future super V>> listener) |
Promise | await() |
boolean | await(long timeoutMillis) Waits for this future to be completed within the specified time limit. |
boolean | cancel(boolean mayInterruptIfRunning) If the cancellation was successful it will fail the future with a CancellationException . |
Throwable | cause() Returns the cause of the failed I/O operation if the I/O operation has failed. |
V | getNow() Return the result without blocking. |
boolean | isSuccess() Returns true if and only if the I/O operation was completed successfully. |
Promise | setFailure(Throwable cause) Marks this future as a failure and notifies all listeners. |
Promise | setSuccess(V result) Marks this future as a success and notifies all listeners. |
boolean | setUncancellable() Make this future impossible to cancel. |
Promise | syncUninterruptibly() |
boolean | tryFailure(Throwable cause) Marks this future as a failure and notifies all listeners. |
boolean | trySuccess(V result) Marks this future as a success and notifies all listeners. |