T
- the numeric type the counter supports@ThingworxExtensionApiClass(since={8,1,1}) public interface ICounter<T extends java.lang.Number> extends IMetric
METRIC_TYPE, VALUE, VALUE_TYPE
Modifier and Type | Method and Description |
---|---|
default void |
decr()
Decrements the counter by one. |
void |
decr(T value)
Decrements the counter by the supplied value. |
void |
decr(T value,
boolean persist)
Decrements the counter by the supplied value with optional persistence. |
T |
get()
Returns the counter's current value. |
default void |
incr()
Increments the counter by one. |
void |
incr(T value)
Increments the counter by the supplied value. |
void |
incr(T value,
boolean persist)
Increments the counter by the supplied value with optional persistence. |
@ThingworxExtensionApiMethod(since={8,1,1}) void incr(T value)
value
- the amount to increment by@ThingworxExtensionApiMethod(since={8,3}) void incr(T value, boolean persist)
value
- the amount to increment byvalue
- whether or not to persist the counter data@ThingworxExtensionApiMethod(since={8,1,1}) default void incr()
@ThingworxExtensionApiMethod(since={8,1,1}) void decr(T value)
value
- the amount to decrement by@ThingworxExtensionApiMethod(since={8,3}) void decr(T value, boolean persist)
value
- the amount to decrement byvalue
- whether or not to persist the counter data@ThingworxExtensionApiMethod(since={8,1,1}) default void decr()
@ThingworxExtensionApiMethod(since={8,3}) T get()