Package io.netty.util.concurrent
package io.netty.util.concurrent
Utility classes for concurrent / async tasks.
-
ClassDescriptionAbstract base class for
EventExecutorimplementations.Deprecated.Abstract base class forEventExecutorGroupimplementations.AbstractFutureimplementation which does not allow for cancellation.Abstract base class forEventExecutors that want to support scheduling.A factory that creates auto-scalingEventExecutorChooserFactory.EventExecutorChooserinstances.A container for the utilization metric of a single EventExecutor.AnIllegalStateExceptionwhich is raised when a user performed a blocking operation when the user is in an event loop thread.DefaultSingleThreadEventExecutorimplementation which just execute all submitted task in a serial fashion.Default implementation which uses simple round-robin to choose nextEventExecutor.Default implementation ofMultithreadEventExecutorGroupwhich will useDefaultEventExecutorinstances to handle the tasks.AThreadFactoryimplementation with a simple naming rule.TheEventExecutoris a specialEventExecutorGroupwhich comes with some handy methods to see if aThreadis executed in a event loop.Factory that creates newEventExecutorChooserFactory.EventExecutorChoosers.Chooses the nextEventExecutorto use.AnEventExecutorChooserFactory.EventExecutorChooserthat exposes metrics for observation.TheEventExecutorGroupis responsible for providing theEventExecutor's to use via itsEventExecutorGroup.next()method.FailedFuture<V>TheCompleteFuturewhich is failed already.A special variant ofThreadLocalthat yields higher access performance when accessed from aFastThreadLocalThread.A specialThreadthat provides fast access toFastThreadLocalvariables.Future<V>The result of an asynchronous operation.A subtype ofGenericFutureListenerthat hides type parameter for convenience.GenericFutureListener<F extends Future<?>>Listens to the result of aFuture.GenericProgressiveFutureListener<F extends ProgressiveFuture<?>>Single-thread singletonEventExecutor.ExecutesRunnableobjects in the caller's thread.Executorwhich execute tasks in the callers thread.A fakeTickerthat allows the caller control the flow of time.A multi-producer (concurrent and thread-safeofferandfill), single-consumer (single-threadedpollanddrain) queue of primitive integers.This implementation is based on MpscAtomicUnpaddedArrayQueue from JCTools.Abstract base class forEventExecutorGroupimplementations that handles their tasks with multiple threads at the same time.EventExecutorGroupwhich will preserveRunnableexecution order but makes no guarantees about whatEventExecutor(and thereforeThread) will be used to execute theRunnables.Marker interface forEventExecutors that will process all submitted tasks in an ordered / serial fashion.AFuturewhich is used to indicate the progress of an operation.SpecialProgressiveFuturewhich is writable.Promise<V>SpecialFuturewhich is writable.PromiseAggregator<V, F extends Future<V>>Deprecated.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.PromiseNotifier<V, F extends Future<V>>GenericFutureListenerimplementation which takes otherPromises and notifies them on completion.Similar toRejectedExecutionHandlerbut specific toSingleThreadEventExecutor.Expose helper methods which create differentRejectedExecutionHandlers.The result of a scheduled asynchronous operation.Abstract base class forOrderedEventExecutor's that execute all its submitted tasks in a single thread.Deprecated.overrideSingleThreadEventExecutor.wakesUpForTask(Runnable)to re-create this behaviourTheCompleteFuturewhich is succeeded already.Executor that is aware its execution thread.Expose details for aThread.A nanosecond-based time source, e.g.Deprecated.Deprecated.The behavior of this event executor deviates from the typical Netty execution model and can cause subtle issues as a result.
SingleThreadEventExecutor.wakesUpForTask(Runnable)to re-create this behaviour