public class AllocationExplanation extends java.lang.Object implements Streamable
AllocationExplanation
consists of a set of per node explanations.
Since AllocationExplanation.NodeExplanation
s are related to shards an AllocationExplanation
maps
a shards id to a set of AllocationExplanation.NodeExplanation
s.Modifier and Type | Class and Description |
---|---|
static class |
AllocationExplanation.NodeExplanation
Instances of this class keep messages and informations about nodes of an allocation
|
Modifier and Type | Field and Description |
---|---|
static AllocationExplanation |
EMPTY |
Constructor and Description |
---|
AllocationExplanation() |
Modifier and Type | Method and Description |
---|---|
AllocationExplanation |
add(ShardId shardId,
AllocationExplanation.NodeExplanation nodeExplanation)
Create and add a node explanation to this explanation referencing a shard
|
java.util.Map<ShardId,java.util.List<AllocationExplanation.NodeExplanation>> |
explanations()
List of explanations involved by this AllocationExplanation
|
static AllocationExplanation |
readAllocationExplanation(StreamInput in)
Read an
AllocationExplanation from an StreamInput |
void |
readFrom(StreamInput in)
Set this object's fields from a StreamInput.
|
void |
writeTo(StreamOutput out)
Write this object's fields to a StreamOutput.
|
public static final AllocationExplanation EMPTY
public AllocationExplanation add(ShardId shardId, AllocationExplanation.NodeExplanation nodeExplanation)
shardId
- id the of the referenced shardnodeExplanation
- Explanation itselfpublic java.util.Map<ShardId,java.util.List<AllocationExplanation.NodeExplanation>> explanations()
public static AllocationExplanation readAllocationExplanation(StreamInput in) throws java.io.IOException
AllocationExplanation
from an StreamInput
in
- StreamInput
to read fromAllocationExplanation
read from the streamjava.io.IOException
- if something bad happened while readingpublic void readFrom(StreamInput in) throws java.io.IOException
Streamable
readFrom
in interface Streamable
java.io.IOException
public void writeTo(StreamOutput out) throws java.io.IOException
Streamable
writeTo
in interface Streamable
java.io.IOException