public class DataNode
extends java.lang.Object
implements org.apache.jute.Record
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.
Modifier and Type | Field and Description |
---|---|
StatPersisted |
stat
the stat for this node that is persisted to disk.
|
Constructor and Description |
---|
DataNode(DataNode parent,
byte[] data,
java.lang.Long acl,
StatPersisted stat)
create a DataNode with parent, data, acls and stat
|
Modifier and Type | Method and Description |
---|---|
boolean |
addChild(java.lang.String child)
Method that inserts a child into the children set
|
void |
copyStat(Stat to) |
void |
deserialize(org.apache.jute.InputArchive archive,
java.lang.String tag) |
java.util.Set<java.lang.String> |
getChildren()
convenience methods to get the children
|
boolean |
removeChild(java.lang.String child)
Method that removes a child from the children set
|
void |
serialize(org.apache.jute.OutputArchive archive,
java.lang.String tag) |
void |
setChildren(java.util.HashSet<java.lang.String> children)
convenience method for setting the children for this datanode
|
public StatPersisted stat
public DataNode(DataNode parent, byte[] data, java.lang.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.public boolean addChild(java.lang.String child)
child
- to be insertedpublic boolean removeChild(java.lang.String child)
child
- public void setChildren(java.util.HashSet<java.lang.String> children)
children
- public java.util.Set<java.lang.String> getChildren()
public void copyStat(Stat to)
public void deserialize(org.apache.jute.InputArchive archive, java.lang.String tag) throws java.io.IOException
deserialize
in interface org.apache.jute.Record
java.io.IOException
public void serialize(org.apache.jute.OutputArchive archive, java.lang.String tag) throws java.io.IOException
serialize
in interface org.apache.jute.Record
java.io.IOException
Copyright © 2012 The Apache Software Foundation