public enum KeepStatisticsHolder extends java.lang.Enum<KeepStatisticsHolder> implements KeepStatistics
Holder for Keep statistics
KeepStatistics.StatisticAction, KeepStatistics.TagKey| Enum Constant and Description |
|---|
INSTANCE
Singleton holder for statistic data
|
| Modifier and Type | Method and Description |
|---|---|
KeepStatistics |
adjustConfiguredForms(KeepDbInfo dbInfo,
KeepStatistics.StatisticAction action)
Adjusts number of configured forms
|
KeepStatistics |
adjustConfiguredForms(KeepStatistics.StatisticAction action)
Adjusts number of configured forms by 1, up or down
|
io.micrometer.core.instrument.Meter |
createMetricForRegistry(java.lang.String key,
java.util.List<io.micrometer.core.instrument.Tag> metricsTags,
io.micrometer.core.instrument.Meter.Type type,
io.micrometer.core.instrument.MeterRegistry registry)
Creates a counter or timer for a specific registry.
|
java.util.Map<java.lang.String,io.micrometer.core.instrument.Meter> |
getMetricsMap() |
io.micrometer.core.instrument.Counter |
getOrCreateCounter(java.lang.String key,
java.util.List<io.micrometer.core.instrument.Tag> metricsTags)
Gets or creates a counter.
|
io.micrometer.core.instrument.Timer |
getOrCreateTimer(java.lang.String key,
java.util.List<io.micrometer.core.instrument.Tag> metricsTags)
Gets or creates a counter.
|
void |
incrementCounter(java.lang.String key,
java.util.List<io.micrometer.core.instrument.Tag> metricsTags) |
KeepStatistics |
reset()
Resets the statistics to start over.
|
static KeepStatisticsHolder |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static KeepStatisticsHolder[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final KeepStatisticsHolder INSTANCE
public static KeepStatisticsHolder[] values()
for (KeepStatisticsHolder c : KeepStatisticsHolder.values()) System.out.println(c);
public static KeepStatisticsHolder valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is nullpublic KeepStatistics adjustConfiguredForms(KeepDbInfo dbInfo, KeepStatistics.StatisticAction action)
KeepStatisticsAdjusts number of configured forms
adjustConfiguredForms in interface KeepStatisticsdbInfo - KeepDbInfo to processaction - increment or decrementpublic KeepStatistics adjustConfiguredForms(KeepStatistics.StatisticAction action)
KeepStatisticsAdjusts number of configured forms by 1, up or down
adjustConfiguredForms in interface KeepStatisticsaction - increment or decrementpublic io.micrometer.core.instrument.Meter createMetricForRegistry(java.lang.String key,
java.util.List<io.micrometer.core.instrument.Tag> metricsTags,
io.micrometer.core.instrument.Meter.Type type,
io.micrometer.core.instrument.MeterRegistry registry)
KeepStatisticsCreates a counter or timer for a specific registry. Currently the only registry in use is Prometheus. The future approach will call this recursively for all registries enabled
createMetricForRegistry in interface KeepStatisticskey - to create metric withmetricsTags - to create metric withtype - of Meter to create. Only Timer and Counter are currently supportedregistry - registry into which to create the metricpublic java.util.Map<java.lang.String,io.micrometer.core.instrument.Meter> getMetricsMap()
getMetricsMap in interface KeepStatisticspublic io.micrometer.core.instrument.Counter getOrCreateCounter(java.lang.String key,
java.util.List<io.micrometer.core.instrument.Tag> metricsTags)
KeepStatisticsGets or creates a counter. Use this if tags require minimal computation to pass
getOrCreateCounter in interface KeepStatisticskey - to create metric withmetricsTags - to create metric withpublic io.micrometer.core.instrument.Timer getOrCreateTimer(java.lang.String key,
java.util.List<io.micrometer.core.instrument.Tag> metricsTags)
KeepStatisticsGets or creates a counter. Use this if tags require minimal computation to pass
getOrCreateTimer in interface KeepStatisticskey - to create metric withmetricsTags - to create metric withpublic void incrementCounter(java.lang.String key,
java.util.List<io.micrometer.core.instrument.Tag> metricsTags)
key - metricsTags - public KeepStatistics reset()
KeepStatisticsResets the statistics to start over. Mainly used when restarting keep
reset in interface KeepStatistics