public class Slice extends ZkNodeProps
Modifier and Type | Field and Description |
---|---|
static String |
LEADER |
static String |
RANGE |
static String |
REPLICAS |
propMap
Constructor and Description |
---|
Slice(String name,
Map<String,Replica> replicas,
Map<String,Object> props) |
Modifier and Type | Method and Description |
---|---|
Replica |
getLeader() |
String |
getName()
Return slice name (shard id).
|
DocRouter.Range |
getRange() |
Replica |
getReplica(String replicaName) |
Collection<Replica> |
getReplicas()
Gets the list of replicas for this slice.
|
Map<String,Replica> |
getReplicasCopy() |
Map<String,Replica> |
getReplicasMap()
Get the map of coreNodeName to replicas for this slice.
|
String |
toString() |
void |
write(JSONWriter jsonWriter) |
containsKey, fromKeyVals, get, getProperties, getStr, keySet, load, makeMap, shallowCopy
public static String REPLICAS
public static String RANGE
public static String LEADER
public Slice(String name, Map<String,Replica> replicas, Map<String,Object> props)
name
- The name of the slicereplicas
- The replicas of the slice. This is used directly and a copy is not made. If null, replicas will be constructed from props.props
- The properties of the slice - a shallow copy will always be made.public String getName()
public Collection<Replica> getReplicas()
public Map<String,Replica> getReplicasMap()
public Replica getLeader()
public DocRouter.Range getRange()
public String toString()
toString
in class ZkNodeProps
public void write(JSONWriter jsonWriter)
write
in interface JSONWriter.Writable
write
in class ZkNodeProps
Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.