View Javadoc

1   package com.atlassian.vcache.internal.core.metrics;
2   
3   import com.atlassian.vcache.internal.MetricLabel;
4   import com.atlassian.vcache.internal.RequestContext;
5   import com.atlassian.vcache.internal.RequestMetrics;
6   import com.atlassian.vcache.internal.core.Instrumentor;
7   
8   /**
9    * Provides the ability to collect and obtain metrics at the {@link RequestContext} level.
10   * <p>
11   * Provides methods to:
12   * </p>
13   * <ul>
14   * <li>Record a sample - {@link #record(String, CacheType, MetricLabel, long)}</li>
15   * <li>Obtain the request metrics {@link #obtainRequestMetrics(RequestContext)}</li>
16   * <li>Wrap an entity for collecting metrics - see the {@code wrap(...)} methods</li>
17   * </ul>
18   *
19   * @since 1.0.0
20   */
21  public interface MetricsCollector extends Instrumentor, MetricsRecorder {
22      RequestMetrics obtainRequestMetrics(RequestContext requestContext);
23  }