Skip navigation links
Thingworx Platform API
8.5.0
com.thingworx.metrics

Interface ICounter<T extends java.lang.Number>

  • Type Parameters:
    T - the numeric type the counter supports
    All Superinterfaces:
    IMetric


    @ThingworxExtensionApiClass(since={8,1,1})
    public interface ICounter<T extends java.lang.Number>
    extends IMetric
    A metric that tracks relative changes to a numeric value.
    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      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.
      • Methods inherited from interface com.thingworx.metrics.IMetric

        key