Top Description Inners Fields Constructors Methods
io.netty.channel.group

pack-priv final Class DefaultChannelGroupFuture

extends DefaultPromise<Void>
implements ChannelGroupFuture
Class Inheritance
All Implemented Interfaces
io.netty.channel.group.ChannelGroupFuture, java.lang.Iterable, io.netty.util.concurrent.Future, java.util.concurrent.Future
Imports
io.netty.channel.Channel, .ChannelFuture, .ChannelFutureListener, io.netty.util.concurrent.BlockingOperationException, .DefaultPromise, .EventExecutor, .Future, .GenericFutureListener, .ImmediateEventExecutor, io.netty.util.internal.ObjectUtil, java.util.ArrayList, .Collection, .Collections, .Iterator, .LinkedHashMap, .List, .Map

The default ChannelGroupFuture implementation.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private final ChannelFutureListener
private int
private final Map<Channel, ChannelFuture>
private final ChannelGroup
private int

Constructor Summary

AccessConstructor and Description
pack-priv
DefaultChannelGroupFuture(ChannelGroup group, Collection<ChannelFuture> futures, EventExecutor executor)

Creates a new instance.

pack-priv

Method Summary

Modifier and TypeMethod and Description
public DefaultChannelGroupFuture
public DefaultChannelGroupFuture
public DefaultChannelGroupFuture
public DefaultChannelGroupFuture
public ChannelGroupException
cause()

Overrides io.netty.util.concurrent.DefaultPromise.cause.

Implements io.netty.channel.group.ChannelGroupFuture.cause, io.netty.util.concurrent.Future.cause.

Returns the cause of the failed I/O operation if the I/O operation has failed.
protected void
public ChannelFuture
find(Channel channel)

Implements io.netty.channel.group.ChannelGroupFuture.find.

Returns the ChannelFuture of the individual I/O operation which is associated with the specified Channel.
public ChannelGroup
group()

Implements io.netty.channel.group.ChannelGroupFuture.group.

Returns the ChannelGroup which is associated with this future.
public synchronized boolean
isPartialFailure()

Implements io.netty.channel.group.ChannelGroupFuture.isPartialFailure.

Returns true if and only if the I/O operations associated with this future have failed partially with some success.
public synchronized boolean
isPartialSuccess()

Implements io.netty.channel.group.ChannelGroupFuture.isPartialSuccess.

Returns true if and only if the I/O operations associated with this future were partially successful with some failure.
public Iterator<ChannelFuture>
iterator()

Implements io.netty.channel.group.ChannelGroupFuture.iterator.

Returns the Iterator that enumerates all ChannelFutures which are associated with this future.
public DefaultChannelGroupFuture
public DefaultChannelGroupFuture
public DefaultChannelGroupFuture
setFailure(Throwable cause)

Overrides io.netty.util.concurrent.DefaultPromise.setFailure.

Implements io.netty.util.concurrent.Promise.setFailure.

Marks this future as a failure and notifies all listeners.
private void
public DefaultChannelGroupFuture
setSuccess(Void result)

Overrides io.netty.util.concurrent.DefaultPromise.setSuccess.

Implements io.netty.util.concurrent.Promise.setSuccess.

Marks this future as a success and notifies all listeners.
private void
public DefaultChannelGroupFuture
sync()

Overrides io.netty.util.concurrent.DefaultPromise.sync.

Implements io.netty.channel.group.ChannelGroupFuture.sync, io.netty.util.concurrent.Promise.sync, io.netty.util.concurrent.Future.sync.

Waits for this future until it is done, and rethrows the cause of the failure if this future failed.
public DefaultChannelGroupFuture
public boolean
tryFailure(Throwable cause)

Overrides io.netty.util.concurrent.DefaultPromise.tryFailure.

Implements io.netty.util.concurrent.Promise.tryFailure.

Marks this future as a failure and notifies all listeners.
public boolean
trySuccess(Void result)

Overrides io.netty.util.concurrent.DefaultPromise.trySuccess.

Implements io.netty.util.concurrent.Promise.trySuccess.

Marks this future as a success and notifies all listeners.
Inherited from io.netty.util.concurrent.DefaultPromise:
awaitawaitawaitUninterruptiblyawaitUninterruptiblycancelexecutorgetgetgetNowisCancellableisCancelledisDoneisSuccessnotifyListenersetUncancellabletoStringtoStringBuilder

Field Detail

childListenerback to summary
private final ChannelFutureListener childListener
failureCountback to summary
private int failureCount
futuresback to summary
private final Map<Channel, ChannelFuture> futures
groupback to summary
private final ChannelGroup group
successCountback to summary
private int successCount

Constructor Detail

DefaultChannelGroupFutureback to summary
pack-priv DefaultChannelGroupFuture(ChannelGroup group, Collection<ChannelFuture> futures, EventExecutor executor)

Creates a new instance.

DefaultChannelGroupFutureback to summary
pack-priv DefaultChannelGroupFuture(ChannelGroup group, Map<Channel, ChannelFuture> futures, EventExecutor executor)

Method Detail

