## org.apache.solr.common.cloud
Class ZkNodeProps

    java.lang.Object
      org.apache.solr.common.cloud.ZkNodeProps

All Implemented Interfaces:
  JSONWriter.Writable

Direct Known Subclasses:
  Replica, Slice

    public class ZkNodeProps

extends Object
implements JSONWriter.Writable

ZkNodeProps contains generic immutable properties.

Field Summary
`protected Map<String,Object>` `propMap`

Constructor Summary
`ZkNodeProps(Map<String,Object> propMap)` Construct ZKNodeProps from map.
`ZkNodeProps(String... keyVals)` Constructor that populates the from array of Strings in form key1, value1, key2, value2, ..., keyN, valueN

Method Summary
`boolean` `containsKey(String key)` Check if property key exists.
`static ZkNodeProps` `fromKeyVals(Object... keyVals)`
`Object` `get(String key)`
`Map<String,Object>` `getProperties()` Get all properties as map.
`String` `getStr(String key)` Get a string property value.
`Set<String>` `keySet()` Get property keys.
`static ZkNodeProps` `load(byte[] bytes)` Create Replica from json string that is typically stored in zookeeper.
`static Map<String,Object>` `makeMap(Object... keyVals)`
`Map<String,Object>` `shallowCopy()` Returns a shallow writable copy of the properties
`String` `toString()`
`void` `write(JSONWriter jsonWriter)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### propMap

    protected final Map<String,Object> propMap

Constructor Detail

### ZkNodeProps

    public ZkNodeProps(Map<String,Object> propMap)

  Construct ZKNodeProps from map.

### ZkNodeProps

    public ZkNodeProps(String... keyVals)

  Constructor that populates the from array of Strings in form key1, value1, key2, value2, ..., keyN, valueN

Method Detail

### fromKeyVals

    public static ZkNodeProps fromKeyVals(Object... keyVals)

### makeMap

    public static Map<String,Object> makeMap(Object... keyVals)

### keySet

    public Set<String> keySet()

  Get property keys.

### getProperties

    public Map<String,Object> getProperties()

  Get all properties as map.

### shallowCopy

    public Map<String,Object> shallowCopy()

  Returns a shallow writable copy of the properties

### load

    public static ZkNodeProps load(byte[] bytes)

  Create Replica from json string that is typically stored in zookeeper.

### write

    public void write(JSONWriter jsonWriter)

  Specified by:
    `write` in interface `JSONWriter.Writable`

### getStr

    public String getStr(String key)

  Get a string property value.

### get

    public Object get(String key)

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

### containsKey

    public boolean containsKey(String key)

  Check if property key exists.