public class ClusterAwareHitMissMetricsHolder extends Object implements ClusterAwareMetricsReporter<Boolean>
Example of hit-miss metric: loaded or not loaded data, data found in cache or not found.
| Modifier and Type | Field and Description |
|---|---|
protected String |
metricName |
protected int |
numberOfHits |
protected int |
numberOfReports |
| Constructor and Description |
|---|
ClusterAwareHitMissMetricsHolder(String metricName)
Initialize a metric holder with a metric name.
|
| Modifier and Type | Method and Description |
|---|---|
void |
register(Boolean isHit)
Register (notify) a metric holder about event.
|
void |
reportMetrics(Logger log)
Report collected metric to a provided logger.
|
protected String metricName
protected int numberOfReports
protected int numberOfHits
public ClusterAwareHitMissMetricsHolder(String metricName)
metricName - Metric namepublic void register(Boolean isHit)
register in interface ClusterAwareMetricsReporter<Boolean>isHit - True if event is a "hit" event.public void reportMetrics(Logger log)
reportMetrics in interface ClusterAwareMetricsReporter<Boolean>log - A logger to report collected metric.Copyright © 1997-2021 PostgreSQL Global Development Group. All Rights Reserved.