Class AbstractEventExecutorGroup
java.lang.Object
io.netty.util.concurrent.AbstractEventExecutorGroup
- All Implemented Interfaces:
EventExecutorGroup, java.lang.Iterable<EventExecutor>, java.util.concurrent.Executor, java.util.concurrent.ExecutorService, java.util.concurrent.ScheduledExecutorService
- Direct Known Subclasses:
AbstractEventLoopGroup, MultithreadEventExecutorGroup, ThreadPerChannelEventLoopGroup
public abstract class AbstractEventExecutorGroup
extends java.lang.Object
implements EventExecutorGroup
Abstract base class for
EventExecutorGroup implementations.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidexecute(java.lang.Runnable command) <T> java.util.List<java.util.concurrent.Future<T>> invokeAll(java.util.Collection<? extends java.util.concurrent.Callable<T>> tasks) <T> java.util.List<java.util.concurrent.Future<T>> invokeAll(java.util.Collection<? extends java.util.concurrent.Callable<T>> tasks, long timeout, java.util.concurrent.TimeUnit unit) <T> TinvokeAny(java.util.Collection<? extends java.util.concurrent.Callable<T>> tasks) <T> TinvokeAny(java.util.Collection<? extends java.util.concurrent.Callable<T>> tasks, long timeout, java.util.concurrent.TimeUnit unit) schedule(java.lang.Runnable command, long delay, java.util.concurrent.TimeUnit unit) <V> ScheduledFuture<V> schedule(java.util.concurrent.Callable<V> callable, long delay, java.util.concurrent.TimeUnit unit) scheduleAtFixedRate(java.lang.Runnable command, long initialDelay, long period, java.util.concurrent.TimeUnit unit) scheduleWithFixedDelay(java.lang.Runnable command, long initialDelay, long delay, java.util.concurrent.TimeUnit unit) abstract voidshutdown()Deprecated.Future<?> Shortcut method forEventExecutorGroup.shutdownGracefully(long, long, TimeUnit)with sensible default values.java.util.List<java.lang.Runnable> Deprecated.Future<?> submit(java.lang.Runnable task) <T> Future<T> submit(java.lang.Runnable task, T result) <T> Future<T> submit(java.util.concurrent.Callable<T> task) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface EventExecutorGroup
isShuttingDown, iterator, next, shutdownGracefully, terminationFuture, tickerMethods inherited from interface java.util.concurrent.ExecutorService
awaitTermination, isShutdown, isTerminatedMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
AbstractEventExecutorGroup
public AbstractEventExecutorGroup()
-
-
Method Details
-
submit
- Specified by:
submitin interfaceEventExecutorGroup- Specified by:
submitin interfacejava.util.concurrent.ExecutorService
-
submit
- Specified by:
submitin interfaceEventExecutorGroup- Specified by:
submitin interfacejava.util.concurrent.ExecutorService
-
submit
- Specified by:
submitin interfaceEventExecutorGroup- Specified by:
submitin interfacejava.util.concurrent.ExecutorService
-
schedule
public ScheduledFuture<?> schedule(java.lang.Runnable command, long delay, java.util.concurrent.TimeUnit unit) - Specified by:
schedulein interfaceEventExecutorGroup- Specified by:
schedulein interfacejava.util.concurrent.ScheduledExecutorService
-
schedule
public <V> ScheduledFuture<V> schedule(java.util.concurrent.Callable<V> callable, long delay, java.util.concurrent.TimeUnit unit) - Specified by:
schedulein interfaceEventExecutorGroup- Specified by:
schedulein interfacejava.util.concurrent.ScheduledExecutorService
-
scheduleAtFixedRate
public ScheduledFuture<?> scheduleAtFixedRate(java.lang.Runnable command, long initialDelay, long period, java.util.concurrent.TimeUnit unit) - Specified by:
scheduleAtFixedRatein interfaceEventExecutorGroup- Specified by:
scheduleAtFixedRatein interfacejava.util.concurrent.ScheduledExecutorService
-
scheduleWithFixedDelay
public ScheduledFuture<?> scheduleWithFixedDelay(java.lang.Runnable command, long initialDelay, long delay, java.util.concurrent.TimeUnit unit) - Specified by:
scheduleWithFixedDelayin interfaceEventExecutorGroup- Specified by:
scheduleWithFixedDelayin interfacejava.util.concurrent.ScheduledExecutorService
-
shutdownGracefully
Description copied from interface:EventExecutorGroupShortcut method forEventExecutorGroup.shutdownGracefully(long, long, TimeUnit)with sensible default values.- Specified by:
shutdownGracefullyin interfaceEventExecutorGroup- Returns:
- the
EventExecutorGroup.terminationFuture()
-
shutdown
@Deprecated public abstract void shutdown()Deprecated.- Specified by:
shutdownin interfaceEventExecutorGroup- Specified by:
shutdownin interfacejava.util.concurrent.ExecutorService
-
shutdownNow
@Deprecated public java.util.List<java.lang.Runnable> shutdownNow()Deprecated.- Specified by:
shutdownNowin interfaceEventExecutorGroup- Specified by:
shutdownNowin interfacejava.util.concurrent.ExecutorService
-
invokeAll
public <T> java.util.List<java.util.concurrent.Future<T>> invokeAll(java.util.Collection<? extends java.util.concurrent.Callable<T>> tasks) throws java.lang.InterruptedException - Specified by:
invokeAllin interfacejava.util.concurrent.ExecutorService- Throws:
java.lang.InterruptedException
-
invokeAll
public <T> java.util.List<java.util.concurrent.Future<T>> invokeAll(java.util.Collection<? extends java.util.concurrent.Callable<T>> tasks, long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException - Specified by:
invokeAllin interfacejava.util.concurrent.ExecutorService- Throws:
java.lang.InterruptedException
-
invokeAny
public <T> T invokeAny(java.util.Collection<? extends java.util.concurrent.Callable<T>> tasks) throws java.lang.InterruptedException, java.util.concurrent.ExecutionException - Specified by:
invokeAnyin interfacejava.util.concurrent.ExecutorService- Throws:
java.lang.InterruptedExceptionjava.util.concurrent.ExecutionException
-
invokeAny
public <T> T invokeAny(java.util.Collection<? extends java.util.concurrent.Callable<T>> tasks, long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException, java.util.concurrent.ExecutionException, java.util.concurrent.TimeoutException - Specified by:
invokeAnyin interfacejava.util.concurrent.ExecutorService- Throws:
java.lang.InterruptedExceptionjava.util.concurrent.ExecutionExceptionjava.util.concurrent.TimeoutException
-
execute
public void execute(java.lang.Runnable command) - Specified by:
executein interfacejava.util.concurrent.Executor
-
EventExecutorGroup.shutdownGracefully(long, long, TimeUnit)orshutdownGracefully()instead.