|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.zookeeper.server.DataNode
public class DataNode
This class contains the data for a node in the data tree.
A data node contains a reference to its parent, a byte array as its data, an array of ACLs, a stat object, and a set of its children's paths.
| Field Summary | |
|---|---|
StatPersisted |
stat
the stat for this node that is persisted to disk. |
| Constructor Summary | |
|---|---|
DataNode(DataNode parent,
byte[] data,
Long acl,
StatPersisted stat)
create a DataNode with parent, data, acls and stat |
|
| Method Summary | |
|---|---|
boolean |
addChild(String child)
Method that inserts a child into the children set |
void |
copyStat(Stat to)
|
void |
deserialize(org.apache.jute.InputArchive archive,
String tag)
|
Set<String> |
getChildren()
convenience methods to get the children |
boolean |
removeChild(String child)
Method that removes a child from the children set |
void |
serialize(org.apache.jute.OutputArchive archive,
String tag)
|
void |
setChildren(HashSet<String> children)
convenience method for setting the children for this datanode |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public StatPersisted stat
| Constructor Detail |
|---|
public DataNode(DataNode parent,
byte[] data,
Long acl,
StatPersisted stat)
parent - the parent of this DataNodedata - the data to be setacl - the acls for this nodestat - the stat for this node.| Method Detail |
|---|
public boolean addChild(String child)
child - to be inserted
public boolean removeChild(String child)
child -
public void setChildren(HashSet<String> children)
children - public Set<String> getChildren()
public void copyStat(Stat to)
public void deserialize(org.apache.jute.InputArchive archive,
String tag)
throws IOException
deserialize in interface org.apache.jute.RecordIOException
public void serialize(org.apache.jute.OutputArchive archive,
String tag)
throws IOException
serialize in interface org.apache.jute.RecordIOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||