public class DocCollection extends ZkNodeProps
Modifier and Type | Field and Description |
---|---|
static String |
DOC_ROUTER |
static String |
SHARDS |
propMap
Constructor and Description |
---|
DocCollection(String name,
Map<String,Slice> slices,
Map<String,Object> props,
DocRouter router) |
DocCollection(String name,
Map<String,Slice> slices,
Map<String,Object> props,
DocRouter router,
int zkVersion) |
Modifier and Type | Method and Description |
---|---|
Collection<Slice> |
getActiveSlices()
Return the list of active slices for this collection.
|
Map<String,Slice> |
getActiveSlicesMap()
Get the map of active slices (sliceName->Slice) for this collection.
|
boolean |
getAutoAddReplicas() |
int |
getMaxShardsPerNode() |
String |
getName()
Return collection name.
|
Integer |
getReplicationFactor() |
DocRouter |
getRouter() |
Slice |
getSlice(String sliceName) |
Collection<Slice> |
getSlices()
Gets the list of all slices for this collection.
|
Map<String,Slice> |
getSlicesMap()
Get the map of all slices (sliceName->Slice) for this collection.
|
int |
getVersion() |
String |
toString() |
void |
write(org.noggit.JSONWriter jsonWriter) |
containsKey, fromKeyVals, get, getBool, getInt, getProperties, getStr, getStr, keySet, load, makeMap, shallowCopy
public static final String DOC_ROUTER
public static final String SHARDS
public DocCollection(String name, Map<String,Slice> slices, Map<String,Object> props, DocRouter router)
public DocCollection(String name, Map<String,Slice> slices, Map<String,Object> props, DocRouter router, int zkVersion)
name
- The name of the collectionslices
- The logical shards of the collection. This is used directly and a copy is not made.props
- The properties of the slice. This is used directly and a copy is not made.public String getName()
public Collection<Slice> getSlices()
public Collection<Slice> getActiveSlices()
public Map<String,Slice> getSlicesMap()
public Map<String,Slice> getActiveSlicesMap()
public int getVersion()
public Integer getReplicationFactor()
public boolean getAutoAddReplicas()
public int getMaxShardsPerNode()
public DocRouter getRouter()
public String toString()
toString
in class ZkNodeProps
public void write(org.noggit.JSONWriter jsonWriter)
write
in interface org.noggit.JSONWriter.Writable
write
in class ZkNodeProps
Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.