Package com.complexible.common.rdf.rio

# Class ProcessorContext

java.lang.Object
com.complexible.common.rdf.rio.ProcessorContext

public abstract class ProcessorContext extends Object
Class to manage the number of concurrent producer and consumer tasks across multiple `RDFStreamProcessor` instances. Use the method `shared()` to get a context with the global `SharedExecutor` used as executor and a globally enforced limit of `DEFAULT_MAX_PARSER_COUNT` and `DEFAULT_MAX_HANDLER_COUNT`

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final int`
  `DEFAULT_MAX_HANDLER_COUNT`
  `static final int`
  `DEFAULT_MAX_PARSER_COUNT`
  `protected final AtomicInteger`
  `mConsumersRunning`
  `protected int`
  `mMaxConsumers`
  `protected int`
  `mMaxProducers`
  `protected final AtomicInteger`
  `mProducersRunning`

- ## Constructor Summary

  Constructors
  Modifier
  Constructor
  Description
  `protected`
  `ProcessorContext(int maxProducers, int maxConsumers)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `maxConsumerCount()`
  `int`
  `maxProducerCount()`
  `boolean`
  `mayStartConsumer()`
  `boolean`
  `mayStartProducer()`
  `boolean`
  `mustStopConsumer()`
  `static ProcessorContext`
  `shared()`
  `int`
  `startedConsumer()`
  `int`
  `startedProducer()`
  `void`
  `stoppedConsumer()`
  `int`
  `stoppedProducer()`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### DEFAULT_MAX_PARSER_COUNT

    public static final int DEFAULT_MAX_PARSER_COUNT

  - ### DEFAULT_MAX_HANDLER_COUNT

    public static final int DEFAULT_MAX_HANDLER_COUNT

  - ### mProducersRunning

    protected final AtomicInteger mProducersRunning

  - ### mConsumersRunning

    protected final AtomicInteger mConsumersRunning

  - ### mMaxProducers

    protected int mMaxProducers

  - ### mMaxConsumers

    protected int mMaxConsumers

- ## Constructor Details

  - ### ProcessorContext

    protected ProcessorContext(int maxProducers, int maxConsumers)

- ## Method Details

  - ### maxProducerCount

    public int maxProducerCount()

  - ### maxConsumerCount

    public int maxConsumerCount()

  - ### mayStartProducer

    public boolean mayStartProducer()

  - ### mayStartConsumer

    public boolean mayStartConsumer()

  - ### mustStopConsumer

    public boolean mustStopConsumer()

  - ### startedProducer

    public int startedProducer()

  - ### startedConsumer

    public int startedConsumer()

  - ### stoppedProducer

    public int stoppedProducer()

  - ### stoppedConsumer

    public void stoppedConsumer()

  - ### shared

    public static ProcessorContext shared()
    Returns:
      Default stream processor context