public class XAddArgs extends Object
XAddArgs.Builder and call the methods: maxlen(…) .
XAddArgs is a mutable object and instances should be used only once to avoid shared mutable state.
| Modifier and Type | Class and Description |
|---|---|
static class |
XAddArgs.Builder
Builder entry points for
XAddArgs. |
| Constructor and Description |
|---|
XAddArgs() |
| Modifier and Type | Method and Description |
|---|---|
XAddArgs |
approximateTrimming()
Apply efficient trimming for capped streams using the
~ flag. |
XAddArgs |
approximateTrimming(boolean approximateTrimming)
Apply efficient trimming for capped streams using the
~ flag. |
<K,V> void |
build(CommandArgs<K,V> args) |
XAddArgs |
exactTrimming()
Apply exact trimming for capped streams using the
= flag. |
XAddArgs |
exactTrimming(boolean exactTrimming)
Apply exact trimming for capped streams using the
= flag. |
XAddArgs |
id(String id)
Specify the message
id. |
XAddArgs |
limit(long limit)
The maximum number of entries to trim.
|
XAddArgs |
maxlen(long maxlen)
Limit stream to
maxlen entries. |
XAddArgs |
minId(String minid)
Limit stream entries by message Id.
|
XAddArgs |
nomkstream()
Do add the message if the stream does not already exist.
|
XAddArgs |
nomkstream(boolean nomkstream)
Do add the message if the stream does not already exist.
|
public XAddArgs id(String id)
id.id - must not be null.thispublic XAddArgs maxlen(long maxlen)
maxlen entries.maxlen - number greater 0.thispublic XAddArgs 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 XAddArgs limit(long limit)
limit - has meaning only if `~` was set.thispublic XAddArgs approximateTrimming()
~ flag.thispublic XAddArgs approximateTrimming(boolean approximateTrimming)
~ flag.approximateTrimming - true to apply efficient radix node trimming.thispublic XAddArgs exactTrimming()
= flag.thispublic XAddArgs exactTrimming(boolean exactTrimming)
= flag.exactTrimming - true to apply exact radix node trimming.thispublic XAddArgs nomkstream()
thispublic XAddArgs nomkstream(boolean nomkstream)
nomkstream - true to not create a stream if it does not already exist.thispublic <K,V> void build(CommandArgs<K,V> args)
Copyright © 2021 lettuce.io. All rights reserved.