Class MetricRegistriesImpl
java.lang.Object
org.apache.hadoop.hbase.metrics.MetricRegistries
org.apache.hadoop.hbase.metrics.impl.MetricRegistriesImpl
Implementation of MetricRegistries that does ref-counting.
-
Field Summary
Modifier and TypeFieldDescriptionprivate final MetricRegistryFactory
private final RefCountingMap<MetricRegistryInfo,
MetricRegistry> -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Removes all the MetricRegisties.create
(MetricRegistryInfo info) Create or return MetricRegistry with the given info.get
(MetricRegistryInfo info) Returns the MetricRegistry if found.Returns MetricRegistry's created.Returns MetricRegistryInfo's for the MetricRegistry's created.boolean
remove
(MetricRegistryInfo key) Decrements the ref count of the MetricRegistry, and removes if ref count == 0.Methods inherited from class org.apache.hadoop.hbase.metrics.MetricRegistries
global
-
Field Details
-
factory
-
registries
-
-
Constructor Details
-
MetricRegistriesImpl
public MetricRegistriesImpl() -
MetricRegistriesImpl
-
-
Method Details
-
create
Description copied from class:MetricRegistries
Create or return MetricRegistry with the given info. MetricRegistry will only be created if current reference count is 0. Otherwise ref counted is incremented, and an existing instance will be returned.- Specified by:
create
in classMetricRegistries
- Parameters:
info
- the info object for the MetricRegistrytry.- Returns:
- created or existing MetricRegistry.
-
remove
Description copied from class:MetricRegistries
Decrements the ref count of the MetricRegistry, and removes if ref count == 0.- Specified by:
remove
in classMetricRegistries
- Parameters:
key
- the info object for the MetricRegistrytry.- Returns:
- true if metric registry is removed.
-
get
Description copied from class:MetricRegistries
Returns the MetricRegistry if found.- Specified by:
get
in classMetricRegistries
- Parameters:
info
- the info for the registry.- Returns:
- a MetricRegistry optional.
-
getMetricRegistries
Description copied from class:MetricRegistries
Returns MetricRegistry's created.- Specified by:
getMetricRegistries
in classMetricRegistries
- Returns:
- MetricRegistry's created.
-
clear
Description copied from class:MetricRegistries
Removes all the MetricRegisties.- Specified by:
clear
in classMetricRegistries
-
getMetricRegistryInfos
Description copied from class:MetricRegistries
Returns MetricRegistryInfo's for the MetricRegistry's created.- Specified by:
getMetricRegistryInfos
in classMetricRegistries
- Returns:
- MetricRegistryInfo's for the MetricRegistry's created.
-