-
- All Known Subinterfaces:
EventExecutor,OrderedEventExecutor
- All Known Implementing Classes:
AbstractEventExecutor,AbstractScheduledEventExecutor,GlobalEventExecutor,ImmediateEventExecutor,SingleThreadEventExecutor,UnorderedThreadPoolEventExecutor
public interface FuturePromiseFactory
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default <V> Future<V>newFailedFuture(Throwable cause)Create a newFuturewhich is marked as failed already.<V> Promise<V>newPromise()Return a newPromise.default Future<Void>newSucceededFuture()Create a newFuturewhich is marked as succeeded already.default <V> Future<V>newSucceededFuture(V result)Create a newFuturewhich is marked as succeeded already.
-
-
-
Method Detail
-
newSucceededFuture
default <V> Future<V> newSucceededFuture(V result)
Create a newFuturewhich is marked as succeeded already. SoAsynchronousResult.isSuccess()will returntrue. AllFutureListeneradded to it will be notified directly. Also every call of blocking methods will just return without blocking.
-
newSucceededFuture
default Future<Void> newSucceededFuture()
Create a newFuturewhich is marked as succeeded already. SoAsynchronousResult.isSuccess()will returntrue. AllFutureListeneradded to it will be notified directly. Also every call of blocking methods will just return without blocking.
-
newFailedFuture
default <V> Future<V> newFailedFuture(Throwable cause)
Create a newFuturewhich is marked as failed already. SoAsynchronousResult.isSuccess()will returnfalse. AllFutureListeneradded to it will be notified directly. Also every call of blocking methods will just return without blocking.
-
-