Class ImmutableMetrics

    • Constructor Detail

      • ImmutableMetrics

        protected ImmutableMetrics()
    • Method Detail

      • getDuration

        public long getDuration​(TimeUnit unit)
        Description copied from interface: Metrics
        Get the duration of execution time taken.
        Specified by:
        getDuration in interface Metrics
      • getCount

        public Long getCount​(String key)
        Description copied from interface: Metrics
        Get the count for the corresponding countKey. Returns null if countKey does not exist.
        Specified by:
        getCount in interface Metrics
        Parameters:
        key - key for counter to get.
      • getCounts

        public Map<String,​Long> getCounts()
        Description copied from interface: Metrics
        Get the map of all counters. This method copies the internal map.
        Specified by:
        getCounts in interface Metrics
        Returns:
        a Map where the key is the counter ID and the value is the counter value.
      • getName

        public String getName()
        Description copied from interface: Metrics
        Name of this Metrics.
        Specified by:
        getName in interface Metrics
        Returns:
        name of this Metrics.
      • getId

        public String getId()
        Description copied from interface: Metrics
        Id of this Metrics.
        Specified by:
        getId in interface Metrics
        Returns:
        id of this Metrics.
      • getNested

        public Collection<ImmutableMetrics> getNested()
        Description copied from interface: Metrics
        Get the nested Metrics objects. Metrics will be ordered in the order they were inserted.
        Specified by:
        getNested in interface Metrics
        Returns:
        the nested Metrics objects.
      • getNested

        public ImmutableMetrics getNested​(String metricsId)
        Description copied from interface: Metrics
        Get a nested Metrics object by Id.
        Specified by:
        getNested in interface Metrics
        Returns:
        a nested Metrics object.
      • getAnnotations

        public Map<String,​Object> getAnnotations()
        Description copied from interface: Metrics
        Obtain the annotations for this Metrics. Values may be of type String or Number.
        Specified by:
        getAnnotations in interface Metrics
        Returns:
        the annotations for this Metrics. Modifications to the returned object are persisted in the original.
      • getAnnotation

        public Object getAnnotation​(String key)
        Description copied from interface: Metrics
        Obtain the annotation with the specified key. Values may be of type String or Number.
        Specified by:
        getAnnotation in interface Metrics
        Parameters:
        key - key of the annotation to obtain.