public static class HotkeysArgs.Builder extends Object
HotkeysArgs.| Modifier and Type | Method and Description |
|---|---|
static HotkeysArgs |
count(int count)
Creates new
HotkeysArgs with COUNT set. |
static HotkeysArgs |
duration(Duration duration)
Creates new
HotkeysArgs with DURATION set. |
static HotkeysArgs |
duration(long duration)
Creates new
HotkeysArgs with DURATION set. |
static HotkeysArgs |
metrics(HotkeysArgs.Metric... metrics)
Creates new
HotkeysArgs with METRICS set. |
static HotkeysArgs |
sample(int ratio)
Creates new
HotkeysArgs with SAMPLE set. |
static HotkeysArgs |
slots(int... slots)
Creates new
HotkeysArgs with SLOTS set. |
public static HotkeysArgs metrics(HotkeysArgs.Metric... metrics)
HotkeysArgs with METRICS set.metrics - the metrics to track.HotkeysArgs with METRICS set.HotkeysArgs.metrics(Metric...)public static HotkeysArgs count(int count)
HotkeysArgs with COUNT set.count - number of top keys to report (min: , max: ).HotkeysArgs with COUNT set.HotkeysArgs.count(int)public static HotkeysArgs duration(long duration)
HotkeysArgs with DURATION set.duration - auto-stop duration in seconds (min: , 0 = no auto-stop).HotkeysArgs with DURATION set.HotkeysArgs.duration(long)public static HotkeysArgs duration(Duration duration)
HotkeysArgs with DURATION set.duration - auto-stop duration (min: s).HotkeysArgs with DURATION set.HotkeysArgs.duration(Duration)public static HotkeysArgs sample(int ratio)
HotkeysArgs with SAMPLE set.ratio - sampling ratio (min: ).HotkeysArgs with SAMPLE set.HotkeysArgs.sample(int)public static HotkeysArgs slots(int... slots)
HotkeysArgs with SLOTS set.
Specifies which hash slots to track for hotkeys collection (cluster mode only). In the response, Redis groups
consecutive slots into ranges. For example, if you specify slots 0, 1, 2, and 100, the response will contain
[[0, 2], [100]] - consecutive slots 0-2 are grouped, while slot 100 remains separate.
slots - the slot numbers to track (each: -, max count:
).HotkeysArgs with SLOTS set.HotkeysArgs.slots(int...),
HotkeysReply.getSelectedSlots()Copyright © 2026 lettuce.io. All rights reserved.