Module io.netty5.common
Package io.netty5.util.concurrent
Utility classes for concurrent / async tasks.
-
Interface Summary Interface Description EventExecutor TheEventExecutor
is a specialEventExecutorGroup
which comes with some handy methods to see if aThread
is executed in a event loop.EventExecutorGroup TheEventExecutorGroup
is responsible for providing theEventExecutor
's to use via itsEventExecutorGroup.next()
method.Future<V> The result of an asynchronous operation.FutureCompletionStage<V> ACompletionStage
that provides the same threading semantics and guarantees as the underlyingFuture
, which means that all the callbacks will be executed byFutureCompletionStage.executor()
if not specified otherwise (by calling the corresponding *Async methods).FutureContextListener<C,V> Listens to the result of aFuture
.FutureListener<V> Listens to the result of aFuture
.FuturePromiseFactory OrderedEventExecutor Marker interface forEventExecutor
s that will process all submitted tasks in an ordered / serial fashion.Promise<V> SpecialFuture
which is writable.RejectedExecutionHandler Similar toRejectedExecutionHandler
but specific toSingleThreadEventExecutor
.RunnableFuture<V> A combination ofRunnableFuture
andFuture
.RunnableScheduledFuture<V> A combination ofRunnableFuture
andComparable
(sorting by their next deadline), with additional methods for scheduling, periodicity, and delay.ThreadProperties Expose details for aThread
. -
Class Summary Class Description AbstractEventExecutor Abstract base class forEventExecutor
implementations.AbstractScheduledEventExecutor Abstract base class forEventExecutor
s that want to support scheduling.DefaultEventExecutorGroup Default implementation ofMultithreadEventExecutorGroup
which will useSingleThreadEventExecutor
instances to handle the tasks.DefaultPromise<V> DefaultThreadFactory AThreadFactory
implementation with a simple naming rule.FastThreadLocal<V> A special variant ofThreadLocal
that yields higher access performance when accessed from aFastThreadLocalThread
.FastThreadLocalThread A specialThread
that provides fast access toFastThreadLocal
variables.GlobalEventExecutor Single-thread singletonEventExecutor
.ImmediateEventExecutor ExecutesRunnable
objects in the caller's thread.ImmediateExecutor Executor
which execute tasks in the callers thread.MultithreadEventExecutorGroup EventExecutorGroup
implementation that handles their tasks with multiple threads at the same time.NonStickyEventExecutorGroup EventExecutorGroup
which will preserveRunnable
execution order but makes no guarantees about whatEventExecutor
(and thereforeThread
) will be used to execute theRunnable
s.PromiseCombiner A promise combiner monitors the outcome of a number of discrete futures, then notifies a final, aggregate promise when all of the combined futures are finished.RejectedExecutionHandlers Expose helper methods which create differentRejectedExecutionHandler
s.SingleThreadEventExecutor OrderedEventExecutor
's implementation that execute all its submitted tasks in a single thread.ThreadPerTaskExecutor UnorderedThreadPoolEventExecutor EventExecutor
implementation which makes no guarantees about the ordering of task execution that are submitted because there may be multiple threads executing these tasks. -
Exception Summary Exception Description BlockingOperationException AnIllegalStateException
which is raised when a user performed a blocking operation when the user is in an event loop thread.