Class SizeAwareMetric


  • public class SizeAwareMetric
    extends Object
    • Constructor Detail

      • SizeAwareMetric

        public SizeAwareMetric()
        To be used in a case where we just measure elements
      • SizeAwareMetric

        public SizeAwareMetric​(long maxSize,
                               long lowerMarkSize,
                               long maxElements,
                               long lowerMarkElements)
    • Method Detail

      • isOver

        public boolean isOver()
      • isOverSize

        public boolean isOverSize()
      • isOverElements

        public boolean isOverElements()
      • getSize

        public long getSize()
      • isElementsEnabled

        public boolean isElementsEnabled()
      • setElementsEnabled

        public SizeAwareMetric setElementsEnabled​(boolean elementsEnabled)
      • getElements

        public long getElements()
      • isSizeEnabled

        public boolean isSizeEnabled()
      • setSizeEnabled

        public SizeAwareMetric setSizeEnabled​(boolean sizeEnabled)
      • over

        protected void over()
      • under

        protected void under()
      • addSize

        public final long addSize​(int delta)
      • addSize

        public final long addSize​(int delta,
                                  boolean sizeOnly)
      • setMax

        public void setMax​(long maxSize,
                           long lowerMarkSize,
                           long maxElements,
                           long lowerMarkElements)