com.hazelcast.config

## Class ExecutorConfig

- java.lang.Object
- - com.hazelcast.config.ExecutorConfig

- All Implemented Interfaces:
    DataSerializable, IdentifiedDataSerializable, com.hazelcast.nio.serialization.impl.Versioned
  Direct Known Subclasses:
    ExecutorConfigReadOnly

      public class ExecutorConfig
      extends Object
      implements IdentifiedDataSerializable, com.hazelcast.nio.serialization.impl.Versioned

  Contains the configuration for an `IExecutorService`.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `DEFAULT_POOL_SIZE` The number of executor threads per Member for the Executor based on this configuration.
    `static int` | `DEFAULT_QUEUE_CAPACITY` Capacity of queue.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ExecutorConfig()`
    `ExecutorConfig(ExecutorConfig config)`
    `ExecutorConfig(String name)`
    `ExecutorConfig(String name, int poolSize)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object o)`
    `ExecutorConfigReadOnly` | `getAsReadOnly()` Deprecated. this method will be removed in 4.0; it is meant for internal usage only
    `int` | `getFactoryId()` Returns DataSerializableFactory factory ID for this class.
    `int` | `getId()` Returns type identifier for this class.
    `String` | `getName()` Gets the name of the executor task.
    `int` | `getPoolSize()` Gets the number of executor threads per member for the executor.
    `int` | `getQueueCapacity()` Gets the queue capacity of the executor task.
    `String` | `getQuorumName()` Returns the quorum name for operations.
    `int` | `hashCode()`
    `boolean` | `isStatisticsEnabled()` Gets if statistics gathering is enabled or disabled on the executor task.
    `void` | `readData(ObjectDataInput in)` Reads fields from the input stream
    `ExecutorConfig` | `setName(String name)` Sets the name of the executor task.
    `ExecutorConfig` | `setPoolSize(int poolSize)` Sets the number of executor threads per member for the executor.
    `ExecutorConfig` | `setQueueCapacity(int queueCapacity)` Sets the queue capacity of the executor task.
    `ExecutorConfig` | `setQuorumName(String quorumName)` Sets the quorum name for operations.
    `ExecutorConfig` | `setStatisticsEnabled(boolean statisticsEnabled)` Enables or disables statistics gathering on the executor task.
    `String` | `toString()`
    `void` | `writeData(ObjectDataOutput out)` Writes object fields to output stream

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

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### DEFAULT_POOL_SIZE

          public static final int DEFAULT_POOL_SIZE

      The number of executor threads per Member for the Executor based on this configuration.
      See Also:
        Constant Field Values

    - #### DEFAULT_QUEUE_CAPACITY

          public static final int DEFAULT_QUEUE_CAPACITY

      Capacity of queue.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### ExecutorConfig

          public ExecutorConfig()

    - #### ExecutorConfig

          public ExecutorConfig(String name)

    - #### ExecutorConfig

          public ExecutorConfig(String name,
                                int poolSize)

    - #### ExecutorConfig

          public ExecutorConfig(ExecutorConfig config)

  - ### Method Detail

    - #### getAsReadOnly

          public ExecutorConfigReadOnly getAsReadOnly()

      Deprecated. this method will be removed in 4.0; it is meant for internal usage only
      Gets immutable version of this configuration.
      Returns:
        immutable version of this configuration

    - #### getName

          public String getName()

      Gets the name of the executor task.
      Returns:
        the name of the executor task

    - #### setName

          public ExecutorConfig setName(String name)

      Sets the name of the executor task.
      Parameters:
        `name` - the name of the executor task
      Returns:
        this executor config instance

    - #### getPoolSize

          public int getPoolSize()

      Gets the number of executor threads per member for the executor.
      Returns:
        the number of executor threads per member for the executor

    - #### setPoolSize

          public ExecutorConfig setPoolSize(int poolSize)

      Sets the number of executor threads per member for the executor.
      Parameters:
        `poolSize` - the number of executor threads per member for the executor
      Returns:
        this executor config instance

    - #### getQueueCapacity

          public int getQueueCapacity()

      Gets the queue capacity of the executor task. 0 means `Integer.MAX_VALUE`.
      Returns:
        Queue capacity of the executor task. 0 means `Integer.MAX_VALUE`

    - #### setQueueCapacity

          public ExecutorConfig setQueueCapacity(int queueCapacity)

      Sets the queue capacity of the executor task. 0 means `Integer.MAX_VALUE`.
      Parameters:
        `queueCapacity` - Queue capacity of the executor task. 0 means `Integer.MAX_VALUE`
      Returns:
        this executor config instance

    - #### isStatisticsEnabled

          public boolean isStatisticsEnabled()

      Gets if statistics gathering is enabled or disabled on the executor task.
      Returns:
        `true` if statistics gathering is enabled on the executor task (default), `false` otherwise

    - #### setStatisticsEnabled

          public ExecutorConfig setStatisticsEnabled(boolean statisticsEnabled)

      Enables or disables statistics gathering on the executor task.
      Parameters:
        `statisticsEnabled` - `true` if statistics gathering is enabled on the executor task, `false` otherwise
      Returns:
        this executor config instance

    - #### getQuorumName

          public String getQuorumName()

      Returns the quorum name for operations.
      Returns:
        the quorum name

    - #### setQuorumName

          public ExecutorConfig setQuorumName(String quorumName)

      Sets the quorum name for operations.
      Parameters:
        `quorumName` - the quorum name
      Returns:
        the updated configuration

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### getFactoryId

          public int getFactoryId()

      Description copied from interface: `IdentifiedDataSerializable`
      Returns DataSerializableFactory factory ID for this class.
      Specified by:
        `getFactoryId` in interface `IdentifiedDataSerializable`
      Returns:
        factory ID

    - #### getId

          public int getId()

      Description copied from interface: `IdentifiedDataSerializable`
      Returns type identifier for this class. It should be unique per DataSerializableFactory.
      Specified by:
        `getId` in interface `IdentifiedDataSerializable`
      Returns:
        type ID

    - #### writeData

          public void writeData(ObjectDataOutput out)
                         throws IOException

      Description copied from interface: `DataSerializable`
      Writes object fields to output stream
      Specified by:
        `writeData` in interface `DataSerializable`
      Parameters:
        `out` - output
      Throws:
        `IOException` - if an I/O error occurs. In particular, an `IOException` may be thrown if the output stream has been closed.

    - #### readData

          public void readData(ObjectDataInput in)
                        throws IOException

      Description copied from interface: `DataSerializable`
      Reads fields from the input stream
      Specified by:
        `readData` in interface `DataSerializable`
      Parameters:
        `in` - input
      Throws:
        `IOException` - if an I/O error occurs. In particular, an `IOException` may be thrown if the input stream has been closed.

    - #### equals

          public final boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public final int hashCode()

      Overrides:
        `hashCode` in class `Object`

Copyright © 2018. All rights reserved.