Package com.hazelcast.config
Enum ScheduledExecutorConfig.CapacityPolicy
- java.lang.Object
-
- java.lang.Enum<ScheduledExecutorConfig.CapacityPolicy>
-
- com.hazelcast.config.ScheduledExecutorConfig.CapacityPolicy
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<ScheduledExecutorConfig.CapacityPolicy>
- Enclosing class:
- ScheduledExecutorConfig
public static enum ScheduledExecutorConfig.CapacityPolicy extends java.lang.Enum<ScheduledExecutorConfig.CapacityPolicy>
Capacity policy options
-
-
Enum Constant Summary
Enum Constants Enum Constant Description PER_NODE
Capacity policy that counts tasks per Hazelcast instance node/member, and rejects new ones whenScheduledExecutorConfig.capacity
value is reachedPER_PARTITION
Capacity policy that counts tasks per partition, and rejects new ones whenScheduledExecutorConfig.capacity
value is reached.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ScheduledExecutorConfig.CapacityPolicy
getById(byte id)
byte
getId()
static ScheduledExecutorConfig.CapacityPolicy
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static ScheduledExecutorConfig.CapacityPolicy[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
PER_NODE
public static final ScheduledExecutorConfig.CapacityPolicy PER_NODE
Capacity policy that counts tasks per Hazelcast instance node/member, and rejects new ones whenScheduledExecutorConfig.capacity
value is reached
-
PER_PARTITION
public static final ScheduledExecutorConfig.CapacityPolicy PER_PARTITION
Capacity policy that counts tasks per partition, and rejects new ones whenScheduledExecutorConfig.capacity
value is reached. Storage size depends on the partition count in a Hazelcast instance. This policy should not be used often. Avoid using this policy with a small cluster: if the cluster is small it will be hosting more partitions, and therefore tasks, than that of a larger cluster. This policy has no effect when scheduling is done using the OnMember APIs eg.IScheduledExecutorService.scheduleOnMember(Runnable, Member, long, TimeUnit)
-
-
Method Detail
-
values
public static ScheduledExecutorConfig.CapacityPolicy[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ScheduledExecutorConfig.CapacityPolicy c : ScheduledExecutorConfig.CapacityPolicy.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ScheduledExecutorConfig.CapacityPolicy valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
getId
public byte getId()
-
getById
public static ScheduledExecutorConfig.CapacityPolicy getById(byte id)
-
-