public class ExecutorConfig extends Object implements IdentifiedDataSerializable
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) |
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.
|
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 |
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 ExecutorConfigReadOnly getAsReadOnly()
public String getName()
public ExecutorConfig setName(String name)
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 int getFactoryId()
IdentifiedDataSerializable
getFactoryId
in interface IdentifiedDataSerializable
public int getId()
IdentifiedDataSerializable
getId
in interface IdentifiedDataSerializable
public void writeData(ObjectDataOutput out) throws IOException
DataSerializable
writeData
in interface DataSerializable
out
- outputIOException
public void readData(ObjectDataInput in) throws IOException
DataSerializable
readData
in interface DataSerializable
in
- inputIOException
Copyright © 2017 Hazelcast, Inc.. All Rights Reserved.