public class ExecutorConfig extends Object implements IdentifiedDataSerializable, NamedConfig
IExecutorService
.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 and Description |
---|
ExecutorConfig() |
ExecutorConfig(ExecutorConfig config) |
ExecutorConfig(String name) |
ExecutorConfig(String name,
int poolSize) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
int |
getClassId()
Returns type identifier for this class.
|
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.
|
int |
getQueueCapacity()
Gets the queue capacity of the executor task.
|
String |
getSplitBrainProtectionName()
Returns the split brain protection 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 |
setSplitBrainProtectionName(String splitBrainProtectionName)
Sets the split brain protection 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
|
public static final int DEFAULT_POOL_SIZE
public static final int DEFAULT_QUEUE_CAPACITY
public ExecutorConfig()
public ExecutorConfig(String name)
public ExecutorConfig(String name, int poolSize)
public ExecutorConfig(ExecutorConfig config)
public String getName()
getName
in interface NamedConfig
public ExecutorConfig setName(String name)
setName
in interface NamedConfig
name
- the name of the executor taskpublic int getPoolSize()
public ExecutorConfig setPoolSize(int poolSize)
poolSize
- the number of executor threads per member for the executorpublic int getQueueCapacity()
Integer.MAX_VALUE
.Integer.MAX_VALUE
public ExecutorConfig setQueueCapacity(int queueCapacity)
Integer.MAX_VALUE
.queueCapacity
- Queue capacity of the executor task. 0 means Integer.MAX_VALUE
public boolean isStatisticsEnabled()
true
if statistics gathering is enabled on the executor task (default), false
otherwisepublic ExecutorConfig setStatisticsEnabled(boolean statisticsEnabled)
statisticsEnabled
- true
if statistics gathering is enabled on the executor task, false
otherwisepublic String getSplitBrainProtectionName()
public ExecutorConfig setSplitBrainProtectionName(String splitBrainProtectionName)
splitBrainProtectionName
- the split brain protection namepublic 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 © 2020 Hazelcast, Inc.. All rights reserved.