Interface ResourceMeter

  • All Known Implementing Classes:
    BoundedMeter, NotifyingMeter, SimpleMeter, ThrottledMeter

    public interface ResourceMeter
    A resource meter with a current value and a ResourceType. Refer to the concrete meter subtypes for additional useful semantics. The meter has a current value that tracks net allocations and releases and a count of cumulative allocations and counts only allocations. Meter behavior can be extended or customized by subclassing the concrete implementations or implementing this interface.
    See Also:
    SimpleMeter, NotifyingMeter, BoundedMeter, ThrottledMeter
    • Method Detail

      • getValue

        long getValue​()
        Returns the current net value of the ResourceMeter. The net value is the difference between the cumulative amounts allocated minus all amounts released.
        the current net value of the meter
      • getAllocated

        long getAllocated​()
        Returns the cumulative total of allocations from the ResourceMeter.
        the total allocated from the meter
      • getType

        ResourceType getType​()
        Returns the ResourceType.
        the ResourceType