public class NodeAllocationResult extends java.lang.Object implements ToXContent, Writeable, java.lang.Comparable<NodeAllocationResult>
| Modifier and Type | Class and Description |
|---|---|
static class |
NodeAllocationResult.ShardStoreInfo
A class that captures metadata about a shard store on a node.
|
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsWriteable.Reader<V>, Writeable.Writer<V>EMPTY_PARAMS| Constructor and Description |
|---|
NodeAllocationResult(DiscoveryNode node,
AllocationDecision nodeDecision,
Decision canAllocate,
int weightRanking) |
NodeAllocationResult(DiscoveryNode node,
Decision decision,
int weightRanking) |
NodeAllocationResult(DiscoveryNode node,
NodeAllocationResult.ShardStoreInfo shardStoreInfo,
Decision decision) |
NodeAllocationResult(StreamInput in) |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(NodeAllocationResult other) |
Decision |
getCanAllocateDecision()
The decision details for allocating to this node.
|
DiscoveryNode |
getNode()
Get the node that this decision is for.
|
AllocationDecision |
getNodeDecision()
Gets the
AllocationDecision for allocating to this node. |
NodeAllocationResult.ShardStoreInfo |
getShardStoreInfo()
Get the shard store information for the node, if it exists.
|
int |
getWeightRanking()
The weight ranking for allocating a shard to the node.
|
boolean |
isWeightRanked()
Is the weight assigned for the node?
|
XContentBuilder |
toXContent(XContentBuilder builder,
ToXContent.Params params) |
void |
writeTo(StreamOutput out)
Write this into the StreamOutput.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisFragmentpublic NodeAllocationResult(DiscoveryNode node, NodeAllocationResult.ShardStoreInfo shardStoreInfo, @Nullable Decision decision)
public NodeAllocationResult(DiscoveryNode node, AllocationDecision nodeDecision, Decision canAllocate, int weightRanking)
public NodeAllocationResult(DiscoveryNode node, Decision decision, int weightRanking)
public NodeAllocationResult(StreamInput in) throws java.io.IOException
java.io.IOExceptionpublic void writeTo(StreamOutput out) throws java.io.IOException
Writeablepublic DiscoveryNode getNode()
@Nullable public NodeAllocationResult.ShardStoreInfo getShardStoreInfo()
@Nullable public Decision getCanAllocateDecision()
null if
no allocation decision was taken on the node; in this case, getNodeDecision()
will return AllocationDecision.NO.public boolean isWeightRanked()
public int getWeightRanking()
public AllocationDecision getNodeDecision()
AllocationDecision for allocating to this node.public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
toXContent in interface ToXContentjava.io.IOExceptionpublic int compareTo(NodeAllocationResult other)
compareTo in interface java.lang.Comparable<NodeAllocationResult>