Class PriorityProcessorPool

    • Constructor Detail

      • PriorityProcessorPool

        public PriorityProcessorPool()
        Creates a new PriorityProcessorPool with as many worker threads as processors available on the corresponding environment. id needs to be initialized later using the setter.
      • PriorityProcessorPool

        public PriorityProcessorPool​(java.lang.String id)
        Creates a new PriorityProcessorPool with as many worker threads as processors available on the corresponding environment.
        Parameters:
        id - id for the new created pool. Must be unique and shall not be longer than 32 characters which is the limit to be stored for the processor pool ids when using persistent engines.
      • PriorityProcessorPool

        public PriorityProcessorPool​(java.lang.String id,
                                     int numberOfThreads)
    • Method Detail

      • createQueue

        protected java.util.Queue<Workflow<?>> createQueue()
        Creates a new instance of WfPriorityQueue
        Returns:
        the new created instance.
      • setShutdownWaitIntervalMSec

        public void setShutdownWaitIntervalMSec​(int shutdownWaitIntervalMSec)
        This processor pool wait up to the specified number of milliseconds until all of its Processors are terminated. A value ≤ 0 means, that the processor pool will not wait at all.
        Parameters:
        shutdownWaitIntervalMSec - wait interval in milliseconds
      • setEngine

        public void setEngine​(ProcessingEngine engine)
        Description copied from interface: ProcessorPool
        Called internally by COPPER during initialization
        Specified by:
        setEngine in interface ProcessorPool
        Parameters:
        engine - engine which holds the ProcessorPool
      • setId

        public void setId​(java.lang.String id)
      • setNumberOfThreads

        public void setNumberOfThreads​(int numberOfThreads)
        Specified by:
        setNumberOfThreads in interface org.copperengine.management.ProcessorPoolMXBean
      • getNumberOfThreads

        public int getNumberOfThreads()
        Specified by:
        getNumberOfThreads in interface org.copperengine.management.ProcessorPoolMXBean
      • setThreadPriority

        public void setThreadPriority​(int threadPriority)
        Specified by:
        setThreadPriority in interface org.copperengine.management.ProcessorPoolMXBean
      • getThreadPriority

        public int getThreadPriority()
        Specified by:
        getThreadPriority in interface org.copperengine.management.ProcessorPoolMXBean
      • getId

        public java.lang.String getId()
        Specified by:
        getId in interface ProcessorPool
        Specified by:
        getId in interface org.copperengine.management.ProcessorPoolMXBean
        Returns:
        the processor pools identifier
      • getMemoryQueueSize

        public int getMemoryQueueSize()
        Specified by:
        getMemoryQueueSize in interface org.copperengine.management.ProcessorPoolMXBean
      • resume

        public void resume()
        Description copied from interface: ProcessorPool
        Resume processing of workflows
        Specified by:
        resume in interface ProcessorPool
        Specified by:
        resume in interface org.copperengine.management.ProcessorPoolMXBean
      • suspend

        public void suspend()
        Description copied from interface: ProcessorPool
        Suspend processing of workflows.
        Specified by:
        suspend in interface ProcessorPool
        Specified by:
        suspend in interface org.copperengine.management.ProcessorPoolMXBean
      • setProcessorFactory

        public void setProcessorFactory​(ProcessorFactory processorFactory)
      • getProcessorPoolState

        public java.lang.String getProcessorPoolState()
        Specified by:
        getProcessorPoolState in interface org.copperengine.management.ProcessorPoolMXBean
      • getNumberOfActiveThreads

        public int getNumberOfActiveThreads()
        Specified by:
        getNumberOfActiveThreads in interface org.copperengine.management.ProcessorPoolMXBean