public class Slice extends ZkNodeProps
| Modifier and Type | Field and Description |
|---|---|
static String |
ACTIVE |
static String |
CONSTRUCTION |
static String |
INACTIVE |
static String |
LEADER |
static String |
PARENT |
static String |
RANGE |
static String |
RECOVERY |
static String |
REPLICAS |
static String |
STATE |
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).
|
String |
getParent() |
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 |
getState() |
String |
toString() |
void |
write(org.noggit.JSONWriter jsonWriter) |
containsKey, fromKeyVals, get, getInt, getProperties, getStr, getStr, keySet, load, makeMap, shallowCopypublic static String REPLICAS
public static String RANGE
public static String STATE
public static String LEADER
public static String ACTIVE
public static String INACTIVE
public static String CONSTRUCTION
public static String RECOVERY
public static String PARENT
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 getState()
public String getParent()
public String toString()
toString in class ZkNodePropspublic void write(org.noggit.JSONWriter jsonWriter)
write in interface org.noggit.JSONWriter.Writablewrite in class ZkNodePropsCopyright © 2000-2013 Apache Software Foundation. All Rights Reserved.