public abstract class ZooKeeperObject extends Object
Constructor and Description |
---|
ZooKeeperObject(NodePool nodePool)
Initialize local copy of ZNode data
|
Modifier and Type | Method and Description |
---|---|
void |
createZNode() |
void |
delete()
Delete the associated ZNode
|
boolean |
exists()
Check if the associated ZNode exists
|
Map |
getFromZK()
Get a copy of this object's data from the ZNode
|
String |
getJson() |
String |
getPath() |
String |
getZKID() |
void |
setPath(String path) |
void |
setZKID(String zKID) |
void |
updateFromMap(Map data) |
void |
updateFromZK()
Update this instance from values in the associated ZNode
|
void |
writeToZK() |
public ZooKeeperObject(NodePool nodePool)
nodePool
- associated NodePool clusterpublic String getPath()
public void setPath(String path)
public String getZKID()
public void setZKID(String zKID)
public void updateFromMap(Map data)
public Map getFromZK() throws Exception
Exception
- on ZooKeeper errorpublic final void updateFromZK() throws Exception
Exception
- on ZooKeeper errorpublic String getJson()
public void delete()
Copyright © 2016–2018. All rights reserved.