org.apache.solr.common.cloud
Class ZkNodeProps

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

public class ZkNodeProps
extends Object
implements JSONWriter.Writable

ZkNodeProps contains immutable properties for a shard/solr core.


Constructor Summary
ZkNodeProps(Map<String,String> propMap)
          Construct ZKNodeProps from map.
ZkNodeProps(String... keyVals)
          Constructor that populates the from array of Strings in form key1, value1, key2, value2, ..., keyN, valueN
ZkNodeProps(ZkNodeProps zkNodeProps)
          Construct ZKNodeProps from information of an existingZKNodeProps.
 
Method Summary
 boolean containsKey(String key)
          Check if property key exists.
 String get(String key)
          Get property value.
 Map<String,String> getProperties()
          Get all properties as map.
 Set<String> keySet()
          Get property keys.
static ZkNodeProps load(byte[] bytes)
          Create ZkNodeProps from json string that is typically stored in zookeeper.
 String toString()
           
 void write(JSONWriter jsonWriter)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ZkNodeProps

public ZkNodeProps(Map<String,String> propMap)
Construct ZKNodeProps from map.


ZkNodeProps

public ZkNodeProps(ZkNodeProps zkNodeProps)
Construct ZKNodeProps from information of an existingZKNodeProps.


ZkNodeProps

public ZkNodeProps(String... keyVals)
Constructor that populates the from array of Strings in form key1, value1, key2, value2, ..., keyN, valueN

Method Detail

keySet

public Set<String> keySet()
Get property keys.


getProperties

public Map<String,String> getProperties()
Get all properties as map.


load

public static ZkNodeProps load(byte[] bytes)
Create ZkNodeProps from json string that is typically stored in zookeeper.


write

public void write(JSONWriter jsonWriter)
Specified by:
write in interface JSONWriter.Writable

get

public String get(String key)
Get property value.


toString

public String toString()
Overrides:
toString in class Object

containsKey

public boolean containsKey(String key)
Check if property key exists.



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