Top Description Methods
io.netty5.util.concurrent

public Interface FuturePromiseFactory

Known Direct Subinterfaces
io.netty5.util.concurrent.EventExecutor

Provides a way to create Future and Promise instances.

Method Summary

Modifier and TypeMethod and Description
public default <V> Future<V>
newFailedFuture(Throwable cause)

Create a new Future which is marked as failed already.

public <V> Promise<V>
newPromise()

Return a new Promise.

public default <V> Future<V>
newSucceededFuture(V result)

Create a new Future which is marked as succeeded already.

public default Future<Void>
newSucceededFuture()

Create a new Future which is marked as succeeded already.

Method Detail

newFailedFutureback to summary
public default <V> Future<V> newFailedFuture(Throwable cause)

Create a new Future which is marked as failed already. So Future#isSuccess() will return false. All FutureListener added to it will be notified directly. Also every call of blocking methods will just return without blocking.

newPromiseback to summary
public <V> Promise<V> newPromise()

Return a new Promise.

newSucceededFutureback to summary
public default <V> Future<V> newSucceededFuture(V result)

Create a new Future which is marked as succeeded already. So Future#isSuccess() will return true. All FutureListener added to it will be notified directly. Also every call of blocking methods will just return without blocking.

newSucceededFutureback to summary
public default Future<Void> newSucceededFuture()

Create a new Future which is marked as succeeded already. So Future#isSuccess() will return true. All FutureListener added to it will be notified directly. Also every call of blocking methods will just return without blocking.