net.sf.infrared.agent
Class AggregateOperationTree

java.lang.Object
  extended bynet.sf.infrared.agent.AggregateOperationTree
All Implemented Interfaces:
Serializable

public class AggregateOperationTree
extends Object
implements Serializable

This class is used to keep track of the aggregate execution times of a given operation. Each API executed as part of the operation is represented using an AggregateApiTime object, and these are linked to form a tree representing the entire operation.

See Also:
Serialized Form

Constructor Summary
AggregateOperationTree()
          for cator mapping
AggregateOperationTree(AggregateOperationTree other)
           
AggregateOperationTree(AggregateOperationTree other, IdMapper idMapper)
          Constructs a new AggregateOperationTree object for the operation represented by the given OperationTree.
AggregateOperationTree(OperationTree someTree)
          Constructs a new AggregateOperationTree object for the operation represented by the given OperationTree.
AggregateOperationTree(OperationTree someTree, boolean lastInvocations)
           
AggregateOperationTree(TreeNode root)
           
 
Method Summary
 boolean contains(String api)
           
 AggregateOperationTree deepCopy()
          Make a copy of the operation tree
 TreeNode getHead()
          Gets the TreeNode representing the API from which this operation started
 int getNoOfSqlCalls()
           
 String getOperationName()
          Gets the name of the operation represented by this AggregateOperationTree
 void merge(AggregateOperationTree operationTreeToMerge)
           
 void merge(AggregateOperationTree treeToMerge, IdMapper idMapper)
           
 void mergeSubTrees(AggregateOperationTree[] extractedUniqueTrees)
           
 void mergeSubTrees(AggregateOperationTree[] extractedUniqueTrees, IdMapper idMapper)
           
 void mergeSubTreesRecursively(List subTrees, TreeNode mergedTree, IdMapper idMapper)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AggregateOperationTree

public AggregateOperationTree()
for cator mapping


AggregateOperationTree

public AggregateOperationTree(OperationTree someTree)
Constructs a new AggregateOperationTree object for the operation represented by the given OperationTree. AggregateApiTime objects corresponding to the given OperationTree's nodes (which are ApiTime objects) are created and linked together to form the AggregateOperationTree.

Parameters:
someTree -

AggregateOperationTree

public AggregateOperationTree(OperationTree someTree,
                              boolean lastInvocations)

AggregateOperationTree

public AggregateOperationTree(AggregateOperationTree other,
                              IdMapper idMapper)
Constructs a new AggregateOperationTree object for the operation represented by the given OperationTree. AggregateApiTime objects corresponding to the given OperationTree's nodes (which are ApiTime objects) are created and linked together to form the AggregateOperationTree.

Parameters:
other -

AggregateOperationTree

public AggregateOperationTree(AggregateOperationTree other)

AggregateOperationTree

public AggregateOperationTree(TreeNode root)
Method Detail

merge

public void merge(AggregateOperationTree treeToMerge,
                  IdMapper idMapper)

mergeSubTrees

public void mergeSubTrees(AggregateOperationTree[] extractedUniqueTrees)

mergeSubTrees

public void mergeSubTrees(AggregateOperationTree[] extractedUniqueTrees,
                          IdMapper idMapper)

mergeSubTreesRecursively

public void mergeSubTreesRecursively(List subTrees,
                                     TreeNode mergedTree,
                                     IdMapper idMapper)

merge

public void merge(AggregateOperationTree operationTreeToMerge)

getOperationName

public String getOperationName()
Gets the name of the operation represented by this AggregateOperationTree

Returns:
operation name

getHead

public TreeNode getHead()
Gets the TreeNode representing the API from which this operation started

Returns:
head of the tree

deepCopy

public AggregateOperationTree deepCopy()
Make a copy of the operation tree

Returns:
AggregateOperationTree

contains

public boolean contains(String api)

getNoOfSqlCalls

public int getNoOfSqlCalls()

toString

public String toString()