Package com.opentext.ia.sdk.sip
Class Counters
- java.lang.Object
-
- com.opentext.ia.sdk.sip.Counters
-
public class Counters extends java.lang.Object
Set of related counters.
-
-
Constructor Summary
Constructors Constructor Description Counters()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Counters
forReading()
long
get(java.lang.String name)
void
inc(java.lang.String name)
Increase the metric with the given name by one.void
inc(java.lang.String name, long delta)
Increase the metric with the given name by the given amount.void
reset()
Reset all metrics to zero.void
set(java.lang.String name, long value)
Set the metric with the given name to the given value.java.lang.String
toString()
-
-
-
Method Detail
-
get
public long get(java.lang.String name)
-
inc
public void inc(java.lang.String name)
Increase the metric with the given name by one.- Parameters:
name
- The name of the metric
-
inc
public void inc(java.lang.String name, long delta)
Increase the metric with the given name by the given amount.- Parameters:
name
- The name of the metricdelta
- The amount to increase the metric with
-
set
public void set(java.lang.String name, long value)
Set the metric with the given name to the given value.- Parameters:
name
- The name of the metricvalue
- The value to set the metric to
-
reset
public void reset()
Reset all metrics to zero.
-
forReading
public Counters forReading()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-