public class XTrimArgs extends Object implements CompositeArgument
XTrimArgs.Builder and call the methods: maxlen(…) .
XTrimArgs is a mutable object and instances should be used only once to avoid shared mutable state.
| Modifier and Type | Class and Description |
|---|---|
static class |
XTrimArgs.Builder
Builder entry points for
XTrimArgs. |
| Constructor and Description |
|---|
XTrimArgs() |
| Modifier and Type | Method and Description |
|---|---|
XTrimArgs |
approximateTrimming()
Apply efficient trimming for capped streams using the
~ flag. |
XTrimArgs |
approximateTrimming(boolean approximateTrimming)
Apply efficient trimming for capped streams using the
~ flag. |
<K,V> void |
build(CommandArgs<K,V> args)
Build command arguments and contribute arguments to
CommandArgs. |
XTrimArgs |
exactTrimming()
Apply exact trimming for capped streams using the
= flag. |
XTrimArgs |
exactTrimming(boolean exactTrimming)
Apply exact trimming for capped streams using the
= flag. |
XTrimArgs |
limit(long limit)
The maximum number of entries to trim.
|
XTrimArgs |
maxlen(long maxlen)
Limit stream to
maxlen entries. |
XTrimArgs |
minId(String minid)
Limit stream entries by message Id.
|
public XTrimArgs maxlen(long maxlen)
maxlen entries.maxlen - number greater 0.thispublic XTrimArgs minId(String minid)
minid - the oldest ID in the stream will be exactly the minimum between its original oldest ID and the specified
threshold.thispublic XTrimArgs limit(long limit)
limit - has meaning only if `~` was set.thispublic XTrimArgs approximateTrimming()
~ flag.thispublic XTrimArgs approximateTrimming(boolean approximateTrimming)
~ flag.approximateTrimming - true to apply efficient radix node trimming.thispublic XTrimArgs exactTrimming()
= flag.thispublic XTrimArgs exactTrimming(boolean exactTrimming)
= flag.exactTrimming - true to apply exact radix node trimming.thispublic <K,V> void build(CommandArgs<K,V> args)
CompositeArgumentCommandArgs.
Implementing classes are required to implement this method. Depending on the command nature and configured arguments, this method may contribute arguments but is not required to add arguments if none are specified.
build in interface CompositeArgumentK - Key type.V - Value type.args - the command arguments, must not be null.Copyright © 2021 lettuce.io. All rights reserved.