Class ConcurrentMergeScheduler.CachedExecutor

  • All Implemented Interfaces:
    java.util.concurrent.Executor
    Enclosing class:
    ConcurrentMergeScheduler

    private class ConcurrentMergeScheduler.CachedExecutor
    extends java.lang.Object
    implements java.util.concurrent.Executor
    This executor provides intra-merge threads for parallel execution of merge tasks. It provides a limited number of threads to execute merge tasks. In particular, if the number of `mergeThreads` is equal to `maxThreadCount`, then the executor will execute the merge task in the calling thread.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.concurrent.atomic.AtomicInteger activeCount  
      private java.util.concurrent.ThreadPoolExecutor executor  
    • Constructor Summary

      Constructors 
      Constructor Description
      CachedExecutor()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void execute​(java.lang.Runnable command)  
      (package private) void shutdown()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • activeCount

        private final java.util.concurrent.atomic.AtomicInteger activeCount
      • executor

        private final java.util.concurrent.ThreadPoolExecutor executor
    • Constructor Detail

      • CachedExecutor

        public CachedExecutor()
    • Method Detail

      • shutdown

        void shutdown()
      • execute

        public void execute​(java.lang.Runnable command)
        Specified by:
        execute in interface java.util.concurrent.Executor