org.sormula.operation.monitor
Class OperationTimeSource

java.lang.Object
  extended by org.sormula.operation.monitor.OperationTimeSource

public class OperationTimeSource
extends java.lang.Object

Information about stack location and frequency of occurance for an OperationTime.

Since:
1.5
Author:
Jeff Miller

Constructor Summary
OperationTimeSource(java.lang.StackTraceElement location)
          Constructs for a stack location.
 
Method Summary
 int getCount()
           
 int getId()
          Unique id for this stack location.
 java.lang.StackTraceElement getLocation()
           
 void incrementCount()
          Increments the count by 1.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OperationTimeSource

public OperationTimeSource(java.lang.StackTraceElement location)
Constructs for a stack location. The id is initialized from StackTraceElement.hashCode(). The count is initialized to 1.

Parameters:
location - location on the JVM stack where timing was initiated
Method Detail

getId

public int getId()
Unique id for this stack location.

Returns:
StackTraceElement.hashCode()

getLocation

public java.lang.StackTraceElement getLocation()
Returns:
location supplied in constructor

getCount

public int getCount()
Returns:
the number of times that timing has occurred

incrementCount

public void incrementCount()
Increments the count by 1.