Module io.netty5.common
Package io.netty5.util.concurrent
Utility classes for concurrent / async tasks.
-
Interface Summary Interface Description EventExecutor TheEventExecutoris a specialEventExecutorGroupwhich comes with some handy methods to see if aThreadis executed in a event loop.EventExecutorGroup TheEventExecutorGroupis responsible for providing theEventExecutor's to use via itsEventExecutorGroup.next()method.Future<V> The result of an asynchronous operation.FutureCompletionStage<V> ACompletionStagethat 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 forEventExecutors that will process all submitted tasks in an ordered / serial fashion.Promise<V> SpecialFuturewhich is writable.RejectedExecutionHandler Similar toRejectedExecutionHandlerbut specific toSingleThreadEventExecutor.RunnableFuture<V> A combination ofRunnableFutureandFuture.RunnableScheduledFuture<V> A combination ofRunnableFutureandComparable(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 forEventExecutorimplementations.AbstractScheduledEventExecutor Abstract base class forEventExecutors that want to support scheduling.DefaultEventExecutorGroup Default implementation ofMultithreadEventExecutorGroupwhich will useSingleThreadEventExecutorinstances to handle the tasks.DefaultPromise<V> DefaultThreadFactory AThreadFactoryimplementation with a simple naming rule.FastThreadLocal<V> A special variant ofThreadLocalthat yields higher access performance when accessed from aFastThreadLocalThread.FastThreadLocalThread A specialThreadthat provides fast access toFastThreadLocalvariables.GlobalEventExecutor Single-thread singletonEventExecutor.ImmediateEventExecutor ExecutesRunnableobjects in the caller's thread.ImmediateExecutor Executorwhich execute tasks in the callers thread.MultithreadEventExecutorGroup EventExecutorGroupimplementation that handles their tasks with multiple threads at the same time.NonStickyEventExecutorGroup EventExecutorGroupwhich will preserveRunnableexecution order but makes no guarantees about whatEventExecutor(and thereforeThread) will be used to execute theRunnables.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 differentRejectedExecutionHandlers.SingleThreadEventExecutor OrderedEventExecutor's implementation that execute all its submitted tasks in a single thread.ThreadPerTaskExecutor UnorderedThreadPoolEventExecutor EventExecutorimplementation 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 AnIllegalStateExceptionwhich is raised when a user performed a blocking operation when the user is in an event loop thread.