Interface MultiplexerConfig

All Superinterfaces:
Config

public interface MultiplexerConfig extends Config
Multiplexer configuration.

Multiplexers are responsible for subscription evaluation and output processing. Each session hosted by the server is allocated to a multiplexer. Each multiplexer uses a CPU core.

Since:
4.4
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Default multiplexer queue size.
  • Method Summary

    Modifier and Type
    Method
    Description
    long
    Gets the latency warning threshold.
    int
    Get the maximum size of the event queue for the multiplexer.
    long
    Gets the multiplexer progress monitoring period.
    int
    Gets the size.
    void
    setLatencyWarning(long latencyValue)
    Sets the latency warning threshold.
    void
    Sets the maximum event queue size.
    void
    setMonitorPeriod(long period)
    Sets the multiplexer progress monitoring period.
    void
    setSize(int size)
    Sets the number of multiplexer threads.

    Methods inherited from interface com.pushtechnology.diffusion.api.config.Config

    isLocked
  • Field Details

    • DEFAULT_EVENT_QUEUE_SIZE

      static final int DEFAULT_EVENT_QUEUE_SIZE
      Default multiplexer queue size.
      See Also:
  • Method Details

    • setSize

      void setSize(int size) throws ConfigException
      Sets the number of multiplexer threads.

      The number of multiplexer instances. Each multiplexer uses a CPU core. If the server will host a large number of sessions, and there are spare CPU cores available, increase this number.

      By default this is set to the half of the number of available CPU cores.

      Parameters:
      size - the number of multiplexer threads
      Throws:
      ConfigException - if unable to set property
    • getSize

      int getSize()
      Gets the size.
      Returns:
      size
    • setLatencyWarning

      void setLatencyWarning(long latencyValue) throws ConfigException
      Sets the latency warning threshold.

      This setting controls the threshold at which to issue a warning if the multiplexer is taking too long to complete an operational cycle.

      Warnings are logged to the server log at info level.

      The default value is 1000 (1 second).

      Parameters:
      latencyValue - threshold in milliseconds
      Throws:
      ConfigException - if unable to set property
    • getLatencyWarning

      long getLatencyWarning()
      Gets the latency warning threshold.
      Returns:
      latency warning threshold in milliseconds
      See Also:
    • setMonitorPeriod

      void setMonitorPeriod(long period) throws ConfigException
      Sets the multiplexer progress monitoring period.

      A watchdog task checks the multiplexer every period milliseconds. If the multiplexer has not completed at least one operational cycle in this time, a diagnostic warning will be logged to the server log.

      The default value is 5000 (5 seconds).

      Parameters:
      period - period in milliseconds
      Throws:
      ConfigException - if unable to set property
      Since:
      6.2
    • getMonitorPeriod

      long getMonitorPeriod()
      Gets the multiplexer progress monitoring period.
      Returns:
      multiplexer monitoring period in milliseconds
      Since:
      6.2
      See Also:
    • setMaximumEventQueueSize

      void setMaximumEventQueueSize(int size) throws ConfigException
      Sets the maximum event queue size.

      The maximum number of entries in the multiplexer event queue. The default value is 128k. Under normal circumstances this value should not be changed from the default.

      Parameters:
      size - the maximum number of entries in the queue
      Throws:
      ConfigException - if unable to set the property
    • getMaximumEventQueueSize

      int getMaximumEventQueueSize()
      Get the maximum size of the event queue for the multiplexer.

      Returns:
      the maximum queue size.