Class GridTreePrinter<T>

java.lang.Object
org.apache.ignite.internal.util.lang.GridTreePrinter<T>

public abstract class GridTreePrinter<T> extends Object
Abstract tree structure printer.
  • Constructor Details

    • GridTreePrinter

      public GridTreePrinter()
  • Method Details

    • print

      public void print(T rootNode, Appendable a) throws IOException
      Parameters:
      rootNode - Root tree node.
      a - Output.
      Throws:
      IOException
    • print

      public String print(T rootNode)
      Parameters:
      rootNode - Root tree node.
      Returns:
      String representation of the tree.
    • getChildren

      protected abstract List<T> getChildren(T treeNode)
      Returns list of tree node children.
      Parameters:
      treeNode - The tree node.
      Returns:
      List of children (possibly empty, if it is a leaf page) or null if the node can't be read (e.g., is locked).
    • formatTreeNode

      protected abstract String formatTreeNode(T treeNode)
      Parameters:
      treeNode - Tree node.
      Returns:
      String representation.