remove the unused node visitor
This commit is contained in:
@@ -28,10 +28,6 @@ public class PersistentMap<K, V> {
|
||||
void visit(PersistentMapDiskNode node, PersistentMapDiskNode parentNode, NodeEntry nodeEntry, int depth);
|
||||
}
|
||||
|
||||
interface NodeVisitorCallback {
|
||||
void visit(PersistentMapDiskNode node, int depth);
|
||||
}
|
||||
|
||||
public interface EncoderDecoder<O> {
|
||||
public byte[] encode(O object);
|
||||
|
||||
@@ -309,24 +305,6 @@ public class PersistentMap<K, V> {
|
||||
}
|
||||
}
|
||||
|
||||
public void visitNodesPreOrder(final NodeVisitorCallback visitor) throws IOException {
|
||||
final long rootNodeOffset = readNodeOffsetOfRootNode();
|
||||
visitNodesPreOrderRecursively(rootNodeOffset, visitor, 0);
|
||||
}
|
||||
|
||||
private void visitNodesPreOrderRecursively(final long nodeOffset, final NodeVisitorCallback visitor,
|
||||
final int depth) throws IOException {
|
||||
final PersistentMapDiskNode node = getNode(nodeOffset);
|
||||
|
||||
visitor.visit(node, depth);
|
||||
for (final NodeEntry child : node.getEntries()) {
|
||||
if (child.isInnerNode()) {
|
||||
final long childNodeOffset = VariableByteEncoder.decodeFirstValue(child.getValue());
|
||||
visitNodesPreOrderRecursively(childNodeOffset, visitor, depth + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private long readNodeOffsetOfRootNode() throws IOException {
|
||||
final DiskBlock diskBlock = diskStore.getDiskBlock(NODE_OFFSET_TO_ROOT_NODE, diskStore.minAllocationSize());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user