addListenerback to summary
public DefaultChannelGroupFuture addListener(GenericFutureListener<? extends Future<? super Void>> listener)

Overrides io.netty.util.concurrent.DefaultPromise.addListener.

Implements io.netty.channel.group.ChannelGroupFuture.addListener, io.netty.util.concurrent.Promise.addListener, io.netty.util.concurrent.Future.addListener.

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

Adds the specified listener to this future. The specified listener is notified when this future is done. If this future is already completed, the specified listener is notified immediately.

Annotations
@Override
addListenersback to summary
public DefaultChannelGroupFuture addListeners(GenericFutureListener<? extends Future<? super Void>>... listeners)

Overrides io.netty.util.concurrent.DefaultPromise.addListeners.

Implements io.netty.channel.group.ChannelGroupFuture.addListeners, io.netty.util.concurrent.Promise.addListeners, io.netty.util.concurrent.Future.addListeners.

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

Adds the specified listeners to this future. The specified listeners are notified when this future is done. If this future is already completed, the specified listeners are notified immediately.

Annotations
@Override
awaitback to summary
public DefaultChannelGroupFuture await() throws InterruptedException

Overrides io.netty.util.concurrent.DefaultPromise.await.

Implements io.netty.channel.group.ChannelGroupFuture.await, io.netty.util.concurrent.Promise.await, io.netty.util.concurrent.Future.await.

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

Waits for this future to be completed.

Annotations
@Override
Exceptions
InterruptedException:
if the current thread was interrupted
awaitUninterruptiblyback to summary
public DefaultChannelGroupFuture awaitUninterruptibly()

Overrides io.netty.util.concurrent.DefaultPromise.awaitUninterruptibly.

Implements io.netty.channel.group.ChannelGroupFuture.awaitUninterruptibly, io.netty.util.concurrent.Promise.awaitUninterruptibly, io.netty.util.concurrent.Future.awaitUninterruptibly.

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

Waits for this future to be completed without interruption. This method catches an InterruptedException and discards it silently.

Annotations
@Override
causeback to summary
public ChannelGroupException cause()

Overrides io.netty.util.concurrent.DefaultPromise.cause.

Implements io.netty.channel.group.ChannelGroupFuture.cause, 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:ChannelGroupException

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

Annotations
@Override
checkDeadLockback to summary
protected void checkDeadLock()

Overrides io.netty.util.concurrent.DefaultPromise.checkDeadLock.

Annotations
@Override
findback to summary
public ChannelFuture find(Channel channel)

Implements io.netty.channel.group.ChannelGroupFuture.find.

Doc from io.netty.channel.group.ChannelGroupFuture.find.

Returns the ChannelFuture of the individual I/O operation which is associated with the specified Channel.

Returns:ChannelFuture

the matching ChannelFuture if found. null otherwise.

Annotations
@Override
groupback to summary
public ChannelGroup group()

Implements io.netty.channel.group.ChannelGroupFuture.group.

Doc from io.netty.channel.group.ChannelGroupFuture.group.

Returns the ChannelGroup which is associated with this future.

Annotations
@Override
isPartialFailureback to summary
public synchronized boolean isPartialFailure()

Implements io.netty.channel.group.ChannelGroupFuture.isPartialFailure.

Doc from io.netty.channel.group.ChannelGroupFuture.isPartialFailure.

Returns true if and only if the I/O operations associated with this future have failed partially with some success.

Annotations
@Override
isPartialSuccessback to summary
public synchronized boolean isPartialSuccess()

Implements io.netty.channel.group.ChannelGroupFuture.isPartialSuccess.

Doc from io.netty.channel.group.ChannelGroupFuture.isPartialSuccess.

Returns true if and only if the I/O operations associated with this future were partially successful with some failure.

Annotations
@Override
iteratorback to summary
public Iterator<ChannelFuture> iterator()

Implements io.netty.channel.group.ChannelGroupFuture.iterator.

Doc from io.netty.channel.group.ChannelGroupFuture.iterator.

Returns the Iterator 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.

Returns:Iterator<ChannelFuture>

Doc from java.lang.Iterable.iterator.

an Iterator.

Annotations
@Override
removeListenerback to summary
public DefaultChannelGroupFuture removeListener(GenericFutureListener<? extends Future<? super Void>> listener)

Overrides io.netty.util.concurrent.DefaultPromise.removeListener.

Implements io.netty.channel.group.ChannelGroupFuture.removeListener, io.netty.util.concurrent.Promise.removeListener, io.netty.util.concurrent.Future.removeListener.

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

Removes the first occurrence of the specified listener from this future. The specified listener is no longer notified when this future is done. If the specified listener is not associated with this future, this method does nothing and returns silently.

Annotations
@Override
removeListenersback to summary
public DefaultChannelGroupFuture removeListeners(GenericFutureListener<? extends Future<? super Void>>... listeners)

Overrides io.netty.util.concurrent.DefaultPromise.removeListeners.

Implements io.netty.channel.group.ChannelGroupFuture.removeListeners, io.netty.util.concurrent.Promise.removeListeners, io.netty.util.concurrent.Future.removeListeners.

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

