Class ExecutorConfig

    • 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​(java.lang.String name)
      • ExecutorConfig

        public ExecutorConfig​(java.lang.String name,
                              int poolSize)
    • Method Detail

      • getName

        public java.lang.String getName()
        Gets the name of the executor task.
        Specified by:
        getName in interface NamedConfig
        Returns:
        the name of the executor task
      • setName

        public ExecutorConfig setName​(java.lang.String name)
        Sets the name of the executor task.
        Specified by:
        setName in interface NamedConfig
        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()
        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
      • getSplitBrainProtectionName

        public java.lang.String getSplitBrainProtectionName()
        Returns the split brain protection name for operations.
        Returns:
        the split brain protection name
      • setSplitBrainProtectionName

        public ExecutorConfig setSplitBrainProtectionName​(java.lang.String splitBrainProtectionName)
        Sets the split brain protection name for operations.
        Parameters:
        splitBrainProtectionName - the split brain protection name
        Returns:
        the updated configuration
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • writeData

        public void writeData​(ObjectDataOutput out)
                       throws java.io.IOException
        Description copied from interface: DataSerializable
        Writes object fields to output stream
        Specified by:
        writeData in interface DataSerializable
        Parameters:
        out - output
        Throws:
        java.io.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 java.io.IOException
        Description copied from interface: DataSerializable
        Reads fields from the input stream
        Specified by:
        readData in interface DataSerializable
        Parameters:
        in - input
        Throws:
        java.io.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​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public final int hashCode()
        Overrides:
        hashCode in class java.lang.Object