final class VoidChannelGroupFuture extends java.lang.Object implements ChannelGroupFuture
| Modifier and Type | Field and Description |
|---|---|
private static java.util.Iterator<ChannelFuture> |
EMPTY |
private ChannelGroup |
group |
| Constructor and Description |
|---|
VoidChannelGroupFuture(ChannelGroup group) |
| Modifier and Type | Method and Description |
|---|---|
ChannelGroupFuture |
addListener(GenericFutureListener<? extends Future<? super java.lang.Void>> listener)
Adds the specified listener to this future.
|
ChannelGroupFuture |
addListeners(GenericFutureListener<? extends Future<? super java.lang.Void>>... listeners)
Adds the specified listeners to this future.
|
ChannelGroupFuture |
await()
Waits for this future to be completed.
|
boolean |
await(long timeoutMillis)
Waits for this future to be completed within the
specified time limit.
|
boolean |
await(long timeout,
java.util.concurrent.TimeUnit unit)
Waits for this future to be completed within the
specified time limit.
|
ChannelGroupFuture |
awaitUninterruptibly()
Waits for this future to be completed without
interruption.
|
boolean |
awaitUninterruptibly(long timeoutMillis)
Waits for this future to be completed within the
specified time limit without interruption.
|
boolean |
awaitUninterruptibly(long timeout,
java.util.concurrent.TimeUnit unit)
Waits for this future to be completed within the
specified time limit without interruption.
|
boolean |
cancel(boolean mayInterruptIfRunning)
If the cancellation was successful it will fail the future with an
CancellationException. |
ChannelGroupException |
cause()
Returns the cause of the failed I/O operation if the I/O operation has
failed.
|
ChannelFuture |
find(Channel channel)
Returns the
ChannelFuture of the individual I/O operation which
is associated with the specified Channel. |
java.lang.Void |
get() |
java.lang.Void |
get(long timeout,
java.util.concurrent.TimeUnit unit) |
java.lang.Void |
getNow()
Return the result without blocking.
|
ChannelGroup |
group()
Returns the
ChannelGroup which is associated with this future. |
boolean |
isCancellable()
returns
true if and only if the operation can be cancelled via Future.cancel(boolean). |
boolean |
isCancelled() |
boolean |
isDone() |
boolean |
isPartialFailure()
Returns
true if and only if the I/O operations associated with
this future have failed partially with some success. |
boolean |
isPartialSuccess()
Returns
true if and only if the I/O operations associated with
this future were partially successful with some failure. |
boolean |
isSuccess()
Returns
true if and only if all I/O operations associated with
this future were successful without any failure. |
java.util.Iterator<ChannelFuture> |
iterator()
Returns the
Iterator that enumerates all ChannelFutures
which are associated with this future. |
private static java.lang.RuntimeException |
reject() |
ChannelGroupFuture |
removeListener(GenericFutureListener<? extends Future<? super java.lang.Void>> listener)
Removes the first occurrence of the specified listener from this future.
|
ChannelGroupFuture |
removeListeners(GenericFutureListener<? extends Future<? super java.lang.Void>>... listeners)
Removes the first occurrence for each of the listeners from this future.
|
ChannelGroupFuture |
sync()
Waits for this future until it is done, and rethrows the cause of the failure if this future
failed.
|
ChannelGroupFuture |
syncUninterruptibly()
Waits for this future until it is done, and rethrows the cause of the failure if this future
failed.
|
private static final java.util.Iterator<ChannelFuture> EMPTY
private final ChannelGroup group
VoidChannelGroupFuture(ChannelGroup group)
public ChannelGroup group()
ChannelGroupFutureChannelGroup which is associated with this future.group in interface ChannelGroupFuturepublic ChannelFuture find(Channel channel)
ChannelGroupFutureChannelFuture of the individual I/O operation which
is associated with the specified Channel.find in interface ChannelGroupFutureChannelFuture if found.
null otherwise.public boolean isSuccess()
ChannelGroupFuturetrue if and only if all I/O operations associated with
this future were successful without any failure.isSuccess in interface ChannelGroupFuturepublic ChannelGroupException cause()
Futurecause in interface ChannelGroupFuturenull if succeeded or this future is not
completed yet.public boolean isPartialSuccess()
ChannelGroupFuturetrue if and only if the I/O operations associated with
this future were partially successful with some failure.isPartialSuccess in interface ChannelGroupFuturepublic boolean isPartialFailure()
ChannelGroupFuturetrue if and only if the I/O operations associated with
this future have failed partially with some success.isPartialFailure in interface ChannelGroupFuturepublic ChannelGroupFuture addListener(GenericFutureListener<? extends Future<? super java.lang.Void>> listener)
FutureaddListener in interface ChannelGroupFuturepublic ChannelGroupFuture addListeners(GenericFutureListener<? extends Future<? super java.lang.Void>>... listeners)
FutureaddListeners in interface ChannelGroupFuturepublic ChannelGroupFuture removeListener(GenericFutureListener<? extends Future<? super java.lang.Void>> listener)
FutureremoveListener in interface ChannelGroupFuturepublic ChannelGroupFuture removeListeners(GenericFutureListener<? extends Future<? super java.lang.Void>>... listeners)
FutureremoveListeners in interface ChannelGroupFuturepublic ChannelGroupFuture await()
Futureawait in interface ChannelGroupFuturepublic ChannelGroupFuture awaitUninterruptibly()
FutureInterruptedException and
discards it silently.awaitUninterruptibly in interface ChannelGroupFuturepublic ChannelGroupFuture syncUninterruptibly()
FuturesyncUninterruptibly in interface ChannelGroupFuturepublic ChannelGroupFuture sync()
Futuresync in interface ChannelGroupFuturepublic java.util.Iterator<ChannelFuture> iterator()
ChannelGroupFutureIterator that enumerates all ChannelFutures
which are associated with this future. Please note that the returned
Iterator is is unmodifiable, which means a ChannelFuture
cannot be removed from this future.iterator in interface ChannelGroupFutureiterator in interface java.lang.Iterable<ChannelFuture>public boolean isCancellable()
Futuretrue if and only if the operation can be cancelled via Future.cancel(boolean).public boolean await(long timeout,
java.util.concurrent.TimeUnit unit)
Futuretrue if and only if the future was completed within
the specified time limitpublic boolean await(long timeoutMillis)
Futuretrue if and only if the future was completed within
the specified time limitpublic boolean awaitUninterruptibly(long timeout,
java.util.concurrent.TimeUnit unit)
FutureInterruptedException and discards it silently.true if and only if the future was completed within
the specified time limitpublic boolean awaitUninterruptibly(long timeoutMillis)
FutureInterruptedException and discards it silently.true if and only if the future was completed within
the specified time limitpublic java.lang.Void getNow()
Futurenull.
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 Future.isDone() and not relay on the returned null value.public boolean cancel(boolean mayInterruptIfRunning)
FutureCancellationException.cancel in interface java.util.concurrent.Future<java.lang.Void>public boolean isCancelled()
isCancelled in interface java.util.concurrent.Future<java.lang.Void>public boolean isDone()
isDone in interface java.util.concurrent.Future<java.lang.Void>public java.lang.Void get()
get in interface java.util.concurrent.Future<java.lang.Void>public java.lang.Void get(long timeout,
java.util.concurrent.TimeUnit unit)
get in interface java.util.concurrent.Future<java.lang.Void>private static java.lang.RuntimeException reject()