Removes the first occurrence for each of the listeners from this future. The specified listeners are no longer notified when this future is done. If the specified listeners are not associated with this future, this method does nothing and returns silently.

Annotations
@Override
setFailureback to summary
public DefaultChannelGroupFuture setFailure(Throwable cause)

Overrides io.netty.util.concurrent.DefaultPromise.setFailure.

Implements io.netty.util.concurrent.Promise.setFailure.

Doc from io.netty.util.concurrent.Promise.setFailure.

Marks this future as a failure and notifies all listeners. If it is success or failed already it will throw an IllegalStateException.

Annotations
@Override
setFailure0back to summary
private void setFailure0(ChannelGroupException cause)
setSuccessback to summary
public DefaultChannelGroupFuture setSuccess(Void result)

Overrides io.netty.util.concurrent.DefaultPromise.setSuccess.

Implements io.netty.util.concurrent.Promise.setSuccess.

Doc from io.netty.util.concurrent.Promise.setSuccess.

Marks this future as a success and notifies all listeners. If it is success or failed already it will throw an IllegalStateException.

Annotations
@Override
setSuccess0back to summary
private void setSuccess0()
syncback to summary
public DefaultChannelGroupFuture sync() throws InterruptedException

Overrides io.netty.util.concurrent.DefaultPromise.sync.

Implements io.netty.channel.group.ChannelGroupFuture.sync, io.netty.util.concurrent.Promise.sync, io.netty.util.concurrent.Future.sync.

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

Waits for this future until it is done, and rethrows the cause of the failure if this future failed.

Annotations
@Override
syncUninterruptiblyback to summary
public DefaultChannelGroupFuture syncUninterruptibly()

Overrides io.netty.util.concurrent.DefaultPromise.syncUninterruptibly.

Implements io.netty.channel.group.ChannelGroupFuture.syncUninterruptibly, io.netty.util.concurrent.Promise.syncUninterruptibly, io.netty.util.concurrent.Future.syncUninterruptibly.

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

Waits for this future until it is done, and rethrows the cause of the failure if this future failed.

Annotations
@Override
tryFailureback to summary
public boolean tryFailure(Throwable cause)

Overrides io.netty.util.concurrent.DefaultPromise.tryFailure.

Implements io.netty.util.concurrent.Promise.tryFailure.

Doc from io.netty.util.concurrent.Promise.tryFailure.

Marks this future as a failure and notifies all listeners.

Returns:boolean

true if and only if successfully marked this future as a failure. Otherwise false because this future is already marked as either a success or a failure.

Annotations
@Override
trySuccessback to summary
public boolean trySuccess(Void result)

Overrides io.netty.util.concurrent.DefaultPromise.trySuccess.

Implements io.netty.util.concurrent.Promise.trySuccess.

Doc from io.netty.util.concurrent.Promise.trySuccess.

Marks this future as a success and notifies all listeners.

Returns:boolean

true if and only if successfully marked this future as a success. Otherwise false because this future is already marked as either a success or a failure.

Annotations
@Override
io.netty.channel.group back to summary

private final Class DefaultChannelGroupFuture.DefaultEntry<K, V>

extends Object
implements Map.Entry<K, V>
Class Inheritance
  • java.lang.Object
  • io.netty.channel.group.DefaultChannelGroupFuture.DefaultEntry
All Implemented Interfaces
java.util.Map.Entry

Field Summary

Modifier and TypeField and Description
private final K
private final V

Constructor Summary

AccessConstructor and Description
pack-priv
DefaultEntry(K key, V value)

Method Summary

Modifier and TypeMethod and Description
public K
getKey()

Implements java.util.Map.Entry.getKey.

Returns the key corresponding to this entry.
public V
getValue()

Implements java.util.Map.Entry.getValue.

Returns the value corresponding to this entry.
public V
setValue(V
new value to be stored in this entry
value
)

Implements java.util.Map.Entry.setValue.

Replaces the value corresponding to this entry with the specified value (optional operation).
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

keyback to summary
private final K key
valueback to summary
private final V value

Constructor Detail

DefaultEntryback to summary
pack-priv DefaultEntry(K key, V value)

Method Detail

getKeyback to summary
public K getKey()

Implements java.util.Map.Entry.getKey.

Doc from java.util.Map.Entry.getKey.

Returns the key corresponding to this entry.

Returns:K

the key corresponding to this entry

Annotations
@Override
getValueback to summary
public V getValue()

Implements java.util.Map.Entry.getValue.

Doc from java.util.Map.Entry.getValue.

Returns the value corresponding to this entry. If the mapping has been removed from the backing map (by the iterator's remove operation), the results of this call are undefined.

Returns:V

the value corresponding to this entry

Annotations
@Override
setValueback to summary
public V setValue(V value)

Implements java.util.Map.Entry.setValue.

Doc from java.util.Map.Entry.setValue.

Replaces the value corresponding to this entry with the specified value (optional operation). (Writes through to the map.) The behavior of this call is undefined if the mapping has already been removed from the map (by the iterator's remove operation).

Parameters
value:V

new value to be stored in this entry

Returns:V

old value corresponding to the entry

Annotations
@Override