java.lang.Object
io.lettuce.core.XAddArgs
public class XAddArgs extends Object
Argument list builder for the Redis XADD command. Static import the methods from
XAddArgs.Builder and call the methods: maxlen(…) .
XAddArgs is a mutable object and instances should be used only once to avoid shared mutable state.
- Since:
- 5.1
- Author:
- Mark Paluch, dengliming
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classXAddArgs.BuilderBuilder entry points forXAddArgs. -
Constructor Summary
Constructors Constructor Description XAddArgs() -
Method Summary
Modifier and Type Method Description XAddArgsapproximateTrimming()Apply efficient trimming for capped streams using the~flag.XAddArgsapproximateTrimming(boolean approximateTrimming)Apply efficient trimming for capped streams using the~flag.<K, V> voidbuild(CommandArgs<K,V> args)XAddArgsexactTrimming()Apply exact trimming for capped streams using the=flag.XAddArgsexactTrimming(boolean exactTrimming)Apply exact trimming for capped streams using the=flag.XAddArgsid(String id)Specify the messageid.XAddArgslimit(long limit)The maximum number of entries to trim.XAddArgsmaxlen(long maxlen)Limit stream tomaxlenentries.XAddArgsminId(String minid)Limit stream entries by message Id.XAddArgsnomkstream()Do add the message if the stream does not already exist.XAddArgsnomkstream(boolean nomkstream)Do add the message if the stream does not already exist.
-
Constructor Details
-
XAddArgs
public XAddArgs()
-
-
Method Details
-
id
Specify the messageid.- Parameters:
id- must not benull.- Returns:
this
-
maxlen
Limit stream tomaxlenentries.- Parameters:
maxlen- number greater 0.- Returns:
this
-
minId
Limit stream entries by message Id.- Parameters:
minid- the oldest ID in the stream will be exactly the minimum between its original oldest ID and the specified threshold.- Returns:
this- Since:
- 6.1
-
limit
The maximum number of entries to trim.- Parameters:
limit- has meaning only if`~`was set.- Returns:
this- Since:
- 6.1
-
approximateTrimming
Apply efficient trimming for capped streams using the~flag.- Returns:
this
-
approximateTrimming
Apply efficient trimming for capped streams using the~flag.- Parameters:
approximateTrimming-trueto apply efficient radix node trimming.- Returns:
this
-
exactTrimming
Apply exact trimming for capped streams using the=flag.- Returns:
this- Since:
- 6.1
-
exactTrimming
Apply exact trimming for capped streams using the=flag.- Parameters:
exactTrimming-trueto apply exact radix node trimming.- Returns:
this- Since:
- 6.1
-
nomkstream
Do add the message if the stream does not already exist.- Returns:
this- Since:
- 6.1
-
nomkstream
Do add the message if the stream does not already exist.- Parameters:
nomkstream-trueto not create a stream if it does not already exist.- Returns:
this- Since:
- 6.1
-
build
-