Class BreadthFirstTrace

  • All Implemented Interfaces:
    Trace

    public class BreadthFirstTrace
    extends Object
    implements Trace
    A breadth first traversal trace.

    When run this trace performs a breadth first traversal starting from the passed node down to a certain depth. It logs the current depth and the number of traversed nodes as additional context.

    • Constructor Detail

      • BreadthFirstTrace

        public BreadthFirstTrace​(int depth,
                                 @NotNull
                                 @NotNull String path,
                                 @NotNull
                                 @NotNull Consumer<List<String>> context)
        Create a new instance of a breadth first traversal trace.
        Parameters:
        depth - maximal depth of the nodes to traverse
        path - path of the root node where to start traversing
        context - consumer to pass the additional context to
    • Method Detail

      • run

        public void run​(@NotNull
                        @NotNull org.apache.jackrabbit.oak.spi.state.NodeState node)
        Description copied from interface: Trace
        Run this trace on the passed node.
        Specified by:
        run in interface Trace