Interface ThreadPoolConfig

All Superinterfaces:
Config

public interface ThreadPoolConfig extends Config
Thread Pool Configuration.

This is the configuration that defines the properties of a Thread Pool.

Since:
4.4
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the definition name.
    int
    Returns the queue size.
    int
    Returns the pool size.
    void
    setQueueSize(int size)
    Sets the queue size.
    void
    setSize(int size)
    Sets the pool size.

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

    isLocked
  • Method Details

    • getName

      String getName()
      Gets the definition name.
      Returns:
      thread pool definition name
    • setSize

      void setSize(int size) throws ConfigException
      Sets the pool size.

      If this is not specified, a default of 5 is used.

      Parameters:
      size - thread pool size
      Throws:
      ConfigException - if unable to set the property
    • getSize

      int getSize()
      Returns the pool size.
      Returns:
      the pool size
    • setQueueSize

      void setQueueSize(int size) throws ConfigException
      Sets the queue size.

      The queue size. When the max-size is reached then tasks will be queued. If the value is zero then the queue is unbounded. If not 0 then the value must be at least 10.

      If this is not specified then 2000 is assumed.

      Parameters:
      size - the queue size
      Throws:
      ConfigException - if unable to set the property
    • getQueueSize

      int getQueueSize()
      Returns the queue size.
      Returns:
      the queue size