Package com.thingworx.metrics
Interface ICounter<T extends Number>
- Type Parameters:
T
- the numeric type the counter supports
- All Superinterfaces:
IMetric
@ThingworxExtensionApiClass(since={8,1,1})
public interface ICounter<T extends Number>
extends IMetric
A metric that tracks relative changes to a numeric value.
-
Field Summary
Fields inherited from interface com.thingworx.metrics.IMetric
METRIC_TYPE, VALUE, VALUE_TYPE
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
decr()
Decrements the counter by one.default void
decr
(boolean aggregate)
Decrements the counter by one.void
Decrements the counter by the supplied value.void
Decrements the counter by the supplied value with optional persistence.void
Decrements the counter by the supplied value with optional persistence.get()
Returns the counter's current value.default void
incr()
Increments the counter by one.default void
incr
(boolean aggregate)
Increments the counter by one.void
Increments the counter by the supplied value.void
Increments the counter by the supplied value with optional persistence.void
Increments the counter by the supplied value with optional persistence.
-
Method Details
-
incr
Increments the counter by the supplied value.- Parameters:
value
- the amount to increment by
-
incr
Increments the counter by the supplied value with optional persistence.- Parameters:
value
- the amount to increment bypersist
- whether or not to persist the counter data
-
incr
Increments the counter by the supplied value with optional persistence.- Parameters:
value
- the amount to increment bypersist
- whether or not to persist the counter dataaggregate
- whether or not to aggregate in a cluster environment
-
incr
Increments the counter by one. -
incr
Increments the counter by one.- Parameters:
aggregate
- whether or not to aggregate in a cluster environment
-
decr
Decrements the counter by the supplied value.- Parameters:
value
- the amount to decrement by
-
decr
Decrements the counter by the supplied value with optional persistence.- Parameters:
value
- the amount to decrement bypersist
- whether or not to persist the counter data
-
decr
Decrements the counter by the supplied value with optional persistence.- Parameters:
value
- the amount to decrement bypersist
- whether or not to persist the counter dataaggregate
- whether or not to aggregate in a cluster environment
-
decr
Decrements the counter by one. -
decr
Decrements the counter by one.- Parameters:
aggregate
- whether or not to aggregate in a cluster environment
-
get
Returns the counter's current value.- Returns:
- the counter's current value
-