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
EnableAssignmentDecider.Allocation
Modifier and Type | Class | Description |
---|---|---|
static class |
EnableAssignmentDecider.Allocation |
Allocation values or rather their string representation to be used used with
CLUSTER_TASKS_ALLOCATION_ENABLE_SETTING
via cluster settings. |
Modifier and Type | Field | Description |
---|---|---|
static Setting<EnableAssignmentDecider.Allocation> |
CLUSTER_TASKS_ALLOCATION_ENABLE_SETTING |
Constructor | Description |
---|---|
EnableAssignmentDecider(Settings settings,
ClusterSettings clusterSettings) |
Modifier and Type | Method | Description |
---|---|---|
AssignmentDecision |
canAssign() |
Returns a
AssignmentDecision whether the given persistent task can be assigned
to a node of the cluster. |
void |
setEnableAssignment(EnableAssignmentDecider.Allocation enableAssignment) |
public static final Setting<EnableAssignmentDecider.Allocation> CLUSTER_TASKS_ALLOCATION_ENABLE_SETTING
public EnableAssignmentDecider(Settings settings, ClusterSettings clusterSettings)
public void setEnableAssignment(EnableAssignmentDecider.Allocation enableAssignment)
public AssignmentDecision canAssign()
AssignmentDecision
whether the given persistent task can be assigned
to a node of the cluster. The decision depends on the current value of the setting
CLUSTER_TASKS_ALLOCATION_ENABLE_SETTING
.AssignmentDecision