Modifier and Type | Field and Description |
---|---|
StatPersisted |
stat
the stat for this node that is persisted to disk.
|
Constructor and Description |
---|
DataNode(byte[] data,
Long acl,
StatPersisted stat)
create a DataNode with parent, data, acls and stat
|
Modifier and Type | Method and Description |
---|---|
boolean |
addChild(String child)
Method that inserts a child into the children set
|
void |
copyStat(Stat to) |
void |
deserialize(InputArchive archive,
String tag) |
Set<String> |
getChildren()
convenience methods to get the children
|
byte[] |
getData() |
long |
getDigest() |
boolean |
isDigestCached() |
boolean |
removeChild(String child)
Method that removes a child from the children set
|
void |
serialize(OutputArchive archive,
String tag) |
void |
setChildren(HashSet<String> children)
convenience method for setting the children for this datanode
|
void |
setDigest(long digest) |
void |
setDigestCached(boolean digestCached) |
public StatPersisted stat
public DataNode(byte[] data, Long acl, StatPersisted stat)
data
- the data to be setacl
- the acls for this nodestat
- the stat for this node.public boolean addChild(String child)
child
- to be insertedpublic boolean removeChild(String child)
child
- public void setChildren(HashSet<String> children)
children
- public Set<String> getChildren()
public void copyStat(Stat to)
public void deserialize(InputArchive archive, String tag) throws IOException
deserialize
in interface Record
IOException
public void serialize(OutputArchive archive, String tag) throws IOException
serialize
in interface Record
IOException
public boolean isDigestCached()
public void setDigestCached(boolean digestCached)
public long getDigest()
public void setDigest(long digest)
public byte[] getData()
Copyright © 2008–2021 The Apache Software Foundation. All rights reserved.