public class DurableExecutorConfig extends Object implements IdentifiedDataSerializable, NamedConfig, com.hazelcast.nio.serialization.impl.Versioned
DurableExecutorService
.Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_DURABILITY
Durability of Executor.
|
static int |
DEFAULT_POOL_SIZE
The number of executor threads per Member for the Executor based on this configuration.
|
static int |
DEFAULT_RING_BUFFER_CAPACITY
Capacity of RingBuffer (per partition).
|
Constructor and Description |
---|
DurableExecutorConfig() |
DurableExecutorConfig(DurableExecutorConfig config) |
DurableExecutorConfig(String name) |
DurableExecutorConfig(String name,
int poolSize,
int durability,
int capacity,
boolean statisticsEnabled) |
DurableExecutorConfig(String name,
int poolSize,
int durability,
int capacity,
String splitBrainProtectionName,
boolean statisticsEnabled) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
int |
getCapacity()
Gets the ring buffer capacity of the executor task.
|
int |
getClassId()
Returns type identifier for this class.
|
int |
getDurability()
Gets the durability of the executor
|
int |
getFactoryId()
Returns DataSerializableFactory factory ID 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.
|
String |
getSplitBrainProtectionName()
Returns the split brain protection name for operations.
|
int |
hashCode() |
boolean |
isStatisticsEnabled() |
void |
readData(ObjectDataInput in)
Reads fields from the input stream
|
DurableExecutorConfig |
setCapacity(int capacity)
Sets the ring buffer capacity of the executor task.
|
DurableExecutorConfig |
setDurability(int durability)
Sets the durability of the executor
|
DurableExecutorConfig |
setName(String name)
Sets the name of the executor task.
|
DurableExecutorConfig |
setPoolSize(int poolSize)
Sets the number of executor threads per member for the executor.
|
DurableExecutorConfig |
setSplitBrainProtectionName(String splitBrainProtectionName)
Sets the split brain protection name for operations.
|
DurableExecutorConfig |
setStatisticsEnabled(boolean statisticsEnabled)
Enables or disables statistics gathering on the executor task.
|
String |
toString() |
void |
writeData(ObjectDataOutput out)
Writes object fields to output stream
|
public static final int DEFAULT_POOL_SIZE
public static final int DEFAULT_RING_BUFFER_CAPACITY
public static final int DEFAULT_DURABILITY
public DurableExecutorConfig()
public DurableExecutorConfig(String name)
public DurableExecutorConfig(String name, int poolSize, int durability, int capacity, boolean statisticsEnabled)
public DurableExecutorConfig(String name, int poolSize, int durability, int capacity, String splitBrainProtectionName, boolean statisticsEnabled)
public DurableExecutorConfig(DurableExecutorConfig config)
public String getName()
getName
in interface NamedConfig
public DurableExecutorConfig setName(String name)
setName
in interface NamedConfig
name
- the name of the executor taskpublic int getPoolSize()
public DurableExecutorConfig setPoolSize(int poolSize)
poolSize
- the number of executor threads per member for the executorpublic int getDurability()
public DurableExecutorConfig setDurability(int durability)
durability
- the durability of the executorpublic int getCapacity()
public DurableExecutorConfig setCapacity(int capacity)
capacity
- Ring Buffer capacity of the executor taskpublic String getSplitBrainProtectionName()
public DurableExecutorConfig setSplitBrainProtectionName(String splitBrainProtectionName)
splitBrainProtectionName
- the split brain protection namepublic boolean isStatisticsEnabled()
true
if statistics gathering is enabled
on the executor task (default), false
otherwisepublic DurableExecutorConfig setStatisticsEnabled(boolean statisticsEnabled)
statisticsEnabled
- true
if statistics
gathering is enabled on the executor task, false
otherwise @return this executor config instancepublic int getFactoryId()
IdentifiedDataSerializable
getFactoryId
in interface IdentifiedDataSerializable
public int getClassId()
IdentifiedDataSerializable
getClassId
in interface IdentifiedDataSerializable
public void writeData(ObjectDataOutput out) throws IOException
DataSerializable
writeData
in interface DataSerializable
out
- outputIOException
- if an I/O error occurs. In particular,
an IOException
may be thrown if the
output stream has been closed.public void readData(ObjectDataInput in) throws IOException
DataSerializable
readData
in interface DataSerializable
in
- inputIOException
- if an I/O error occurs. In particular,
an IOException
may be thrown if the
input stream has been closed.Copyright © 2023 Hazelcast, Inc.. All rights reserved.