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
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceJSON properties related to a replica's state.static enumThe replica's state.static enumNested classes/interfaces inherited from interface org.apache.solr.common.MapWriter
MapWriter.EntryWriter -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal Stringfinal Stringfinal Stringfinal Stringfinal Stringfinal Replica.TypeFields inherited from class org.apache.solr.common.cloud.ZkNodeProps
propMap -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()copyWith(PerReplicaStates.State state) copyWith(Replica.State state) booleanSolrCore name.getName()Also known as coreNodeName.The name of the node this replica resides onGet all properties as map.getProperty(String propertyName) getShard()getState()Returns theReplica.Stateof this replica.static Replica.StategetType()inthashCode()booleanbooleanisLeader()voidsetState(Replica.State state) Deprecated.toString()voidMethods inherited from class org.apache.solr.common.cloud.ZkNodeProps
containsKey, fromKeyVals, get, getBool, getInt, getStr, getStr, keySet, load, plus, plus, shallowCopyMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.solr.common.NavigableObject
_forEachEntry, _forEachEntry, _forEachEntry, _get, _get, _get, _getStr, _getStr, _getStr, _size
-
Field Details
-
name
-
node
-
core
-
type
-
shard
-
collection
-
-
Constructor Details
-
Replica
-
Replica
public Replica(String name, String node, String collection, String shard, String core, Replica.State state, Replica.Type type, Map<String, Object> props) -
Replica
This constructor uses a map with one key (coreNode name) and a value that is a map containing all replica properties.- Parameters:
nestedMap- nested map containing replica properties
-
-
Method Details
-
getCollection
-
getShard
-
getProperties
Description copied from class:ZkNodePropsGet all properties as map.- Overrides:
getPropertiesin classZkNodeProps
-
equals
- Overrides:
equalsin classZkNodeProps
-
hashCode
public int hashCode()- Overrides:
hashCodein classZkNodeProps
-
getName
Also known as coreNodeName. -
getCoreUrl
-
getBaseUrl
-
getCoreName
SolrCore name. -
getNodeName
The name of the node this replica resides on -
getState
Returns theReplica.Stateof this replica. -
setState
Deprecated. -
isActive
-
getType
-
isLeader
public boolean isLeader() -
get
-
getProperty
-
copyWith
-
copyWith
-
getReplicaState
-
clone
-
getState
-
writeMap
- Specified by:
writeMapin interfaceMapWriter- Overrides:
writeMapin classZkNodeProps- Throws:
IOException
-
toString
- Overrides:
toStringin classZkNodeProps
-
toFullProps
-