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 ChannelFuture s
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()
ChannelGroupFuture
ChannelGroup
which is associated with this future.group
in interface ChannelGroupFuture
public ChannelFuture find(Channel channel)
ChannelGroupFuture
ChannelFuture
of the individual I/O operation which
is associated with the specified Channel
.find
in interface ChannelGroupFuture
ChannelFuture
if found.
null
otherwise.public boolean isSuccess()
ChannelGroupFuture
true
if and only if all I/O operations associated with
this future were successful without any failure.isSuccess
in interface ChannelGroupFuture
public ChannelGroupException cause()
Future
cause
in interface ChannelGroupFuture
null
if succeeded or this future is not
completed yet.public boolean isPartialSuccess()
ChannelGroupFuture
true
if and only if the I/O operations associated with
this future were partially successful with some failure.isPartialSuccess
in interface ChannelGroupFuture
public boolean isPartialFailure()
ChannelGroupFuture
true
if and only if the I/O operations associated with
this future have failed partially with some success.isPartialFailure
in interface ChannelGroupFuture
public ChannelGroupFuture addListener(GenericFutureListener<? extends Future<? super java.lang.Void>> listener)
Future
addListener
in interface ChannelGroupFuture
public ChannelGroupFuture addListeners(GenericFutureListener<? extends Future<? super java.lang.Void>>... listeners)
Future
addListeners
in interface ChannelGroupFuture
public ChannelGroupFuture removeListener(GenericFutureListener<? extends Future<? super java.lang.Void>> listener)
Future
removeListener
in interface ChannelGroupFuture
public ChannelGroupFuture removeListeners(GenericFutureListener<? extends Future<? super java.lang.Void>>... listeners)
Future
removeListeners
in interface ChannelGroupFuture
public ChannelGroupFuture await()
Future
await
in interface ChannelGroupFuture
public ChannelGroupFuture awaitUninterruptibly()
Future
InterruptedException
and
discards it silently.awaitUninterruptibly
in interface ChannelGroupFuture
public ChannelGroupFuture syncUninterruptibly()
Future
syncUninterruptibly
in interface ChannelGroupFuture
public ChannelGroupFuture sync()
Future
sync
in interface ChannelGroupFuture
public java.util.Iterator<ChannelFuture> iterator()
ChannelGroupFuture
Iterator
that enumerates all ChannelFuture
s
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 ChannelGroupFuture
iterator
in interface java.lang.Iterable<ChannelFuture>
public boolean isCancellable()
Future
true
if and only if the operation can be cancelled via Future.cancel(boolean)
.public boolean await(long timeout, java.util.concurrent.TimeUnit unit)
Future
true
if and only if the future was completed within
the specified time limitpublic boolean await(long timeoutMillis)
Future
true
if and only if the future was completed within
the specified time limitpublic boolean awaitUninterruptibly(long timeout, java.util.concurrent.TimeUnit unit)
Future
InterruptedException
and discards it silently.true
if and only if the future was completed within
the specified time limitpublic boolean awaitUninterruptibly(long timeoutMillis)
Future
InterruptedException
and discards it silently.true
if and only if the future was completed within
the specified time limitpublic java.lang.Void getNow()
Future
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 Future.isDone()
and not relay on the returned null
value.public boolean cancel(boolean mayInterruptIfRunning)
Future
CancellationException
.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()