Class ItemTreeBuilder
- java.lang.Object
-
- org.openjdk.jmc.flightrecorder.rules.tree.ItemTreeBuilder
-
public class ItemTreeBuilder extends Object
Helper for building item trees.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
ItemTreeBuilder.IItemTreeBuilderCallback
Interface used to allow interrupting slow builds of encapsulation trees.
-
Constructor Summary
Constructors Constructor Description ItemTreeBuilder()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ITreeNode<IItem>
buildEncapsulationTree(IItemCollection items, boolean allowInstants)
Builds a tree where events that wrap other events, time wise, are higher up in the hierarchy.static ITreeNode<IItem>
buildEncapsulationTree(IItemCollection items, boolean allowInstants, boolean ignoreThread)
Builds a tree where events that wrap other events, time wise, are higher up in the hierarchy.static ITreeNode<IItem>
buildEncapsulationTree(IItemCollection items, boolean allowInstants, boolean ignoreThread, ItemTreeBuilder.IItemTreeBuilderCallback callback)
Builds a tree where events that wrap other events, time wise, are higher up in the hierarchy.
-
-
-
Method Detail
-
buildEncapsulationTree
public static ITreeNode<IItem> buildEncapsulationTree(IItemCollection items, boolean allowInstants)
Builds a tree where events that wrap other events, time wise, are higher up in the hierarchy.- Parameters:
items
- the items to build a tree fromallowInstants
-true
to allow instant events in the resulting tree- Returns:
- the root node for the resulting tree
-
buildEncapsulationTree
public static ITreeNode<IItem> buildEncapsulationTree(IItemCollection items, boolean allowInstants, boolean ignoreThread)
Builds a tree where events that wrap other events, time wise, are higher up in the hierarchy.- Parameters:
items
- the items to build a tree fromallowInstants
-true
to allow instant events in the resulting treeignoreThread
-true
to make the algorithm not care about event thread, can be used for VM level events. It's up to the caller to make sure this is safe to do.- Returns:
- the root node for the resulting tree.
-
buildEncapsulationTree
public static ITreeNode<IItem> buildEncapsulationTree(IItemCollection items, boolean allowInstants, boolean ignoreThread, ItemTreeBuilder.IItemTreeBuilderCallback callback)
Builds a tree where events that wrap other events, time wise, are higher up in the hierarchy.- Parameters:
items
- the items to build a tree fromallowInstants
-true
to allow instant events in the resulting treeignoreThread
-true
to make the algorithm not care about event thread, can be used for VM level events. It's up to the caller to make sure this is safe to do.callback
- callback used to determine whether or not to continue building the encapsulation tree- Returns:
- the root node for the resulting tree.
-
-