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 SummaryNested classes/interfaces inherited from interface org.apache.iceberg.metrics.MetricsContextMetricsContext.Counter<T extends Number>, MetricsContext.Unit
- 
Constructor SummaryConstructors
- 
Method SummaryModifier 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.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.iceberg.metrics.MetricsContextcounter, initialize
- 
Constructor Details- 
DefaultMetricsContextpublic 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 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
 
- 
timerDescription copied from interface:MetricsContextGet a named timer.- Specified by:
- timerin interface- MetricsContext
- Parameters:
- name- name of the metric
- unit- the time unit designation of the metric
- Returns:
- a timer implementation
 
- 
counterDescription copied from interface:MetricsContextGet a named counter.- Specified by:
- counterin interface- MetricsContext
- Parameters:
- name- The name of the counter
- unit- The unit designation of the counter
- Returns:
- a Counterimplementation
 
- 
histogram- Specified by:
- histogramin interface- MetricsContext
 
 
- 
Counterinstead.