Package org.apache.solr.common.cloud
Class PerReplicaStates
- java.lang.Object
- 
- org.apache.solr.common.cloud.PerReplicaStates
 
- 
- All Implemented Interfaces:
- MapSerializable,- MapWriter,- NavigableObject,- ReflectMapWriter
 
 public class PerReplicaStates extends Object implements ReflectMapWriter This represents the individual replica states in a collection This is an immutable object. When states are modified, a new instance is constructed
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classPerReplicaStates.Operationstatic classPerReplicaStates.StateThe state of a replica as stored as a node under /collections/collection-name/state.json/replica-state- 
Nested classes/interfaces inherited from interface org.apache.solr.common.MapWriterMapWriter.EntryWriter
 
- 
 - 
Field SummaryFields Modifier and Type Field Description intcversionstatic intMAX_RETRIESStringpathstatic charSEPARATORSimpleMap<PerReplicaStates.State>states
 - 
Constructor SummaryConstructors Constructor Description PerReplicaStates(String path, int cversion, List<String> states)Construct with data read from ZK
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanallActive()Check and return if all replicas are ACTIVEstatic Set<String>findModifiedReplicas(PerReplicaStates old, PerReplicaStates fresh)Get the changed replicasPerReplicaStates.Stateget(String replica)static StringgetReplicaName(String s)StringtoString()voidwriteMap(MapWriter.EntryWriter ew)- 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 - 
Methods inherited from interface org.apache.solr.common.NavigableObject_forEachEntry, _forEachEntry, _forEachEntry, _get, _get, _getStr, _getStr, _size
 
- 
 
- 
- 
- 
Field Detail- 
SEPARATORpublic static final char SEPARATOR - See Also:
- Constant Field Values
 
 - 
MAX_RETRIESpublic static final int MAX_RETRIES - See Also:
- Constant Field Values
 
 - 
pathpublic final String path 
 - 
cversionpublic final int cversion 
 - 
statespublic final SimpleMap<PerReplicaStates.State> states 
 
- 
 - 
Method Detail- 
allActivepublic boolean allActive() Check and return if all replicas are ACTIVE
 - 
findModifiedReplicaspublic static Set<String> findModifiedReplicas(PerReplicaStates old, PerReplicaStates fresh) Get the changed replicas
 - 
getpublic PerReplicaStates.State get(String replica) 
 - 
writeMappublic void writeMap(MapWriter.EntryWriter ew) throws IOException - Specified by:
- writeMapin interface- MapWriter
- Specified by:
- writeMapin interface- ReflectMapWriter
- Throws:
- IOException
 
 
- 
 
-