Class SharedExecutorProtocolHolderFactory

java.lang.Object
pt.unl.fct.di.novasys.babel2.core.SharedExecutorProtocolHolderFactory
All Implemented Interfaces:
BabelProtocolHolderFactory

public final class SharedExecutorProtocolHolderFactory extends Object implements BabelProtocolHolderFactory
Factory for creating SharedExecutorProtocolHolder instances that share a common fixed thread pool executor.
  • Constructor Details

    • SharedExecutorProtocolHolderFactory

      public SharedExecutorProtocolHolderFactory(int numberOfThreads, int processBeforeYield, boolean stopAfterException, int maxQueueCapacity)
      Constructs a factory with a shared thread pool and protocol execution parameters.
      Parameters:
      numberOfThreads - the number of worker threads in the shared pool
      processBeforeYield - maximum number of events a protocol may process before yielding the worker thread
      stopAfterException - whether to halt the holder if an uncaught exception is thrown
      maxQueueCapacity - the maximum capacity of each protocol's event queue
  • Method Details