org.apache.solr.common.cloud
Class DocCollection

java.lang.Object
  extended by org.apache.solr.common.cloud.ZkNodeProps
      extended by org.apache.solr.common.cloud.DocCollection
All Implemented Interfaces:
org.noggit.JSONWriter.Writable

public class DocCollection
extends ZkNodeProps

Models a Collection in zookeeper (but that Java name is obviously taken, hence "DocCollection")


Field Summary
static String DOC_ROUTER
           
static String SHARDS
           
 
Fields inherited from class org.apache.solr.common.cloud.ZkNodeProps
propMap
 
Constructor Summary
DocCollection(String name, Map<String,Slice> slices, Map<String,Object> props, DocRouter router)
           
 
Method Summary
 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.
 String getName()
          Return collection name.
 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.
 String toString()
           
 void write(org.noggit.JSONWriter jsonWriter)
           
 
Methods inherited from class org.apache.solr.common.cloud.ZkNodeProps
containsKey, fromKeyVals, get, getBool, getInt, getProperties, getStr, getStr, keySet, load, makeMap, shallowCopy
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DOC_ROUTER

public static final String DOC_ROUTER
See Also:
Constant Field Values

SHARDS

public static final String SHARDS
See Also:
Constant Field Values
Constructor Detail

DocCollection

public DocCollection(String name,
                     Map<String,Slice> slices,
                     Map<String,Object> props,
                     DocRouter router)
Parameters:
name - The name of the collection
slices - 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.
Method Detail

getName

public String getName()
Return collection name.


getSlice

public Slice getSlice(String sliceName)

getSlices

public Collection<Slice> getSlices()
Gets the list of all slices for this collection.


getActiveSlices

public Collection<Slice> getActiveSlices()
Return the list of active slices for this collection.


getSlicesMap

public Map<String,Slice> getSlicesMap()
Get the map of all slices (sliceName->Slice) for this collection.


getActiveSlicesMap

public Map<String,Slice> getActiveSlicesMap()
Get the map of active slices (sliceName->Slice) for this collection.


getRouter

public DocRouter getRouter()

toString

public String toString()
Overrides:
toString in class ZkNodeProps

write

public void write(org.noggit.JSONWriter jsonWriter)
Specified by:
write in interface org.noggit.JSONWriter.Writable
Overrides:
write in class ZkNodeProps


Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.