SMILA (incubation) API documentation

org.eclipse.smila.processing.bpel
Class ProcessingPerformanceCounter

java.lang.Object
  extended by org.eclipse.smila.processing.bpel.ProcessingPerformanceCounter
Direct Known Subclasses:
PipelinePartPerformanceCounter, PipelinePerformanceCounter

public abstract class ProcessingPerformanceCounter
extends java.lang.Object

Base class for performance counters used to measure processing performance. Manages three performance counters for number of invocations, average execution time and errors.

Author:
jschumacher

Constructor Summary
ProcessingPerformanceCounter(java.lang.String elementName)
          create new performance counters for given element.
 
Method Summary
 void addError(java.lang.Throwable ex, boolean isCritical)
          Adds the error.
 void countFailureMillis(long executionTime)
          Count a failed invocation.
 void countFailureNanos(long executionTime)
          Count a failed invocation.
 void countInvocationMillis(long executionTime, boolean success)
          count an invocation.
 void countInvocationNanos(long executionTime, boolean success)
          count an invocation in nano seconds.
 void countSuccessMillis(long executionTime)
          count a successful invocation.
 void countSuccessNanos(long executionTime)
          count a successful invocation in nanoseconds.
protected  java.lang.String getElementName()
          Gets the element name.
protected abstract  java.lang.String getElementType()
          Gets the element type.
abstract  ManagementAgentLocation getLocation()
          Gets the location.
protected  void registerAgent()
          Register.
 java.lang.String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ProcessingPerformanceCounter

public ProcessingPerformanceCounter(java.lang.String elementName)
create new performance counters for given element.

Parameters:
elementName - name of a element to measure
Method Detail

registerAgent

protected void registerAgent()
Register.


getElementType

protected abstract java.lang.String getElementType()
Gets the element type.

Returns:
name of top level JMX category under "SMILA Processing"

getElementName

protected java.lang.String getElementName()
Gets the element name.

Returns:
name of measured elements.

countSuccessMillis

public void countSuccessMillis(long executionTime)
count a successful invocation.

Parameters:
executionTime - time for execution in milliseconds

countSuccessNanos

public void countSuccessNanos(long executionTime)
count a successful invocation in nanoseconds.

Parameters:
executionTime - time for execution in nano seconds

countFailureMillis

public void countFailureMillis(long executionTime)
Count a failed invocation.

Parameters:
executionTime - time for execution in millis seconds

countFailureNanos

public void countFailureNanos(long executionTime)
Count a failed invocation.

Parameters:
executionTime - time for execution in nano seconds

countInvocationMillis

public void countInvocationMillis(long executionTime,
                                  boolean success)
count an invocation.

Parameters:
executionTime - time for execution in milli seconds
success - true to count as success, false to count as failure

countInvocationNanos

public void countInvocationNanos(long executionTime,
                                 boolean success)
count an invocation in nano seconds.

Parameters:
executionTime - time for execution in nano seconds
success - true to count as success, false to count as failure

addError

public void addError(java.lang.Throwable ex,
                     boolean isCritical)
Adds the error.

Parameters:
ex - the ex
isCritical - the is critical

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object
See Also:
Object.toString()

getLocation

public abstract ManagementAgentLocation getLocation()
Gets the location.

Returns:
the location

SMILA (incubation) API documentation