Package org.elasticsearch.index.shard
Class ReplicationGroup
- java.lang.Object
-
- org.elasticsearch.index.shard.ReplicationGroup
-
public class ReplicationGroup extends java.lang.ObjectReplication group for a shard. Used by a primary shard to coordinate replication and recoveries.
-
-
Constructor Summary
Constructors Constructor Description ReplicationGroup(IndexShardRoutingTable routingTable, java.util.Set<java.lang.String> inSyncAllocationIds, java.util.Set<java.lang.String> trackedAllocationIds)
-
Method Summary
Modifier and Type Method Description booleanequals(java.lang.Object o)java.util.Set<java.lang.String>getInSyncAllocationIds()java.util.List<ShardRouting>getReplicationTargets()Returns the subset of shards in the routing table that should be replicated to.IndexShardRoutingTablegetRoutingTable()java.util.List<ShardRouting>getSkippedShards()Returns the subset of shards in the routing table that are unassigned or initializing and not ready yet to receive operations (i.e.java.util.Set<java.lang.String>getUnavailableInSyncShards()Returns the set of shard allocation ids that are in the in-sync set but have no assigned routing entryinthashCode()java.lang.StringtoString()
-
-
-
Constructor Detail
-
ReplicationGroup
public ReplicationGroup(IndexShardRoutingTable routingTable, java.util.Set<java.lang.String> inSyncAllocationIds, java.util.Set<java.lang.String> trackedAllocationIds)
-
-
Method Detail
-
getRoutingTable
public IndexShardRoutingTable getRoutingTable()
-
getInSyncAllocationIds
public java.util.Set<java.lang.String> getInSyncAllocationIds()
-
getUnavailableInSyncShards
public java.util.Set<java.lang.String> getUnavailableInSyncShards()
Returns the set of shard allocation ids that are in the in-sync set but have no assigned routing entry
-
getReplicationTargets
public java.util.List<ShardRouting> getReplicationTargets()
Returns the subset of shards in the routing table that should be replicated to. Includes relocation targets.
-
getSkippedShards
public java.util.List<ShardRouting> getSkippedShards()
Returns the subset of shards in the routing table that are unassigned or initializing and not ready yet to receive operations (i.e. engine not opened yet). Includes relocation targets.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-