Class OrderedExecutor

java.lang.Object
org.apache.bookkeeper.common.util.OrderedExecutor
All Implemented Interfaces:
Executor, ExecutorService
Direct Known Subclasses:
OrderedScheduler

public class OrderedExecutor extends Object implements ExecutorService
This class supports submitting tasks with an ordering key, so that tasks submitted with the same key will always be executed in order, but tasks across different keys can be unordered. This retains parallelism while retaining the basic amount of ordering we want (e.g. , per ledger handle). Ordering is achieved by hashing the key objects to threads by their Object.hashCode() method.