Class BatchPublisherConfiguration

java.lang.Object
org.forgerock.audit.handlers.jms.BatchPublisherConfiguration

public class BatchPublisherConfiguration extends Object
This class holds the configuration properties that are used by the {#link BatchPublisher} to control the batch queue and worker threads that process the items in the queue.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the maximum capacity of the publishing queue.
    long
    Returns the timeout in seconds the duration that the queue should block while attempting to offer a new item for the queue.
    int
    Returns the maximum count of events that will be expected to be delivered in a single publish call.
    long
    Returns the timeout in seconds for the worker threads to wait for a new item to be available in the queue before exiting.
    long
    Returnds the timeout in seconds for the publisher to wait for all worker threads to terminate at shutdown.
    int
    Returns the count of worker threads to have processing the queue.
    boolean
    Returns true if handling of audit events should be done in batches.
    void
    setBatchEnabled(boolean batchEnabled)
    sets if handling of audit events should be done in batches.
    void
    setCapacity(int capacity)
    Sets the maximum capacity of the publishing queue.
    void
    setInsertTimeoutSec(long insertTimeoutSec)
    Sets the timeout in seconds the duration that the queue should block while attempting to offer a new item for the queue.
    void
    setMaxBatchedEvents(int maxBatchedEvents)
    Sets the maximum count of events that will be expected to be delivered in a single publish call.
    void
    setPollTimeoutSec(long pollTimeoutSec)
    Sets the timeout in seconds for the worker threads to wait for a new item to be available in the queue before exiting.
    void
    setShutdownTimeoutSec(long shutdownTimeoutSec)
    Sets the timeout in seconds for the publisher to wait for all worker threads to terminate at shutdown.
    void
    setThreadCount(int threadCount)
    Sets the count of worker threads to have processing the queue.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • getCapacity

      public int getCapacity()
      Returns the maximum capacity of the publishing queue. Execution will block if the queue size is at capacity.
      Returns:
      the maximum capacity of the publishing queue
    • setCapacity

      public void setCapacity(int capacity)
      Sets the maximum capacity of the publishing queue.
      Parameters:
      capacity - the maximum capacity of the publishing queue
    • getThreadCount

      public int getThreadCount()
      Returns the count of worker threads to have processing the queue.
      Returns:
      the count of worker threads to have processing the queue.
    • setThreadCount

      public void setThreadCount(int threadCount)
      Sets the count of worker threads to have processing the queue.
      Parameters:
      threadCount - the count of worker threads to have processing the queue.
    • getMaxBatchedEvents

      public int getMaxBatchedEvents()
      Returns the maximum count of events that will be expected to be delivered in a single publish call.
      Returns:
      the maximum count of events that will be expected to be delivered in a single publish call.
    • setMaxBatchedEvents

      public void setMaxBatchedEvents(int maxBatchedEvents)
      Sets the maximum count of events that will be expected to be delivered in a single publish call.
      Parameters:
      maxBatchedEvents - the maximum count of events
    • getInsertTimeoutSec

      public long getInsertTimeoutSec()
      Returns the timeout in seconds the duration that the queue should block while attempting to offer a new item for the queue.
      Returns:
      timeout in seconds
    • setInsertTimeoutSec

      public void setInsertTimeoutSec(long insertTimeoutSec)
      Sets the timeout in seconds the duration that the queue should block while attempting to offer a new item for the queue.
      Parameters:
      insertTimeoutSec - timeout in seconds
    • getPollTimeoutSec

      public long getPollTimeoutSec()
      Returns the timeout in seconds for the worker threads to wait for a new item to be available in the queue before exiting.
      Returns:
      timeout in seconds
    • setPollTimeoutSec

      public void setPollTimeoutSec(long pollTimeoutSec)
      Sets the timeout in seconds for the worker threads to wait for a new item to be available in the queue before exiting.
      Parameters:
      pollTimeoutSec - timeout in seconds
    • getShutdownTimeoutSec

      public long getShutdownTimeoutSec()
      Returnds the timeout in seconds for the publisher to wait for all worker threads to terminate at shutdown.
      Returns:
      timeout in seconds
    • setShutdownTimeoutSec

      public void setShutdownTimeoutSec(long shutdownTimeoutSec)
      Sets the timeout in seconds for the publisher to wait for all worker threads to terminate at shutdown.
      Parameters:
      shutdownTimeoutSec - timeout in seconds
    • isBatchEnabled

      public boolean isBatchEnabled()
      Returns true if handling of audit events should be done in batches.
      Returns:
      true if handling of audit events should be done in batches.
    • setBatchEnabled

      public void setBatchEnabled(boolean batchEnabled)
      sets if handling of audit events should be done in batches.
      Parameters:
      batchEnabled - true if handling of audit events should be done in batches.