Class EnableAssignmentDecider
- java.lang.Object
-
- org.elasticsearch.persistent.decider.EnableAssignmentDecider
-
public class EnableAssignmentDecider extends java.lang.Object
EnableAssignmentDecider
is used to allow/disallow the persistent tasks to be assigned to cluster nodes.Allocation settings can have the following values (non-casesensitive):
-
NONE
- no persistent tasks can be assigned -
ALL
- all persistent tasks can be assigned to nodes
- See Also:
EnableAssignmentDecider.Allocation
-
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
EnableAssignmentDecider.Allocation
Allocation values or rather their string representation to be used used withCLUSTER_TASKS_ALLOCATION_ENABLE_SETTING
via cluster settings.
-
Field Summary
Fields Modifier and Type Field Description static Setting<EnableAssignmentDecider.Allocation>
CLUSTER_TASKS_ALLOCATION_ENABLE_SETTING
-
Constructor Summary
Constructors Constructor Description EnableAssignmentDecider(Settings settings, ClusterSettings clusterSettings)
-
Method Summary
Modifier and Type Method Description AssignmentDecision
canAssign()
Returns aAssignmentDecision
whether the given persistent task can be assigned to a node of the cluster.void
setEnableAssignment(EnableAssignmentDecider.Allocation enableAssignment)
-
-
-
Field Detail
-
CLUSTER_TASKS_ALLOCATION_ENABLE_SETTING
public static final Setting<EnableAssignmentDecider.Allocation> CLUSTER_TASKS_ALLOCATION_ENABLE_SETTING
-
-
Constructor Detail
-
EnableAssignmentDecider
public EnableAssignmentDecider(Settings settings, ClusterSettings clusterSettings)
-
-
Method Detail
-
setEnableAssignment
public void setEnableAssignment(EnableAssignmentDecider.Allocation enableAssignment)
-
canAssign
public AssignmentDecision canAssign()
Returns aAssignmentDecision
whether the given persistent task can be assigned to a node of the cluster. The decision depends on the current value of the settingCLUSTER_TASKS_ALLOCATION_ENABLE_SETTING
.- Returns:
- the
AssignmentDecision
-
-