public class ExecutorConfig extends Object implements IdentifiedDataSerializable, com.hazelcast.nio.serialization.impl.Versioned
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.
|
String |
getQuorumName()
Returns the quorum 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 |
setQuorumName(String quorumName)
Sets the quorum 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 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 String getQuorumName()
public ExecutorConfig setQuorumName(String quorumName)
quorumName
- the quorum namepublic 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
- 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 © 2018 Hazelcast, Inc.. All rights reserved.