Package org.apache.solr.common.cloud
Class Replica
- java.lang.Object
- 
- org.apache.solr.common.cloud.ZkNodeProps
- 
- org.apache.solr.common.cloud.Replica
 
 
- 
- All Implemented Interfaces:
- MapSerializable,- MapWriter,- NavigableObject,- org.noggit.JSONWriter.Writable
 
 public class Replica extends ZkNodeProps implements MapWriter 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static interfaceReplica.ReplicaStatePropsJSON properties related to a replica's state.static classReplica.StateThe replica's state.static classReplica.Type- 
Nested classes/interfaces inherited from interface org.apache.solr.common.MapWriterMapWriter.EntryWriter
 
- 
 - 
Constructor SummaryConstructors Constructor Description Replica(String name, String node, String collection, String shard, String core, Replica.State state, Replica.Type type, Map<String,Object> props)Replica(String name, Map<String,Object> map, String collection, String shard)Replica(Map<String,Object> nestedMap)This constructor uses a map with one key (coreNode name) and a value that is a map containing all replica properties.
 - 
Method Summary- 
Methods inherited from class org.apache.solr.common.cloud.ZkNodePropscontainsKey, fromKeyVals, get, getBool, getInt, getStr, getStr, keySet, load, plus, plus, shallowCopy
 - 
Methods inherited from class java.lang.Objectfinalize, getClass, notify, notifyAll, wait, wait, wait
 - 
Methods inherited from interface org.apache.solr.common.NavigableObject_forEachEntry, _forEachEntry, _forEachEntry, _get, _get, _getStr, _getStr, _size
 
- 
 
- 
- 
- 
Constructor Detail- 
Replicapublic Replica(String name, String node, String collection, String shard, String core, Replica.State state, Replica.Type type, Map<String,Object> props) 
 
- 
 - 
Method Detail- 
getCollectionpublic String getCollection() 
 - 
getShardpublic String getShard() 
 - 
getPropertiespublic Map<String,Object> getProperties() Description copied from class:ZkNodePropsGet all properties as map.- Overrides:
- getPropertiesin class- ZkNodeProps
 
 - 
equalspublic boolean equals(Object o) - Overrides:
- equalsin class- ZkNodeProps
 
 - 
hashCodepublic int hashCode() - Overrides:
- hashCodein class- ZkNodeProps
 
 - 
getNamepublic String getName() Also known as coreNodeName.
 - 
getCoreUrlpublic String getCoreUrl() 
 - 
getBaseUrlpublic String getBaseUrl() 
 - 
getCoreNamepublic String getCoreName() SolrCore name.
 - 
getNodeNamepublic String getNodeName() The name of the node this replica resides on
 - 
getStatepublic Replica.State getState() Returns theReplica.Stateof this replica.
 - 
setState@Deprecated public void setState(Replica.State state) Deprecated.
 - 
getTypepublic Replica.Type getType() 
 - 
isLeaderpublic boolean isLeader() 
 - 
copyWithpublic Replica copyWith(PerReplicaStates.State state) 
 - 
copyWithpublic Replica copyWith(Replica.State state) 
 - 
getReplicaStatepublic PerReplicaStates.State getReplicaState() 
 - 
getStatepublic static Replica.State getState(String shortName) 
 - 
writeMappublic void writeMap(MapWriter.EntryWriter ew) throws IOException - Specified by:
- writeMapin interface- MapWriter
- Overrides:
- writeMapin class- ZkNodeProps
- Throws:
- IOException
 
 - 
toStringpublic String toString() - Overrides:
- toStringin class- ZkNodeProps
 
 - 
toFullPropspublic ZkNodeProps toFullProps() 
 
- 
 
-