public abstract class AbstractEventExecutor extends AbstractExecutorService implements EventExecutor
EventExecutor implementations.| Modifier and Type | Class and Description |
|---|---|
static interface |
AbstractEventExecutor.LazyRunnable
Deprecated.
override
SingleThreadEventExecutor.wakesUpForTask(java.lang.Runnable) to re-create this behaviour |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractEventExecutor() |
protected |
AbstractEventExecutor(EventExecutorGroup parent) |
| Modifier and Type | Method and Description |
|---|---|
Iterator<EventExecutor> |
iterator() |
void |
lazyExecute(Runnable task)
Like
Executor.execute(Runnable) but does not guarantee the task will be run until either
a non-lazy task is executed or the executor is shut down. |
protected <T> RunnableFuture<T> |
newTaskFor(Callable<T> callable) |
protected <T> RunnableFuture<T> |
newTaskFor(Runnable runnable,
T value) |
EventExecutor |
next()
Returns one of the
EventExecutors managed by this EventExecutorGroup. |
EventExecutorGroup |
parent()
Return the
EventExecutorGroup which is the parent of this EventExecutor, |
protected static void |
runTask(Runnable task) |
protected static void |
safeExecute(Runnable task)
|
<V> ScheduledFuture<V> |
schedule(Callable<V> callable,
long delay,
TimeUnit unit) |
ScheduledFuture<?> |
schedule(Runnable command,
long delay,
TimeUnit unit) |
ScheduledFuture<?> |
scheduleAtFixedRate(Runnable command,
long initialDelay,
long period,
TimeUnit unit) |
ScheduledFuture<?> |
scheduleWithFixedDelay(Runnable command,
long initialDelay,
long delay,
TimeUnit unit) |
abstract void |
shutdown()
Deprecated.
|
Future<?> |
shutdownGracefully()
Shortcut method for
EventExecutorGroup.shutdownGracefully(long, long, TimeUnit) with sensible default values. |
List<Runnable> |
shutdownNow()
Deprecated.
|
<T> Future<T> |
submit(Callable<T> task) |
Future<?> |
submit(Runnable task) |
<T> Future<T> |
submit(Runnable task,
T result) |
invokeAll, invokeAll, invokeAny, invokeAnyclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitinEventLoop, inEventLoop, isSuspended, newFailedFuture, newProgressivePromise, newPromise, newSucceededFuture, trySuspendisShuttingDown, shutdownGracefully, terminationFutureawaitTermination, invokeAll, invokeAll, invokeAny, invokeAny, isShutdown, isTerminatedforEach, spliteratorprotected AbstractEventExecutor()
protected AbstractEventExecutor(EventExecutorGroup parent)
public EventExecutorGroup parent()
EventExecutorEventExecutorGroup which is the parent of this EventExecutor,parent in interface EventExecutorpublic EventExecutor next()
EventExecutorGroupEventExecutors managed by this EventExecutorGroup.next in interface EventExecutorGrouppublic Iterator<EventExecutor> iterator()
iterator in interface EventExecutorGroupiterator in interface Iterable<EventExecutor>public Future<?> shutdownGracefully()
EventExecutorGroupEventExecutorGroup.shutdownGracefully(long, long, TimeUnit) with sensible default values.shutdownGracefully in interface EventExecutorGroupEventExecutorGroup.terminationFuture()@Deprecated public abstract void shutdown()
EventExecutorGroup.shutdownGracefully(long, long, TimeUnit) or shutdownGracefully() instead.shutdown in interface EventExecutorGroupshutdown in interface ExecutorService@Deprecated public List<Runnable> shutdownNow()
EventExecutorGroup.shutdownGracefully(long, long, TimeUnit) or shutdownGracefully() instead.shutdownNow in interface EventExecutorGroupshutdownNow in interface ExecutorServicepublic Future<?> submit(Runnable task)
submit in interface EventExecutorGroupsubmit in interface ExecutorServicesubmit in class AbstractExecutorServicepublic <T> Future<T> submit(Runnable task, T result)
submit in interface EventExecutorGroupsubmit in interface ExecutorServicesubmit in class AbstractExecutorServicepublic <T> Future<T> submit(Callable<T> task)
submit in interface EventExecutorGroupsubmit in interface ExecutorServicesubmit in class AbstractExecutorServiceprotected final <T> RunnableFuture<T> newTaskFor(Runnable runnable, T value)
newTaskFor in class AbstractExecutorServiceprotected final <T> RunnableFuture<T> newTaskFor(Callable<T> callable)
newTaskFor in class AbstractExecutorServicepublic ScheduledFuture<?> schedule(Runnable command, long delay, TimeUnit unit)
schedule in interface EventExecutorGroupschedule in interface ScheduledExecutorServicepublic <V> ScheduledFuture<V> schedule(Callable<V> callable, long delay, TimeUnit unit)
schedule in interface EventExecutorGroupschedule in interface ScheduledExecutorServicepublic ScheduledFuture<?> scheduleAtFixedRate(Runnable command, long initialDelay, long period, TimeUnit unit)
scheduleAtFixedRate in interface EventExecutorGroupscheduleAtFixedRate in interface ScheduledExecutorServicepublic ScheduledFuture<?> scheduleWithFixedDelay(Runnable command, long initialDelay, long delay, TimeUnit unit)
scheduleWithFixedDelay in interface EventExecutorGroupscheduleWithFixedDelay in interface ScheduledExecutorServiceprotected static void safeExecute(Runnable task)
protected static void runTask(Runnable task)
@UnstableApi public void lazyExecute(Runnable task)
Executor.execute(Runnable) but does not guarantee the task will be run until either
a non-lazy task is executed or the executor is shut down.
The default implementation just delegates to Executor.execute(Runnable).
Copyright © 2008–2024 The Netty Project. All rights reserved.