org.apache.camel.management
Class PerformanceCounter

java.lang.Object
  extended by org.apache.camel.management.Counter
      extended by org.apache.camel.management.PerformanceCounter
Direct Known Subclasses:
ManagedRoute

@ManagedResource(description="PerformanceCounter",
                 currencyTimeLimit=15)
public class PerformanceCounter
extends Counter


Field Summary
 
Fields inherited from class org.apache.camel.management.Counter
numExchanges
 
Constructor Summary
PerformanceCounter()
           
 
Method Summary
 void completedExchange(double time)
          This method is called when an exchange has been processed successfully.
 void failedExchange()
          This method is called when an exchange has been processed and failed.
 Date getFirstExchangeCompletionTime()
           
 Date getFirstExchangeFailureTime()
           
 Date getLastExchangeCompletionTime()
           
 Date getLastExchangeFailureTime()
           
 double getMaxProcessingTimeMillis()
           
 double getMeanProcessingTimeMillis()
           
 double getMinProcessingTimeMillis()
           
 long getNumCompleted()
           
 long getNumFailed()
           
 double getTotalProcessingTimeMillis()
           
 void reset()
           
 
Methods inherited from class org.apache.camel.management.Counter
getNumExchanges, increment
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PerformanceCounter

public PerformanceCounter()
Method Detail

reset

@ManagedOperation(description="Reset counters")
public void reset()
Overrides:
reset in class Counter

getNumCompleted

@ManagedAttribute(description="Number of successful exchanges")
public long getNumCompleted()
                     throws Exception
Throws:
Exception

getNumFailed

@ManagedAttribute(description="Number of failed exchanges")
public long getNumFailed()
                  throws Exception
Throws:
Exception

getMinProcessingTimeMillis

@ManagedAttribute(description="Min Processing Time [milliseconds]")
public double getMinProcessingTimeMillis()
                                  throws Exception
Throws:
Exception

getMeanProcessingTimeMillis

@ManagedAttribute(description="Mean Processing Time [milliseconds]")
public double getMeanProcessingTimeMillis()
                                   throws Exception
Throws:
Exception

getMaxProcessingTimeMillis

@ManagedAttribute(description="Max Processing Time [milliseconds]")
public double getMaxProcessingTimeMillis()
                                  throws Exception
Throws:
Exception

getTotalProcessingTimeMillis

@ManagedAttribute(description="Total Processing Time [milliseconds]")
public double getTotalProcessingTimeMillis()
                                    throws Exception
Throws:
Exception

getLastExchangeCompletionTime

@ManagedAttribute(description="Last Exchange Completed Timestamp")
public Date getLastExchangeCompletionTime()

getFirstExchangeCompletionTime

@ManagedAttribute(description="First Exchange Completed Timestamp")
public Date getFirstExchangeCompletionTime()

getLastExchangeFailureTime

@ManagedAttribute(description="Last Exchange Failed Timestamp")
public Date getLastExchangeFailureTime()

getFirstExchangeFailureTime

@ManagedAttribute(description="First Exchange Failed Timestamp")
public Date getFirstExchangeFailureTime()

completedExchange

public void completedExchange(double time)
This method is called when an exchange has been processed successfully.

Parameters:
time - in milliseconds it spent on processing the exchange

failedExchange

public void failedExchange()
This method is called when an exchange has been processed and failed.



Apache CAMEL