public class ScheduledExecutorConfig extends Object implements IdentifiedDataSerializable, NamedConfig, com.hazelcast.nio.serialization.impl.Versioned
IScheduledExecutorService
.Modifier and Type | Class and Description |
---|---|
static class |
ScheduledExecutorConfig.CapacityPolicy
Capacity policy options
|
Constructor and Description |
---|
ScheduledExecutorConfig() |
ScheduledExecutorConfig(ScheduledExecutorConfig config) |
ScheduledExecutorConfig(String name) |
ScheduledExecutorConfig(String name,
int durability,
int capacity,
int poolSize,
boolean statisticsEnabled) |
ScheduledExecutorConfig(String name,
int durability,
int capacity,
int poolSize,
String splitBrainProtectionName,
MergePolicyConfig mergePolicyConfig,
ScheduledExecutorConfig.CapacityPolicy capacityPolicy,
boolean statisticsEnabled) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
int |
getCapacity()
Gets the capacity of the executor
|
ScheduledExecutorConfig.CapacityPolicy |
getCapacityPolicy() |
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.
|
MergePolicyConfig |
getMergePolicyConfig()
Gets the
MergePolicyConfig for the scheduler. |
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
|
ScheduledExecutorConfig |
setCapacity(int capacity)
Sets the capacity of the executor
The capacity represents the maximum number of tasks that a scheduler can have at any given point in time per partition.
|
ScheduledExecutorConfig |
setCapacityPolicy(ScheduledExecutorConfig.CapacityPolicy capacityPolicy)
Set the capacity policy for the configured capacity value
To prevent any undesirable data-loss, capacity is ignored during partition migrations,
the count is updated accordingly, however the rejection is not enforced.
|
ScheduledExecutorConfig |
setDurability(int durability)
Sets the durability of the executor
The durability represents the number of replicas that exist in a cluster for any given partition-owned task.
|
ScheduledExecutorConfig |
setMergePolicyConfig(MergePolicyConfig mergePolicyConfig)
Sets the
MergePolicyConfig for the scheduler. |
ScheduledExecutorConfig |
setName(String name)
Sets the name of the executor task.
|
ScheduledExecutorConfig |
setPoolSize(int poolSize)
Sets the number of executor threads per member for the executor.
|
ScheduledExecutorConfig |
setSplitBrainProtectionName(String splitBrainProtectionName)
Sets the split brain protection name for operations.
|
ScheduledExecutorConfig |
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 ScheduledExecutorConfig()
public ScheduledExecutorConfig(String name)
public ScheduledExecutorConfig(String name, int durability, int capacity, int poolSize, boolean statisticsEnabled)
public ScheduledExecutorConfig(String name, int durability, int capacity, int poolSize, String splitBrainProtectionName, MergePolicyConfig mergePolicyConfig, ScheduledExecutorConfig.CapacityPolicy capacityPolicy, boolean statisticsEnabled)
public ScheduledExecutorConfig(ScheduledExecutorConfig config)
public String getName()
getName
in interface NamedConfig
public ScheduledExecutorConfig setName(String name)
setName
in interface NamedConfig
name
- the name of the executor taskpublic int getPoolSize()
public ScheduledExecutorConfig setPoolSize(int poolSize)
poolSize
- the number of executor threads per member for the executorpublic int getDurability()
public ScheduledExecutorConfig setDurability(int durability)
durability
- the durability of the executorpublic int getCapacity()
public ScheduledExecutorConfig setCapacity(int capacity)
capacity
- the capacity of the executorpublic ScheduledExecutorConfig.CapacityPolicy getCapacityPolicy()
public ScheduledExecutorConfig setCapacityPolicy(@Nonnull ScheduledExecutorConfig.CapacityPolicy capacityPolicy)
capacityPolicy
- public String getSplitBrainProtectionName()
public ScheduledExecutorConfig setSplitBrainProtectionName(String splitBrainProtectionName)
splitBrainProtectionName
- the split brain protection namepublic MergePolicyConfig getMergePolicyConfig()
MergePolicyConfig
for the scheduler.MergePolicyConfig
for the schedulerpublic ScheduledExecutorConfig setMergePolicyConfig(MergePolicyConfig mergePolicyConfig)
MergePolicyConfig
for the scheduler.public boolean isStatisticsEnabled()
true
if statistics gathering is enabled
on the executor task (default), false
otherwisepublic ScheduledExecutorConfig 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 © 2020 Hazelcast, Inc.. All rights reserved.