Package io.netty.util.concurrent
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 forEventExecutorGroup
implementations.
-
-
Constructor Summary
Constructors Constructor Description AbstractEventExecutorGroup()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
execute(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> T
invokeAny(java.util.Collection<? extends java.util.concurrent.Callable<T>> tasks)
<T> T
invokeAny(java.util.Collection<? extends java.util.concurrent.Callable<T>> tasks, long timeout, java.util.concurrent.TimeUnit unit)
ScheduledFuture<?>
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)
ScheduledFuture<?>
scheduleAtFixedRate(java.lang.Runnable command, long initialDelay, long period, java.util.concurrent.TimeUnit unit)
ScheduledFuture<?>
scheduleWithFixedDelay(java.lang.Runnable command, long initialDelay, long delay, java.util.concurrent.TimeUnit unit)
abstract void
shutdown()
Deprecated.Future<?>
shutdownGracefully()
Shortcut method forEventExecutorGroup.shutdownGracefully(long, long, TimeUnit)
with sensible default values.java.util.List<java.lang.Runnable>
shutdownNow()
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, wait
-
Methods inherited from interface io.netty.util.concurrent.EventExecutorGroup
isShuttingDown, iterator, next, shutdownGracefully, terminationFuture
-
-
-
-
Method Detail
-
submit
public Future<?> submit(java.lang.Runnable task)
- Specified by:
submit
in interfaceEventExecutorGroup
- Specified by:
submit
in interfacejava.util.concurrent.ExecutorService
-
submit
public <T> Future<T> submit(java.lang.Runnable task, T result)
- Specified by:
submit
in interfaceEventExecutorGroup
- Specified by:
submit
in interfacejava.util.concurrent.ExecutorService
-
submit
public <T> Future<T> submit(java.util.concurrent.Callable<T> task)
- Specified by:
submit
in interfaceEventExecutorGroup
- Specified by:
submit
in interfacejava.util.concurrent.ExecutorService
-
schedule
public ScheduledFuture<?> schedule(java.lang.Runnable command, long delay, java.util.concurrent.TimeUnit unit)
- Specified by:
schedule
in interfaceEventExecutorGroup
- Specified by:
schedule
in 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:
schedule
in interfaceEventExecutorGroup
- Specified by:
schedule
in interfacejava.util.concurrent.ScheduledExecutorService
-
scheduleAtFixedRate
public ScheduledFuture<?> scheduleAtFixedRate(java.lang.Runnable command, long initialDelay, long period, java.util.concurrent.TimeUnit unit)
- Specified by:
scheduleAtFixedRate
in interfaceEventExecutorGroup
- Specified by:
scheduleAtFixedRate
in interfacejava.util.concurrent.ScheduledExecutorService
-
scheduleWithFixedDelay
public ScheduledFuture<?> scheduleWithFixedDelay(java.lang.Runnable command, long initialDelay, long delay, java.util.concurrent.TimeUnit unit)
- Specified by:
scheduleWithFixedDelay
in interfaceEventExecutorGroup
- Specified by:
scheduleWithFixedDelay
in interfacejava.util.concurrent.ScheduledExecutorService
-
shutdownGracefully
public Future<?> shutdownGracefully()
Description copied from interface:EventExecutorGroup
Shortcut method forEventExecutorGroup.shutdownGracefully(long, long, TimeUnit)
with sensible default values.- Specified by:
shutdownGracefully
in interfaceEventExecutorGroup
- Returns:
- the
EventExecutorGroup.terminationFuture()
-
shutdown
@Deprecated public abstract void shutdown()
Deprecated.- Specified by:
shutdown
in interfaceEventExecutorGroup
- Specified by:
shutdown
in interfacejava.util.concurrent.ExecutorService
-
shutdownNow
@Deprecated public java.util.List<java.lang.Runnable> shutdownNow()
Deprecated.- Specified by:
shutdownNow
in interfaceEventExecutorGroup
- Specified by:
shutdownNow
in 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:
invokeAll
in 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:
invokeAll
in 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:
invokeAny
in interfacejava.util.concurrent.ExecutorService
- Throws:
java.lang.InterruptedException
java.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:
invokeAny
in interfacejava.util.concurrent.ExecutorService
- Throws:
java.lang.InterruptedException
java.util.concurrent.ExecutionException
java.util.concurrent.TimeoutException
-
execute
public void execute(java.lang.Runnable command)
- Specified by:
execute
in interfacejava.util.concurrent.Executor
-
-