public class ClusterAllocationExplainRequest extends MasterNodeRequest<ClusterAllocationExplainRequest>
TransportRequest.Empty
DEFAULT_MASTER_NODE_TIMEOUT, masterNodeTimeout
Constructor and Description |
---|
ClusterAllocationExplainRequest()
Explain the first unassigned shard
|
ClusterAllocationExplainRequest(java.lang.String index,
int shard,
boolean primary)
Create a new allocation explain request.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getIndex() |
java.lang.Integer |
getShard() |
boolean |
includeYesDecisions()
Returns true if all decisions should be included.
|
void |
includeYesDecisions(boolean includeYesDecisions) |
java.lang.Boolean |
isPrimary() |
static ClusterAllocationExplainRequest |
parse(XContentParser parser) |
void |
readFrom(StreamInput in)
Set this object's fields from a StreamInput.
|
ClusterAllocationExplainRequest |
setIndex(java.lang.String index) |
ClusterAllocationExplainRequest |
setPrimary(java.lang.Boolean primary) |
ClusterAllocationExplainRequest |
setShard(java.lang.Integer shard) |
java.lang.String |
toString() |
boolean |
useAnyUnassignedShard()
Returns
true iff the first unassigned shard is to be used |
ActionRequestValidationException |
validate() |
void |
writeTo(StreamOutput out)
Write this object's fields to a StreamOutput.
|
masterNodeTimeout, masterNodeTimeout, masterNodeTimeout
createTask, createTask, setParentTask
getDescription
remoteAddress, remoteAddress
public ClusterAllocationExplainRequest()
public ClusterAllocationExplainRequest(java.lang.String index, int shard, boolean primary)
primary
is false, the first unassigned replica
will be picked for explanation. If no replicas are unassigned, the first assigned replica will
be explained.public ActionRequestValidationException validate()
validate
in class ActionRequest<ClusterAllocationExplainRequest>
public boolean useAnyUnassignedShard()
true
iff the first unassigned shard is to be usedpublic ClusterAllocationExplainRequest setIndex(java.lang.String index)
@Nullable public java.lang.String getIndex()
public ClusterAllocationExplainRequest setShard(java.lang.Integer shard)
@Nullable public java.lang.Integer getShard()
public ClusterAllocationExplainRequest setPrimary(java.lang.Boolean primary)
@Nullable public java.lang.Boolean isPrimary()
public void includeYesDecisions(boolean includeYesDecisions)
public boolean includeYesDecisions()
public java.lang.String toString()
toString
in class java.lang.Object
public static ClusterAllocationExplainRequest parse(XContentParser parser) throws java.io.IOException
java.io.IOException
public void readFrom(StreamInput in) throws java.io.IOException
Streamable
readFrom
in interface Streamable
readFrom
in class MasterNodeRequest<ClusterAllocationExplainRequest>
java.io.IOException
public void writeTo(StreamOutput out) throws java.io.IOException
Streamable
writeTo
in interface Streamable
writeTo
in class MasterNodeRequest<ClusterAllocationExplainRequest>
java.io.IOException