Writeable.Reader<V>, Writeable.Writer<V>| Modifier and Type | Field | Description |
|---|---|---|
static ActiveShardCount |
ALL |
|
static ActiveShardCount |
DEFAULT |
|
static ActiveShardCount |
NONE |
|
static ActiveShardCount |
ONE |
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
enoughShardsActive(int activeShardCount) |
Returns true iff the given number of active shards is enough to meet
the required shard count represented by this instance.
|
boolean |
enoughShardsActive(ClusterState clusterState,
java.lang.String... indices) |
Returns true iff the given cluster state's routing table contains enough active
shards for the given indices to meet the required shard count represented by this instance.
|
boolean |
enoughShardsActive(IndexShardRoutingTable shardRoutingTable) |
Returns true iff the active shard count in the shard routing table is enough
to meet the required shard count represented by this instance.
|
boolean |
equals(java.lang.Object o) |
|
static ActiveShardCount |
from(int value) |
Get an ActiveShardCount instance for the given value.
|
int |
hashCode() |
|
static ActiveShardCount |
parseString(java.lang.String str) |
Parses the active shard count from the given string.
|
static ActiveShardCount |
readFrom(StreamInput in) |
|
java.lang.String |
toString() |
|
boolean |
validate(int numberOfReplicas) |
Validates that the instance is valid for the given number of replicas in an index.
|
void |
writeTo(StreamOutput out) |
Write this into the StreamOutput.
|
public static final ActiveShardCount DEFAULT
public static final ActiveShardCount ALL
public static final ActiveShardCount NONE
public static final ActiveShardCount ONE
public static ActiveShardCount from(int value)
DEFAULT for the
default value (which is one shard copy) or ALL to specify all the shards.public boolean validate(int numberOfReplicas)
public void writeTo(StreamOutput out) throws java.io.IOException
Writeablepublic static ActiveShardCount readFrom(StreamInput in) throws java.io.IOException
java.io.IOExceptionpublic static ActiveShardCount parseString(java.lang.String str)
public boolean enoughShardsActive(int activeShardCount)
ActiveShardCount objects created
from from(int), or NONE or ONE.public boolean enoughShardsActive(ClusterState clusterState, java.lang.String... indices)
public boolean enoughShardsActive(IndexShardRoutingTable shardRoutingTable)
public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object