Package io.netty.util.concurrent
Utility classes for concurrent / async tasks.
-
Interface Summary Interface Description AbstractEventExecutor.LazyRunnable Deprecated. overrideSingleThreadEventExecutor.wakesUpForTask(java.lang.Runnable)to re-create this behaviourEventExecutor TheEventExecutoris a specialEventExecutorGroupwhich comes with some handy methods to see if aThreadis executed in a event loop.EventExecutorChooserFactory Factory that creates newEventExecutorChooserFactory.EventExecutorChoosers.EventExecutorChooserFactory.EventExecutorChooser Chooses the nextEventExecutorto use.EventExecutorChooserFactory.ObservableEventExecutorChooser AnEventExecutorChooserFactory.EventExecutorChooserthat exposes metrics for observation.EventExecutorGroup TheEventExecutorGroupis responsible for providing theEventExecutor's to use via itsEventExecutorGroup.next()method.Future<V> The result of an asynchronous operation.FutureListener<V> A subtype ofGenericFutureListenerthat hides type parameter for convenience.GenericFutureListener<F extends Future<?>> Listens to the result of aFuture.GenericProgressiveFutureListener<F extends ProgressiveFuture<?>> MockTicker A fakeTickerthat allows the caller control the flow of time.MpscIntQueue A multi-producer (concurrent and thread-safeofferandfill), single-consumer (single-threadedpollanddrain) queue of primitive integers.OrderedEventExecutor Marker interface forEventExecutors that will process all submitted tasks in an ordered / serial fashion.ProgressiveFuture<V> AFuturewhich is used to indicate the progress of an operation.ProgressivePromise<V> SpecialProgressiveFuturewhich is writable.Promise<V> SpecialFuturewhich is writable.RejectedExecutionHandler Similar toRejectedExecutionHandlerbut specific toSingleThreadEventExecutor.ScheduledFuture<V> The result of a scheduled asynchronous operation.SingleThreadEventExecutor.NonWakeupRunnable Deprecated. overrideSingleThreadEventExecutor.wakesUpForTask(java.lang.Runnable)to re-create this behaviourThreadAwareExecutor Executor that is aware its execution thread.ThreadProperties Expose details for aThread.Ticker A nanosecond-based time source, e.g. -
Class Summary Class Description AbstractEventExecutor Abstract base class forEventExecutorimplementations.AbstractEventExecutorGroup Abstract base class forEventExecutorGroupimplementations.AbstractFuture<V> AbstractFutureimplementation which does not allow for cancellation.AbstractScheduledEventExecutor Abstract base class forEventExecutors that want to support scheduling.AutoScalingEventExecutorChooserFactory A factory that creates auto-scalingEventExecutorChooserFactory.EventExecutorChooserinstances.AutoScalingEventExecutorChooserFactory.AutoScalingUtilizationMetric A container for the utilization metric of a single EventExecutor.CompleteFuture<V> DefaultEventExecutor DefaultSingleThreadEventExecutorimplementation which just execute all submitted task in a serial fashion.DefaultEventExecutorChooserFactory Default implementation which uses simple round-robin to choose nextEventExecutor.DefaultEventExecutorGroup Default implementation ofMultithreadEventExecutorGroupwhich will useDefaultEventExecutorinstances to handle the tasks.DefaultProgressivePromise<V> DefaultPromise<V> DefaultThreadFactory AThreadFactoryimplementation with a simple naming rule.FailedFuture<V> TheCompleteFuturewhich is failed already.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.MpscIntQueue.MpscAtomicIntegerArrayQueue This implementation is based on MpscAtomicUnpaddedArrayQueue from JCTools.MultithreadEventExecutorGroup Abstract base class forEventExecutorGroupimplementations 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.PromiseAggregator<V,F extends Future<V>> Deprecated. 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.PromiseNotifier<V,F extends Future<V>> GenericFutureListenerimplementation which takes otherPromises and notifies them on completion.RejectedExecutionHandlers Expose helper methods which create differentRejectedExecutionHandlers.SingleThreadEventExecutor Abstract base class forOrderedEventExecutor's that execute all its submitted tasks in a single thread.SucceededFuture<V> TheCompleteFuturewhich is succeeded already.ThreadPerTaskExecutor UnaryPromiseNotifier<T> Deprecated. UnorderedThreadPoolEventExecutor Deprecated. The behavior of this event executor deviates from the typical Netty execution model and can cause subtle issues as a result. -
Exception Summary Exception Description BlockingOperationException AnIllegalStateExceptionwhich is raised when a user performed a blocking operation when the user is in an event loop thread.