Class DefaultMetricsContext

    • Constructor Detail

      • DefaultMetricsContext

        public DefaultMetricsContext()
    • Method Detail

      • counter

        @Deprecated
        public <T extends java.lang.Number> MetricsContext.Counter<T> counter​(java.lang.String name,
                                                                              java.lang.Class<T> type,
                                                                              MetricsContext.Unit unit)
        Deprecated.
        will be removed in 2.0.0, use Counter instead.
        Description copied from interface: MetricsContext
        Get a named counter of a specific type. Metric implementations may impose restrictions on what types are supported for specific counters.
        Specified by:
        counter in interface MetricsContext
        Parameters:
        name - name of the metric
        type - numeric type of the counter value
        unit - the unit designation of the metric
        Returns:
        a counter implementation
      • timer

        public Timer timer​(java.lang.String name,
                           java.util.concurrent.TimeUnit unit)
        Description copied from interface: MetricsContext
        Get a named timer.
        Specified by:
        timer in interface MetricsContext
        Parameters:
        name - name of the metric
        unit - the time unit designation of the metric
        Returns:
        a timer implementation