StatisticRegistry
in the cases where you do not need any sampling and history.
This class typically does a sort of mapping between the registrations and the discovered operations or passthrough statistics.
This class also support the generation of management metadata from the discovered statistics.
Non thread-safe.
| Modifier and Type | Field and Description |
|---|---|
| private final Object | |
| private final Map | |
| private final LongSupplier |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected Map | |
| private Matcher | |
| public <T extends Serializable> Optional | |
| public <T extends Serializable> Optional | queryStatistic(String fullStatisticName, long sinceMillis)
Query a statistic based on the full statistic name. |
| public Map | |
| public Map | |
| public void | registerCounter(String fullStatName, Supplier<Number> accessor)
Directly register a COUNTER stat with its accessor |
| public void | registerGauge(String fullStatName, Supplier<Number> accessor)
Directly register a GAUGE stat with its accessor |
| public <T extends Serializable> void | |
| public <T extends Serializable> void | |
| public <T extends Serializable> boolean | |
| public <T extends Enum | registerStatistic(String statNameSuffix, final OperationStatisticDescriptor<T> descriptor, final EnumSet<T> outcomes)
|
| public void | registerTable(String fullStatName, Supplier<Table> accessor)
Directly register a TABLE stat with its accessors |
| contextObject | back to summary |
|---|---|
| private final Object contextObject | |
| statistics | back to summary |
|---|---|
| private final Map<String, ValueStatistic<? extends Serializable>> statistics | |
| timeSource | back to summary |
|---|---|
| private final LongSupplier timeSource | |
| StatisticRegistry | back to summary |
|---|---|
| public StatisticRegistry(Object contextObject, LongSupplier timeSource) | |
| getStatistics | back to summary |
|---|---|
| protected Map | |
| hasTags | back to summary |
|---|---|
| private Matcher | |
| queryStatistic | back to summary |
|---|---|
| public <T extends Serializable> Optional Query a statistic based on the full statistic name. Returns null if not found. | |
| queryStatistic | back to summary |
|---|---|
| public <T extends Serializable> Optional Query a statistic based on the full statistic name. Returns null if not found.
| |
| queryStatistics | back to summary |
|---|---|
| public Map | |
| queryStatistics | back to summary |
|---|---|
public Map
| |
| registerCounter | back to summary |
|---|---|
| public void registerCounter(String fullStatName, Supplier<Number> accessor) Directly register a COUNTER stat with its accessor | |
| registerGauge | back to summary |
|---|---|
| public void registerGauge(String fullStatName, Supplier<Number> accessor) Directly register a GAUGE stat with its accessor | |
| registerStatistic | back to summary |
|---|---|
| public <T extends Serializable> void registerStatistic(String fullStatName, StatisticType type, Supplier<T> accessor) | |
| registerStatistic | back to summary |
|---|---|
| public <T extends Serializable> void registerStatistic(String fullStatName, ValueStatistic<T> accessor) | |
| registerStatistic | back to summary |
|---|---|
public <T extends Serializable> boolean registerStatistic(String statNameSuffix, ValueStatisticDescriptor descriptor)
| |
| registerStatistic | back to summary |
|---|---|
public <T extends Enum
| |
| registerTable | back to summary |
|---|---|
| public void registerTable(String fullStatName, Supplier<Table> accessor) Directly register a TABLE stat with its accessors | |