Class XAddArgs
java.lang.Object
io.quarkus.redis.datasource.stream.XAddArgs
- All Implemented Interfaces:
RedisCommandExtraArguments
The argument of the XADD command.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionSets the stream id to identify a given entry inside a stream.limit
(long limit) Sets the maximum entries that can get evicted.Sets the max length of the stream.Evicts entries from the stream having IDs lower to the specified one.When set, prefix themaxlen
with~
to enable the almost exact trimming.Do not create a new stream if the stream does not exist yet.toArgs()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.quarkus.redis.datasource.RedisCommandExtraArguments
toArgs
-
Constructor Details
-
XAddArgs
public XAddArgs()
-
-
Method Details
-
id
Sets the stream id to identify a given entry inside a stream. If not set, the stream id is generated by the Redis server.- Parameters:
id
- the id, must not benull
, but be formed by two numbers separated by a-
. In general, the first number is a timestamp.- Returns:
- the current
XAddArgs
-
maxlen
Sets the max length of the stream. WhenXADD
is called with this parameter, the new entry is added to the stream, but if the max size is reached, the oldest entry is evicted.- Parameters:
maxlen
- the max length of the stream, must be positive- Returns:
- the current
XAddArgs
-
nearlyExactTrimming
When set, prefix themaxlen
with~
to enable the almost exact trimming. This is recommended when usingmaxlen(Long)
.- Returns:
- the current
XAddArgs
-
nomkstream
Do not create a new stream if the stream does not exist yet.- Returns:
- the current
XAddArgs
-
minid
Evicts entries from the stream having IDs lower to the specified one.- Parameters:
minid
- the min id, must not benull
, must be a valid stream id- Returns:
- the current
XAddArgs
-
limit
Sets the maximum entries that can get evicted.- Parameters:
limit
- the limit, must be positive- Returns:
- the current
XAddArgs
-
toArgs
- Specified by:
toArgs
in interfaceRedisCommandExtraArguments
- Returns:
- the list of arguments.
-