Package space.arim.omnibus.util.concurrent
package space.arim.omnibus.util.concurrent
Core interfaces for concurrency-related classes.
There are 2 frameworks in this package:
Empowered task scheduling, spearheaded by
Enhanced
Additionally, there are a few miscellanous helper classes, including
There are 2 frameworks in this package:
Empowered task scheduling, spearheaded by
EnhancedExecutor, which enables more than
just fixed rate / fixed delay scheduling by allowing delay calculators to determine delays
between task execution dynamically. Enhanced
CompletionStage/CompletableFuture API in the form of
ReactionStage/CentralisedFuture, which add Sync variants of
CompletionStage methods to run synchronously with the main thread in accordance
with the concept of a main thread as defined in SynchronousExecutor. Since
such execution may encounter deadlocks if not done carefully, FactoryOfTheFuture
is intended to be used to construct implementations of ReactionStage or subclasses
of CentralisedFuture, which may employ special handling when awaiting completion. Additionally, there are a few miscellanous helper classes, including
CompetitiveFuture to change
the default executor of a CompletableFuture by subclassing.-
ClassDescriptionAn extended
CompletableFutureAPI implementingReactionStage.A CompletableFuture with a specified default executor, which is used as the default executor in all future async operations.A delay calculator which calculates the next delay of a task based on both the previous delay and the execution time.Provides default implementations forDelayCalculator, which determines delays forEnhancedExecutor's repeated scheduling methods.AExecutorwith upgraded concurrent functionality.Factory ofExecutorServicesConcurrent executor and producer ofCentralisedFuture.An executor whose details are tuned for specialising in handling work related to filesystem IO.An executor whose details are tuned for specialising in handling work related to networking IO.An extended interface toCompletionStageproviding a fourth variant of methods in the form do, doAsync, doAsync; doSync, where do is the general stage consuming operation.A delayed or repeating task scheduled with aEnhancedExecutor.