Package io.lettuce.core.metrics
Interface CommandLatencyCollectorOptions
-
- All Known Implementing Classes:
DefaultCommandLatencyCollectorOptions
public interface CommandLatencyCollectorOptions
Configuration interface for command latency collection.- Author:
- Mark Paluch
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
CommandLatencyCollectorOptions.Builder
Builder forCommandLatencyCollectorOptions
.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static CommandLatencyCollectorOptions.Builder
builder()
Returns a newCommandLatencyCollectorOptions.Builder
to constructCommandLatencyCollectorOptions
.static CommandLatencyCollectorOptions
create()
Create a newCommandLatencyCollectorOptions
instance using default settings.static CommandLatencyCollectorOptions
disabled()
Create aCommandLatencyCollectorOptions
instance with disabled event emission.boolean
isEnabled()
Returns whether the latency collector is enabled.boolean
localDistinction()
Returns whether to distinct latencies on local level.CommandLatencyCollectorOptions.Builder
mutate()
Returns a builder to create newCommandLatencyCollectorOptions
whose settings are replicated from the currentCommandLatencyCollectorOptions
.boolean
resetLatenciesAfterEvent()
Returns whether the latencies should be reset once an event is emitted.double[]
targetPercentiles()
Returns the percentiles which should be exposed in the metric.TimeUnit
targetUnit()
Returns the targetTimeUnit
for the emitted latencies.boolean
usePauseDetector()
Returns whether PauseDetector is enabled.
-
-
-
Method Detail
-
create
static CommandLatencyCollectorOptions create()
Create a newCommandLatencyCollectorOptions
instance using default settings.- Returns:
- a new instance of
CommandLatencyCollectorOptions
instance using default settings - Since:
- 5.1
-
disabled
static CommandLatencyCollectorOptions disabled()
Create aCommandLatencyCollectorOptions
instance with disabled event emission.- Returns:
- a new instance of
CommandLatencyCollectorOptions
with disabled event emission - Since:
- 5.1
-
builder
static CommandLatencyCollectorOptions.Builder builder()
Returns a newCommandLatencyCollectorOptions.Builder
to constructCommandLatencyCollectorOptions
.- Returns:
- a new
CommandLatencyCollectorOptions.Builder
to constructCommandLatencyCollectorOptions
. - Since:
- 5.1
-
mutate
CommandLatencyCollectorOptions.Builder mutate()
Returns a builder to create newCommandLatencyCollectorOptions
whose settings are replicated from the currentCommandLatencyCollectorOptions
.- Returns:
- a a
CommandLatencyCollectorOptions.Builder
to create newCommandLatencyCollectorOptions
whose settings are replicated from the currentCommandLatencyCollectorOptions
- Since:
- 5.1
-
targetUnit
TimeUnit targetUnit()
Returns the targetTimeUnit
for the emitted latencies.- Returns:
- the target
TimeUnit
for the emitted latencies
-
targetPercentiles
double[] targetPercentiles()
Returns the percentiles which should be exposed in the metric.- Returns:
- the percentiles which should be exposed in the metric
-
resetLatenciesAfterEvent
boolean resetLatenciesAfterEvent()
Returns whether the latencies should be reset once an event is emitted.- Returns:
true
if the latencies should be reset once an event is emitted.
-
localDistinction
boolean localDistinction()
Returns whether to distinct latencies on local level. Iftrue
, multiple connections to the same host/connection point will be recorded separately which allows to inspect every connection individually. Iffalse
, multiple connections to the same host/connection point will be recorded together. This allows a consolidated view on one particular service.- Returns:
true
if latencies are recorded distinct on local level (per connection)
-
isEnabled
boolean isEnabled()
Returns whether the latency collector is enabled.- Returns:
true
if the latency collector is enabled
-
usePauseDetector
boolean usePauseDetector()
Returns whether PauseDetector is enabled. Defaults to no pause detector.- Returns:
true
if the PauseDetector is enabled- Since:
- 6.1.7
-
-