Class ThreadPool


  • public class ThreadPool
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.lang.ThreadLocal<java.util.Stack<step.threadpool.ThreadPool.BatchContext>> batchContextStack  
    • Field Detail

      • batchContextStack

        protected java.lang.ThreadLocal<java.util.Stack<step.threadpool.ThreadPool.BatchContext>> batchContextStack
    • Method Detail

      • consumeWork

        public <WORK_ITEM> void consumeWork​(java.util.Iterator<WORK_ITEM> workItemIterator,
                                            WorkerItemConsumerFactory<WORK_ITEM> workItemConsumerFactory,
                                            int numberOfThreads)
      • isReentrantThread

        protected boolean isReentrantThread()
        Returns:
        true if the current thread is a reentrant thread. A Thread is called "reentrant" when it is already managed by a ThreadPool
      • getAutoNumberOfThreads

        protected java.lang.Integer getAutoNumberOfThreads()
      • pushBatchContextToStack

        protected java.util.Stack<step.threadpool.ThreadPool.BatchContext> pushBatchContextToStack​(step.threadpool.ThreadPool.BatchContext batchContext)