Sonic ESB API

com.sonicsw.esb.service.common.metrics
Interface SFCMetric

All Known Implementing Classes:
NoOpMetric

public interface SFCMetric


Method Summary
 MetricDescriptor getMetricDescriptor()
          Returns the descriptor for this metric.
 long getRawValue()
          Gets the current value of this metric.
 void incrementValue()
          Increments the value for this metric by one.
 boolean isEnabled()
          Indicates whether this metric currently enabled.
 void resetValue()
          Resets the value of this metric to its initial value.
 void updateValue(long value)
          Updates the value for this metric.
 

Method Detail

getMetricDescriptor

MetricDescriptor getMetricDescriptor()
Returns the descriptor for this metric.


isEnabled

boolean isEnabled()
Indicates whether this metric currently enabled. This can be used to conditionally call updateMetricValue if providing the value is expensive.


incrementValue

void incrementValue()
Increments the value for this metric by one. Assumes the metric is computing a total value. If the metric is not currently enabled, this method has no effect.


updateValue

void updateValue(long value)
Updates the value for this metric. The specific behavior (for example, whether this adds to a total value or replaces the current value) depends on the type of metric. If the metric is not currently enabled, this method has no effect.

Parameters:
value - the new value

resetValue

void resetValue()
Resets the value of this metric to its initial value. If the metric is not currently enabled, this method has no effect.


getRawValue

long getRawValue()
Gets the current value of this metric.

Note that some metrics are computed by the metrics manager from a raw statistical value. This method returns the raw value rather than the computed result. For example: calling getCurrentMetricValue for an average will return the current total rather than the computed average.

Returns:
the current value. The nature of this value depends on metric type and how its raw statistical value is tracked.
Throws:
java.lang.IllegalStateException - if this metric is not currently enabled

Sonic ESB API

Copyright © 2001-2012 Progress Software Corporation. All Rights Reserved.
HTML formatted on 13-Mar-2012.