public static enum ScheduledExecutorConfig.CapacityPolicy extends Enum<ScheduledExecutorConfig.CapacityPolicy>
Enum Constant and Description |
---|
PER_NODE
Capacity policy that counts tasks per Hazelcast instance node/member,
and rejects new ones when
ScheduledExecutorConfig.capacity value is reached |
PER_PARTITION
Capacity policy that counts tasks per partition, and rejects new ones when
ScheduledExecutorConfig.capacity value is reached. |
Modifier and Type | Method and Description |
---|---|
static ScheduledExecutorConfig.CapacityPolicy |
getById(byte id) |
byte |
getId() |
static ScheduledExecutorConfig.CapacityPolicy |
valueOf(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.
|
public static final ScheduledExecutorConfig.CapacityPolicy PER_NODE
ScheduledExecutorConfig.capacity
value is reachedpublic static final ScheduledExecutorConfig.CapacityPolicy PER_PARTITION
ScheduledExecutorConfig.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)
public static ScheduledExecutorConfig.CapacityPolicy[] values()
for (ScheduledExecutorConfig.CapacityPolicy c : ScheduledExecutorConfig.CapacityPolicy.values()) System.out.println(c);
public static ScheduledExecutorConfig.CapacityPolicy valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic byte getId()
public static ScheduledExecutorConfig.CapacityPolicy getById(byte id)
Copyright © 2023 Hazelcast, Inc.. All rights reserved.