Package org.apache.iceberg.metrics
Class DefaultMetricsContext
java.lang.Object
org.apache.iceberg.metrics.DefaultMetricsContext
- All Implemented Interfaces:
 Serializable,MetricsContext
A default 
MetricsContext implementation that uses native Java counters/timers.- See Also:
 
- 
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.iceberg.metrics.MetricsContext
MetricsContext.Counter<T extends Number>, MetricsContext.Unit - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescription<T extends Number>
MetricsContext.Counter<T>counter(String name, Class<T> type, MetricsContext.Unit unit) Deprecated.counter(String name, MetricsContext.Unit unit) Get a named counter.Get a named timer.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.iceberg.metrics.MetricsContext
counter, initialize 
- 
Constructor Details
- 
DefaultMetricsContext
public DefaultMetricsContext() 
 - 
 - 
Method Details
- 
counter
@Deprecated public <T extends Number> MetricsContext.Counter<T> counter(String name, Class<T> type, MetricsContext.Unit unit) Deprecated.will be removed in 2.0.0, useCounterinstead.Description copied from interface:MetricsContextGet a named counter of a specific type. Metric implementations may impose restrictions on what types are supported for specific counters.- Specified by:
 counterin interfaceMetricsContext- Parameters:
 name- name of the metrictype- numeric type of the counter valueunit- the unit designation of the metric- Returns:
 - a counter implementation
 
 - 
timer
Description copied from interface:MetricsContextGet a named timer.- Specified by:
 timerin interfaceMetricsContext- Parameters:
 name- name of the metricunit- the time unit designation of the metric- Returns:
 - a timer implementation
 
 - 
counter
Description copied from interface:MetricsContextGet a named counter.- Specified by:
 counterin interfaceMetricsContext- Parameters:
 name- The name of the counterunit- The unit designation of the counter- Returns:
 - a 
Counterimplementation 
 - 
histogram
- Specified by:
 histogramin interfaceMetricsContext
 
 - 
 
Counterinstead.