Package com.hazelcast.config
Class DurableExecutorConfig
java.lang.Object
com.hazelcast.config.DurableExecutorConfig
- All Implemented Interfaces:
- NamedConfig,- UserCodeNamespaceAwareConfig<DurableExecutorConfig>,- DataSerializable,- IdentifiedDataSerializable,- com.hazelcast.nio.serialization.impl.Versioned
public class DurableExecutorConfig
extends Object
implements IdentifiedDataSerializable, NamedConfig, com.hazelcast.nio.serialization.impl.Versioned, UserCodeNamespaceAwareConfig<DurableExecutorConfig>
Contains the configuration for an 
DurableExecutorService.- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final intDurability of Executor.static final intThe number of executor threads per Member for the Executor based on this configuration.static final intCapacity of RingBuffer (per partition).Fields inherited from interface com.hazelcast.config.UserCodeNamespaceAwareConfigDEFAULT_NAMESPACE
- 
Constructor SummaryConstructorsConstructorDescriptionDurableExecutorConfig(String name) DurableExecutorConfig(String name, int poolSize, int durability, int capacity, boolean statisticsEnabled, String userCodeNamespace) DurableExecutorConfig(String name, int poolSize, int durability, int capacity, String splitBrainProtectionName, boolean statisticsEnabled, String userCodeNamespace) 
- 
Method SummaryModifier and TypeMethodDescriptionfinal booleanintGets the ring buffer capacity of the executor task.intReturns type identifier for this class.intGets the durability of the executorintReturns DataSerializableFactory factory ID for this class.getName()Gets the name of the executor task.intGets the number of executor threads per member for the executor.Returns the split brain protection name for operations.Retrieve the User Code Deployment Namespace to be used forClassLoaderawareness during operations related to the structure associated with this configuration.final inthashCode()booleanvoidReads fields from the input streamsetCapacity(int capacity) Sets the ring buffer capacity of the executor task.setDurability(int durability) Sets the durability of the executorSets the name of the executor task.setPoolSize(int poolSize) Sets the number of executor threads per member for the executor.setSplitBrainProtectionName(String splitBrainProtectionName) Sets the split brain protection name for operations.setStatisticsEnabled(boolean statisticsEnabled) Enables or disables statistics gathering on the executor task.setUserCodeNamespace(String userCodeNamespace) Associates the provided Namespace Name with this structure forClassLoaderawareness.toString()voidWrites object fields to output stream
- 
Field Details- 
DEFAULT_POOL_SIZEpublic static final int DEFAULT_POOL_SIZEThe number of executor threads per Member for the Executor based on this configuration.- See Also:
 
- 
DEFAULT_RING_BUFFER_CAPACITYpublic static final int DEFAULT_RING_BUFFER_CAPACITYCapacity of RingBuffer (per partition).- See Also:
 
- 
DEFAULT_DURABILITYpublic static final int DEFAULT_DURABILITYDurability of Executor.- See Also:
 
 
- 
- 
Constructor Details- 
DurableExecutorConfigpublic DurableExecutorConfig()
- 
DurableExecutorConfig
- 
DurableExecutorConfig
- 
DurableExecutorConfig
- 
DurableExecutorConfig
 
- 
- 
Method Details- 
getNameGets the name of the executor task.- Specified by:
- getNamein interface- NamedConfig
- Returns:
- the name of the executor task
 
- 
setNameSets the name of the executor task.- Specified by:
- setNamein interface- NamedConfig
- Parameters:
- name- the name of the executor task
- Returns:
- this executor config instance
 
- 
getPoolSizepublic int getPoolSize()Gets the number of executor threads per member for the executor.- Returns:
- the number of executor threads per member for the executor
 
- 
setPoolSizeSets 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
 
- 
getDurabilitypublic int getDurability()Gets the durability of the executor- Returns:
- the durability of the executor
 
- 
setDurabilitySets the durability of the executor- Parameters:
- durability- the durability of the executor
- Returns:
- this executor config instance
 
- 
getCapacitypublic int getCapacity()Gets the ring buffer capacity of the executor task. This is a per partition parameter, so total capacity of the ringbuffers will be partitionCount * capacity- Returns:
- Ring buffer capacity of the executor task
 
- 
setCapacitySets the ring buffer capacity of the executor task.- Parameters:
- capacity- Ring Buffer capacity of the executor task
- Returns:
- this executor config instance
 
- 
getSplitBrainProtectionNameReturns the split brain protection name for operations.- Returns:
- the split brain protection name
 
- 
setSplitBrainProtectionNameSets the split brain protection name for operations.- Parameters:
- splitBrainProtectionName- the split brain protection name
- Returns:
- the updated configuration
 
- 
isStatisticsEnabledpublic boolean isStatisticsEnabled()- Returns:
- trueif statistics gathering is enabled on the executor task (default),- falseotherwise
 
- 
setStatisticsEnabledEnables or disables statistics gathering on the executor task.- Parameters:
- statisticsEnabled-- trueif statistics gathering is enabled on the executor task,- falseotherwise @return this executor config instance
 
- 
getUserCodeNamespaceRetrieve the User Code Deployment Namespace to be used forClassLoaderawareness during operations related to the structure associated with this configuration.- Specified by:
- getUserCodeNamespacein interface- UserCodeNamespaceAwareConfig<DurableExecutorConfig>
- Returns:
- Namespace Name for use with the UserCodeNamespaceService, ornullif there is no User Code Namespace to associate with.
 
- 
setUserCodeNamespaceAssociates the provided Namespace Name with this structure forClassLoaderawareness.The behaviour of setting this to nullis outlined in the documentation forUserCodeNamespaceAwareConfig.DEFAULT_NAMESPACE.- Specified by:
- setUserCodeNamespacein interface- UserCodeNamespaceAwareConfig<DurableExecutorConfig>
- Parameters:
- userCodeNamespace- The ID of the Namespace to associate with this structure.
- Returns:
- the updated DurableExecutorConfiginstance
- Since:
- 5.4
 
- 
toString
- 
getFactoryIdpublic int getFactoryId()Description copied from interface:IdentifiedDataSerializableReturns DataSerializableFactory factory ID for this class.- Specified by:
- getFactoryIdin interface- IdentifiedDataSerializable
- Returns:
- factory ID
 
- 
getClassIdpublic int getClassId()Description copied from interface:IdentifiedDataSerializableReturns type identifier for this class. It should be unique per DataSerializableFactory.- Specified by:
- getClassIdin interface- IdentifiedDataSerializable
- Returns:
- type ID
 
- 
writeDataDescription copied from interface:DataSerializableWrites object fields to output stream- Specified by:
- writeDatain interface- DataSerializable
- Parameters:
- out- output
- Throws:
- IOException- if an I/O error occurs. In particular, an- IOExceptionmay be thrown if the output stream has been closed.
 
- 
readDataDescription copied from interface:DataSerializableReads fields from the input stream- Specified by:
- readDatain interface- DataSerializable
- Parameters:
- in- input
- Throws:
- IOException- if an I/O error occurs. In particular, an- IOExceptionmay be thrown if the input stream has been closed.
 
- 
equals
- 
hashCodepublic final int hashCode()
 
-