Class MetricHandle

  • All Implemented Interfaces:
    java.lang.AutoCloseable

    public class MetricHandle
    extends java.lang.Object
    implements java.lang.AutoCloseable
    Measure the time of a call and accumulate that time in the attached CallTimeMetric when this handle is closed.
    • Method Detail

      • getMetric

        public CallTimeMetric getMetric()
        The shared metric value represented by this handle
        Returns:
      • getParent

        public MetricHandle getParent()
        Get the parent of this handle
        Returns:
      • getParentPath

        public java.lang.String getParentPath()
        Get the full path of the parent of this
        Returns:
      • getPath

        public java.lang.String getPath()
        Convenience method to get the path name of the metric we are wrapping
        Returns:
      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable
      • accumulateItems

        public void accumulateItems​(int count)
        Add count to the number of items associated with this metric and also add this count to all the parents of this metric
        Parameters:
        count -
      • getMetricHandle

        public MetricHandle getMetricHandle​(java.lang.String name)
        Convenience method to get a child MetricHandle by calling through to our parent request context
        Parameters:
        name -
        Returns: