net.sf.infrared.agent
Class OperationTree

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

public class OperationTree
extends Object
implements Serializable

This class represents a tree of methods as they happen during the execution of an operation. Each method on the tree is represented using an ApiTime object.

It also keeps track of the SQL statements executed as part of this operation.

See Also:
Serialized Form

Constructor Summary
OperationTree()
           
OperationTree(OperationTree other, IdMapper idMapper)
           
 
Method Summary
 void appendToName(ApiTime child)
          This is called when a new node is added to the operation tree The api name is appended to the operation name.
 boolean containsMethod(String apiName)
          Checks if an API with the given name was invoked as part of this operation.
 TreeNode getHead()
          Gets the ApiTime that represents the start method of the operation.
 int getNoOfSqlCalls()
           
 String getOperationName()
          Gets the name of the call.
 Tree getTree()
           
 boolean hasSqlCalls()
           
 void incrementNoOfSqlCalls()
           
 boolean isFaulty()
          Checks if a tree is marked as faulty.
 void markAsFaulty()
          Marks the tree as faulty.
 void setHead(TreeNode head)
           
 String toString()
          Gets the string representation of this OperationTree.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OperationTree

public OperationTree()

OperationTree

public OperationTree(OperationTree other,
                     IdMapper idMapper)
Method Detail

getHead

public TreeNode getHead()
Gets the ApiTime that represents the start method of the operation.

Returns:

appendToName

public void appendToName(ApiTime child)
This is called when a new node is added to the operation tree The api name is appended to the operation name. This relies on the fact that the tree gets build left to right & there will not be any modifications once it has been built.

Parameters:
child -

markAsFaulty

public void markAsFaulty()
Marks the tree as faulty. Faulty CallTrees are not used in aggregate calculations.


isFaulty

public boolean isFaulty()
Checks if a tree is marked as faulty.

Returns:

getOperationName

public String getOperationName()
Gets the name of the call. This is a String that contains the names of all APIs invokes as part of this operation. Individual API names are appended with ":" characted at start and end.

Returns:
callName

toString

public String toString()
Gets the string representation of this OperationTree. Returns the callName.

Returns:
callName

containsMethod

public boolean containsMethod(String apiName)
Checks if an API with the given name was invoked as part of this operation.

Parameters:
apiName -
Returns:

setHead

public void setHead(TreeNode head)

hasSqlCalls

public boolean hasSqlCalls()

getNoOfSqlCalls

public int getNoOfSqlCalls()

incrementNoOfSqlCalls

public void incrementNoOfSqlCalls()

getTree

public Tree getTree()