Interface SequentialExecutorServiceFactory

  • All Superinterfaces:
    Terminable
    All Known Implementing Classes:
    ConseqServiceFactory

    public interface SequentialExecutorServiceFactory
    extends Terminable
    Main API of conseq service factory, producing sequential executor instances summoned by sequence keys.

    For sequencing, the executor of the same sequence key should execute all tasks sequentially in the same order of submissions. For concurrency, executor instances of different sequence keys should run in parallel by different threads.

    Author:
    Qingtian Wang
    • Method Detail

      • getExecutorService

        ExecutorService getExecutorService​(Object sequenceKey)
        Parameters:
        sequenceKey - an Object instance whose hash code is used to summon the corresponding executor.
        Returns:
        the sequential executor of type ExecutorService that executes all tasks of this sequence key in the same order as they are submitted.