netty5/common/src/main/java/io/netty/util/concurrent
Trustin Lee 7dc63ccd95 Add EventExecutor.children() in favor of iterator()
Motivation:

EventExecutor.iterator() is fixed to return Iterator<EventExecutor> and there's no way to change that as long as we don't extend Iterable.  However, a user should have a way to cast the returned set of executors painlessly.  Currently, it is only possible with an explicit cast like (Iterator<NioEventLoop>).

Modifications:

Instead, I added a new method called 'children()' which returns an immutable collection of child executors whose method signature looks like the following:

    <E extends EventExecutor> Set<E> children();

Result:

A user can now do this:

    Set<NioEventLoop> loops = group.children();
    for (NioEventLoop l: loops) { ... }

Unfortunately, this is not possible:

    for (NioEventLoop l: group.children()) { ... }

However, it's still a gain that a user doesn't need to down-cast explicitly and to add the '@SuppressWarnings` annotation.
2014-03-24 12:32:55 +09:00
..
AbstractEventExecutor.java Add EventExecutor.children() in favor of iterator() 2014-03-24 12:32:55 +09:00
AbstractEventExecutorGroup.java Use common non-magic number for shutdown timeout 2014-03-24 11:12:17 +09:00
AbstractFuture.java Implement cancellation properly for Promise/Future 2013-06-11 17:46:21 +09:00
BlockingOperationException.java [#1065] Provide Future/Promise without channel reference 2013-03-07 07:21:37 +01:00
CompleteFuture.java Just some tiny javadocs optimizations 2013-07-14 16:02:03 +02:00
DefaultEventExecutor.java Make DefaultEventExecutor usable by users. 2014-03-24 11:18:03 +09:00
DefaultEventExecutorGroup.java ability to use Executor instead of ThreadFactory 2014-02-13 16:14:41 -08:00
DefaultFutureListeners.java Make DefaultFutureListeners package private 2013-07-15 09:33:33 +02:00
DefaultProgressivePromise.java Update HttpStaticFileServer example / Fix bugs related with progress notification 2013-07-19 13:21:32 +09:00
DefaultPromise.java Fix a regression which could lead to GenericFutureListeners never been notifed. Part of [#2186]. 2014-02-20 15:13:25 +01:00
DefaultThreadFactory.java Remove code duplication 2014-01-29 12:13:11 +09:00
EventExecutor.java Add EventExecutor.children() in favor of iterator() 2014-03-24 12:32:55 +09:00
EventExecutorGroup.java Add EventExecutor.children() in favor of iterator() 2014-03-24 12:32:55 +09:00
FailedFuture.java Let EventExecutor return our Future to allow the user to work also with FutureListener here. Also add a special ScheduledFuture that extends our Future for this purpose. 2013-03-19 10:45:42 +01:00
Future.java Fix types in javadocs 2013-07-22 19:14:36 +02:00
FutureListener.java Let EventExecutor return our Future to allow the user to work also with FutureListener here. Also add a special ScheduledFuture that extends our Future for this purpose. 2013-03-19 10:45:42 +01:00
GenericFutureListener.java Let EventExecutor return our Future to allow the user to work also with FutureListener here. Also add a special ScheduledFuture that extends our Future for this purpose. 2013-03-19 10:45:42 +01:00
GenericProgressiveFutureListener.java Implement ProgressivePromise notification in NIO byte channels and ChunkedWriteHandler 2013-07-19 12:53:23 +09:00
GlobalEventExecutor.java Implement EventExecutor.parent() in AbstractEventExecutor 2014-03-24 11:05:51 +09:00
ImmediateEventExecutor.java Implement EventExecutor.parent() in AbstractEventExecutor 2014-03-24 11:05:51 +09:00
ImmediateExecutor.java [#1369] Move ImmediateEventExecutor to common and let it access via a static 2013-05-17 21:35:01 +02:00
MultithreadEventExecutorGroup.java Add EventExecutor.children() in favor of iterator() 2014-03-24 12:32:55 +09:00
package-info.java [#1065] Provide Future/Promise without channel reference 2013-03-07 07:21:37 +01:00
ProgressiveFuture.java Make EventExecutor.shutdownGracefully() return Future 2013-06-12 08:00:54 +09:00
ProgressivePromise.java Make EventExecutor.shutdownGracefully() return Future 2013-06-12 08:00:54 +09:00
Promise.java Make EventExecutor.shutdownGracefully() return Future 2013-06-12 08:00:54 +09:00
PromiseTask.java Remove cruft 2013-06-25 11:07:13 +09:00
ScheduledFuture.java Let EventExecutor return our Future to allow the user to work also with FutureListener here. Also add a special ScheduledFuture that extends our Future for this purpose. 2013-03-19 10:45:42 +01:00
ScheduledFutureTask.java Fix IllegalStateException triggered by a successful connection attempt 2013-06-25 11:07:13 +09:00
SingleThreadEventExecutor.java Implement EventExecutor.parent() in AbstractEventExecutor 2014-03-24 11:05:51 +09:00
SucceededFuture.java Let EventExecutor return our Future to allow the user to work also with FutureListener here. Also add a special ScheduledFuture that extends our Future for this purpose. 2013-03-19 10:45:42 +01:00
ThreadPerTaskExecutor.java ability to use Executor instead of ThreadFactory 2014-02-13 16:14:41 -08:00