Top Description Fields Constructors Methods
io.netty.util.concurrent

public final Class SucceededFuture<V>

extends CompleteFuture<V>
Class Inheritance

The CompleteFuture which is succeeded already. It is recommended to use EventExecutor#newSucceededFuture(Object) instead of calling the constructor of this future.

Field Summary

Modifier and TypeField and Description
private final V

Constructor Summary

AccessConstructor and Description
public
SucceededFuture(EventExecutor
the EventExecutor associated with this future
executor
,
V result)

Creates a new instance.

Method Summary

Modifier and TypeMethod and Description
public Throwable
cause()

Implements io.netty.util.concurrent.Future.cause.

Returns the cause of the failed I/O operation if the I/O operation has failed.
public V
getNow()

Implements io.netty.util.concurrent.Future.getNow.

Return the result without blocking.
public boolean
isSuccess()

Implements io.netty.util.concurrent.Future.isSuccess.

Returns true if and only if the I/O operation was completed successfully.
Inherited from io.netty.util.concurrent.CompleteFuture:
addListeneraddListenersawaitawaitawaitawaitUninterruptiblyawaitUninterruptiblyawaitUninterruptiblycancelexecutorisCancellableisCancelledisDoneremoveListenerremoveListenerssyncsyncUninterruptibly

Field Detail

resultback to summary
private final V result

Constructor Detail

SucceededFutureback to summary
public SucceededFuture(EventExecutor executor, V result)

Creates a new instance.

Parameters
executor:EventExecutor

the EventExecutor associated with this future

Method Detail

causeback to summary
public Throwable cause()

Implements io.netty.util.concurrent.Future.cause.

Doc from io.netty.util.concurrent.Future.cause.

Returns the cause of the failed I/O operation if the I/O operation has failed.

Returns:Throwable

the cause of the failure. null if succeeded or this future is not completed yet.

Annotations
@Override
getNowback to summary
public V getNow()

Implements io.netty.util.concurrent.Future.getNow.

Doc from io.netty.util.concurrent.Future.getNow.

Return the result without blocking. If the future is not done yet this will return null. As it is possible that a null value is used to mark the future as successful you also need to check if the future is really done with isDone() and not rely on the returned null value.

Annotations
@Override
isSuccessback to summary
public boolean isSuccess()

Implements io.netty.util.concurrent.Future.isSuccess.

Doc from io.netty.util.concurrent.Future.isSuccess.

Returns true if and only if the I/O operation was completed successfully.

Annotations
@Override