Modifier and Type | Interface and Description |
---|---|
static class |
Gauge.Builder
Builder for
Gauge s. |
Modifier and Type | Method and Description |
---|---|
static Gauge.Builder |
builder(String name)
Create new builder for
Gauge . |
default void |
decrement()
Decrement the gauge by one.
|
void |
decrement(double amount)
Decrement the gauge by
amount . |
long |
getCount()
Returns the number of times that setValue has been called since this gauge was created.
|
Snapshot[] |
getSnapshots()
Returns snapshots of the values if the gauge was configured to summarize.
|
StatisticConfig[] |
getStatisticsConfig()
Returns statistics configs added for summarization.
|
double |
getSum()
Returns the total amount of all values.
|
double |
getValue() |
default void |
increment()
Increment the gauge by one.
|
void |
increment(double amount)
Increment the gauge by
amount . |
default Gauge |
register()
Registers the gauge instance to the metrics registry.
|
void |
setValue(double value)
Set the gauge to the given value.
|
default void |
unregister()
Unregisters the metric to the registry.
|
static Gauge.Builder builder(String name)
Gauge
.name
- The name of the metric.Gauge
.default Gauge register()
default void unregister()
unregister
in interface Metric
default void increment()
void increment(double amount)
amount
.amount
- Amount to add to the gauge.default void decrement()
void decrement(double amount)
amount
.amount
- Amount to subtract from the gauge.void setValue(double value)
value
- The value to set to the gauge.double getValue()
long getCount()
double getSum()
Snapshot[] getSnapshots()
StatisticConfig[] getStatisticsConfig()
Copyright © 2018 WSO2. All rights reserved.