Package io.toro.martini.redis
Class RedisStreamMethods
- java.lang.Object
-
- io.toro.martini.redis.RedisBaseMethods
-
- io.toro.martini.redis.RedisStreamMethods
-
public class RedisStreamMethods extends io.toro.martini.redis.RedisBaseMethods
Methods for Streams.
-
-
Constructor Summary
Constructors Constructor Description RedisStreamMethods(io.toro.martini.database.DataSourceManager dataSourceManager)
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Long
xack(String connectionName, Object key, Object group, GloopExecutionContext context, String... messageIds)
Acknowledge one or more messages as processed.static Future<Long>
xackAsync(String connectionName, Object key, Object group, GloopExecutionContext context, String... messageIds)
Asynchronously acknowledge one or more messages as processed.static String
xadd(String connectionName, Object key, XAddArgs args, GloopExecutionContext context, Object... keysAndValues)
Append a message to the streamkey
.static String
xadd(String connectionName, Object key, XAddArgs args, GloopModel redisMap, GloopExecutionContext context)
Append a message to the streamkey
.static String
xadd(String connectionName, Object key, GloopExecutionContext context, Object... keysAndValues)
Append a message to the streamkey
.static String
xadd(String connectionName, Object key, GloopModel redisMap, GloopExecutionContext context)
Append a message to the streamkey
.static Future<String>
xaddAsync(String connectionName, Object key, XAddArgs args, GloopExecutionContext context, Object... keysAndValues)
Asynchronously append a message to the streamkey
.static Future<String>
xaddAsync(String connectionName, Object key, XAddArgs args, GloopModel redisMap, GloopExecutionContext context)
Asynchronously append a message to the streamkey
.static Future<String>
xaddAsync(String connectionName, Object key, GloopExecutionContext context, Object... keysAndValues)
Asynchronously append a message to the streamkey
.static Future<String>
xaddAsync(String connectionName, Object key, GloopModel redisMap, GloopExecutionContext context)
Asynchronously append a message to the streamkey
.static List<StreamMessage<Object,Object>>
xclaim(String connectionName, Object key, Consumer<Object> consumer, long minIdleTime, GloopExecutionContext context, String... messageIds)
Gets ownership of one or multiple messages in the Pending Entries List of a given stream consumer group.static List<StreamMessage<Object,Object>>
xclaim(String connectionName, Object key, Consumer<Object> consumer, XClaimArgs args, GloopExecutionContext context, String... messageIds)
Gets ownership of one or multiple messages in the Pending Entries List of a given stream consumer group.static Future<List<StreamMessage<Object,Object>>>
xclaimAsync(String connectionName, Object key, Consumer<Object> consumer, long minIdleTime, GloopExecutionContext context, String... messageIds)
Asynchronously gets ownership of one or multiple messages in the pending entries list of a given stream consumer group.static Future<List<StreamMessage<Object,Object>>>
xclaimAsync(String connectionName, Object key, Consumer<Object> consumer, XClaimArgs args, GloopExecutionContext context, String... messageIds)
Asynchronously gets ownership of one or multiple messages in the pending entries list of a given stream consumer group.static Long
xdel(String connectionName, Object key, GloopExecutionContext context, String... messageIds)
Removes the specified entries from the stream.static Future<Long>
xdelAsync(String connectionName, Object key, GloopExecutionContext context, String... messageIds)
Asynchronously removes the specified entries from the stream.static String
xgroupCreate(String connectionName, XReadArgs.StreamOffset<Object> streamOffset, Object group, GloopExecutionContext context)
Create a consumer group.static Future<String>
xgroupCreateAsync(String connectionName, XReadArgs.StreamOffset<Object> streamOffset, Object group, GloopExecutionContext context)
Asynchronously create a consumer group.static Boolean
xgroupDelconsumer(String connectionName, Object key, Consumer<Object> consumer, GloopExecutionContext context)
Delete a consumer from a consumer group.static Future<Boolean>
xgroupDelconsumerAsync(String connectionName, Object key, Consumer<Object> consumer, GloopExecutionContext context)
Asynchronously delete a consumer from a consumer group.static Boolean
xgroupDestroy(String connectionName, Object key, Object group, GloopExecutionContext context)
Destroy a consumer group.static Future<Boolean>
xgroupDestroyAsync(String connectionName, Object key, Object group, GloopExecutionContext context)
Asynchronously destroy a consumer group.static String
xgroupSetid(String connectionName, XReadArgs.StreamOffset<Object> streamOffset, Object group, GloopExecutionContext context)
Set the currentgroup
id.static Future<String>
xgroupSetidAsync(String connectionName, XReadArgs.StreamOffset<Object> streamOffset, Object group, GloopExecutionContext context)
Asynchronously set the currentgroup
id.static Long
xlen(String connectionName, Object key, GloopExecutionContext context)
Get the length of a steam.static Future<Long>
xlenAsync(String connectionName, Object key, GloopExecutionContext context)
Asynchronously get the length of a steam.static List<Object>
xpending(String connectionName, Object key, Consumer<Object> consumer, Range<String> range, Limit limit, GloopExecutionContext context)
Read pending messages from a stream within a specificRange
.static List<Object>
xpending(String connectionName, Object key, Object group, Range<String> range, Limit limit, GloopExecutionContext context)
Read pending messages from a stream within a specificRange
.static List<Object>
xpending(String connectionName, Object key, Object group, GloopExecutionContext context)
Read pending messages from a stream for agroup
.static Future<List<Object>>
xpendingAsync(String connectionName, Object key, Consumer<Object> consumer, Range<String> range, Limit limit, GloopExecutionContext context)
Asynchronously read pending messages from a stream within a specificRange
.static Future<List<Object>>
xpendingAsync(String connectionName, Object key, Object group, Range<String> range, Limit limit, GloopExecutionContext context)
Asynchronously read pending messages from a stream within a specificRange
.static Future<List<Object>>
xpendingAsync(String connectionName, Object key, Object group, GloopExecutionContext context)
Asynchronously read pending messages from a stream for agroup
.static List<StreamMessage<Object,Object>>
xrange(String connectionName, Object key, Range<String> range, Limit limit, GloopExecutionContext context)
static List<StreamMessage<Object,Object>>
xrange(String connectionName, Object key, Range<String> range, GloopExecutionContext context)
Read messages from a stream within a specificRange
.static Future<List<StreamMessage<Object,Object>>>
xrangeAsync(String connectionName, Object key, Range<String> range, Limit limit, GloopExecutionContext context)
static Future<List<StreamMessage<Object,Object>>>
xrangeAsync(String connectionName, Object key, Range<String> range, GloopExecutionContext context)
Asynchronously read messages from a stream within a specificRange
.static List<StreamMessage<Object,Object>>
xread(String connectionName, XReadArgs args, GloopExecutionContext context, XReadArgs.StreamOffset<Object>... streams)
Read messages from one or moreXReadArgs.StreamOffset
s.static List<StreamMessage<Object,Object>>
xread(String connectionName, GloopExecutionContext context, XReadArgs.StreamOffset<Object>... streams)
Read messages from one or moreXReadArgs.StreamOffset
s.static Future<List<StreamMessage<Object,Object>>>
xreadAsync(String connectionName, XReadArgs args, GloopExecutionContext context, XReadArgs.StreamOffset<Object>... streams)
Asynchronously read messages from one or moreXReadArgs.StreamOffset
s.static Future<List<StreamMessage<Object,Object>>>
xreadAsync(String connectionName, GloopExecutionContext context, XReadArgs.StreamOffset<Object>... streams)
Asynchronously read messages from one or moreXReadArgs.StreamOffset
s.static List<StreamMessage<Object,Object>>
xreadgroup(String connectionName, Consumer<Object> consumer, XReadArgs args, GloopExecutionContext context, XReadArgs.StreamOffset<Object>... streams)
Read messages from one or moreXReadArgs.StreamOffset
s using a consumer group.static List<StreamMessage<Object,Object>>
xreadgroup(String connectionName, Consumer<Object> consumer, GloopExecutionContext context, XReadArgs.StreamOffset<Object>... streams)
Read messages from one or moreXReadArgs.StreamOffset
s using a consumer group.static Future<List<StreamMessage<Object,Object>>>
xreadgroupAsync(String connectionName, Consumer<Object> consumer, XReadArgs args, GloopExecutionContext context, XReadArgs.StreamOffset<Object>... streams)
Asynchronously read messages from one or moreXReadArgs.StreamOffset
s using a consumer group.static Future<List<StreamMessage<Object,Object>>>
xreadgroupAsync(String connectionName, Consumer<Object> consumer, GloopExecutionContext context, XReadArgs.StreamOffset<Object>... streams)
Asynchronously read messages from one or moreXReadArgs.StreamOffset
s using a consumer group.static List<StreamMessage<Object,Object>>
xrevrange(String connectionName, Object key, Range<String> range, Limit limit, GloopExecutionContext context)
static List<StreamMessage<Object,Object>>
xrevrange(String connectionName, Object key, Range<String> range, GloopExecutionContext context)
Read messages from a stream within a specificRange
in reverse order.static Future<List<StreamMessage<Object,Object>>>
xrevrangeAsync(String connectionName, Object key, Range<String> range, Limit limit, GloopExecutionContext context)
static Future<List<StreamMessage<Object,Object>>>
xrevrangeAsync(String connectionName, Object key, Range<String> range, GloopExecutionContext context)
Asynchronously read messages from a stream within a specificRange
in reverse order.static Long
xtrim(String connectionName, Object key, boolean approximateTrimming, long count, GloopExecutionContext context)
Trims the stream tocount
elements.static Long
xtrim(String connectionName, Object key, long count, GloopExecutionContext context)
Trims the stream tocount
elements.static Future<Long>
xtrimAsync(String connectionName, Object key, boolean approximateTrimming, long count, GloopExecutionContext context)
Asynchronously trims the stream tocount
elements.static Future<Long>
xtrimAsync(String connectionName, Object key, long count, GloopExecutionContext context)
Asynchronously trims the stream tocount
elements.
-
-
-
Constructor Detail
-
RedisStreamMethods
@Autowired RedisStreamMethods(io.toro.martini.database.DataSourceManager dataSourceManager)
-
-
Method Detail
-
xack
@GloopParameter(name="redisXackOutput") public static Long xack(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, @GloopParameter(allowNull=false) Object group, GloopExecutionContext context, @GloopParameter(allowNull=false) String... messageIds)
Acknowledge one or more messages as processed.- Parameters:
connectionName
- The Martini Runtime Redis connection pool namekey
- the stream key.group
- name of the consumer group.messageIds
- message Id's to acknowledge.- Returns:
- simple-reply the length of acknowledged messages.
-
xackAsync
@GloopParameter(name="redisFutureXackOutput") public static Future<Long> xackAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, @GloopParameter(allowNull=false) Object group, GloopExecutionContext context, @GloopParameter(allowNull=false) String... messageIds)
Asynchronously acknowledge one or more messages as processed.- Parameters:
connectionName
- The Martini Runtime Redis connection pool namekey
- the stream key.group
- name of the consumer group.messageIds
- message id's to acknowledge.- Returns:
- simple-reply the length of acknowledged messages.
-
xadd
@GloopParameter(name="redisXaddOutput") public static String xadd(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, @GloopObjectParameter("redisMap[]{\n name:object\n value:object\n}\n") GloopModel redisMap, GloopExecutionContext context)
Append a message to the streamkey
.- Parameters:
connectionName
- The Martini Runtime Redis connection pool namekey
- the stream key.redisMap
- message body.- Returns:
- simple-reply the message Id.
-
xadd
@GloopParameter(name="redisXaddOutput") public static String xadd(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, @GloopParameter(allowNull=false) XAddArgs args, @GloopObjectParameter("redisMap[]{\n name:object\n value:object\n}\n") GloopModel redisMap, GloopExecutionContext context)
Append a message to the streamkey
.- Parameters:
connectionName
- The Martini Runtime Redis connection pool namekey
- the stream key.redisMap
- message body.- Returns:
- simple-reply the message Id.
-
xadd
@GloopParameter(name="redisXaddOutput") public static String xadd(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, GloopExecutionContext context, @GloopParameter(allowNull=false) Object... keysAndValues)
Append a message to the streamkey
.- Parameters:
connectionName
- The Martini Runtime Redis connection pool namekey
- the stream key.keysAndValues
- message body.- Returns:
- simple-reply the message Id.
-
xadd
@GloopParameter(name="redisXaddOutput") public static String xadd(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, @GloopParameter(allowNull=false) XAddArgs args, GloopExecutionContext context, @GloopParameter(allowNull=false) Object... keysAndValues)
Append a message to the streamkey
.- Parameters:
connectionName
- The Martini Runtime Redis connection pool namekey
- the stream key.keysAndValues
- message body.- Returns:
- simple-reply the message Id.
-
xaddAsync
@GloopParameter(name="redisFutureXaddOutput") public static Future<String> xaddAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, @GloopObjectParameter("redisMap[]{\n name:object\n value:object\n}\n") GloopModel redisMap, GloopExecutionContext context)
Asynchronously append a message to the streamkey
.- Parameters:
connectionName
- The Martini Runtime Redis connection pool namekey
- the stream key.redisMap
- message body.- Returns:
- simple-reply the message id.
-
xaddAsync
@GloopParameter(name="redisFutureXaddOutput") public static Future<String> xaddAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, @GloopParameter(allowNull=false) XAddArgs args, @GloopObjectParameter("redisMap[]{\n name:object\n value:object\n}\n") GloopModel redisMap, GloopExecutionContext context)
Asynchronously append a message to the streamkey
.- Parameters:
connectionName
- The Martini Runtime Redis connection pool namekey
- the stream key.redisMap
- message body.- Returns:
- simple-reply the message id.
-
xaddAsync
@GloopParameter(name="redisFutureXaddOutput") public static Future<String> xaddAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, GloopExecutionContext context, @GloopParameter(allowNull=false) Object... keysAndValues)
Asynchronously append a message to the streamkey
.- Parameters:
connectionName
- The Martini Runtime Redis connection pool namekey
- the stream key.keysAndValues
- message body.- Returns:
- simple-reply the message id.
-
xaddAsync
@GloopParameter(name="redisFutureXaddOutput") public static Future<String> xaddAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, @GloopParameter(allowNull=false) XAddArgs args, GloopExecutionContext context, @GloopParameter(allowNull=false) Object... keysAndValues)
Asynchronously append a message to the streamkey
.- Parameters:
connectionName
- The Martini Runtime Redis connection pool namekey
- the stream key.keysAndValues
- message body.- Returns:
- simple-reply the message id.
-
xclaim
@GloopParameter(name="redisXclaimOutput") public static List<StreamMessage<Object,Object>> xclaim(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, @GloopParameter(allowNull=false) Consumer<Object> consumer, @GloopParameter(allowNull=false) long minIdleTime, GloopExecutionContext context, @GloopParameter(allowNull=false) String... messageIds)
Gets ownership of one or multiple messages in the Pending Entries List of a given stream consumer group.- Parameters:
connectionName
- The Martini Runtime Redis connection pool namekey
- the stream key.consumer
- consumer identified by group name and consumer key.messageIds
- message Id's to claim.- Returns:
- simple-reply the
StreamMessage
-
xclaim
@GloopParameter(name="redisXclaimOutput") public static List<StreamMessage<Object,Object>> xclaim(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, @GloopParameter(allowNull=false) Consumer<Object> consumer, @GloopParameter(allowNull=false) XClaimArgs args, GloopExecutionContext context, @GloopParameter(allowNull=false) String... messageIds)
Gets ownership of one or multiple messages in the Pending Entries List of a given stream consumer group.- Parameters:
connectionName
- The Martini Runtime Redis connection pool namekey
- the stream key.consumer
- consumer identified by group name and consumer key.messageIds
- message Id's to claim.- Returns:
- simple-reply the
StreamMessage
-
xclaimAsync
@GloopParameter(name="redisFutureXclaimOutput") public static Future<List<StreamMessage<Object,Object>>> xclaimAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, @GloopParameter(allowNull=false) Consumer<Object> consumer, @GloopParameter(allowNull=false) long minIdleTime, GloopExecutionContext context, @GloopParameter(allowNull=false) String... messageIds)
Asynchronously gets ownership of one or multiple messages in the pending entries list of a given stream consumer group.- Parameters:
connectionName
- The Martini Runtime Redis connection pool namekey
- the stream key.consumer
- consumer identified by group name and consumer key.messageIds
- message id's to claim.- Returns:
- simple-reply the
StreamMessage
-
xclaimAsync
@GloopParameter(name="redisFutureXclaimOutput") public static Future<List<StreamMessage<Object,Object>>> xclaimAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, @GloopParameter(allowNull=false) Consumer<Object> consumer, @GloopParameter(allowNull=false) XClaimArgs args, GloopExecutionContext context, @GloopParameter(allowNull=false) String... messageIds)
Asynchronously gets ownership of one or multiple messages in the pending entries list of a given stream consumer group.- Parameters:
connectionName
- The Martini Runtime Redis connection pool namekey
- the stream key.consumer
- consumer identified by group name and consumer key.messageIds
- message id's to claim.- Returns:
- simple-reply the
StreamMessage
-
xdel
@GloopParameter(name="redisXdelOutput") public static Long xdel(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, GloopExecutionContext context, @GloopParameter(allowNull=false) String... messageIds)
Removes the specified entries from the stream. Returns the number of items deleted, that may be different from the number of IDs passed in case certain IDs do not exist.- Parameters:
connectionName
- The Martini Runtime Redis connection pool namekey
- the stream key.messageIds
- stream message Id's.- Returns:
- simple-reply number of removed entries.
-
xdelAsync
@GloopParameter(name="redisFutureXdelOutput") public static Future<Long> xdelAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, GloopExecutionContext context, @GloopParameter(allowNull=false) String... messageIds)
Asynchronously removes the specified entries from the stream. returns the number of items deleted, that may be different from the number of iDs passed in case certain iDs do not exist.- Parameters:
connectionName
- The Martini Runtime Redis connection pool namekey
- the stream key.messageIds
- stream message id's.- Returns:
- simple-reply number of removed entries.
-
xgroupCreate
@GloopParameter(name="redisXgroupCreateOutput") public static String xgroupCreate(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) XReadArgs.StreamOffset<Object> streamOffset, @GloopParameter(allowNull=false) Object group, GloopExecutionContext context)
Create a consumer group.- Parameters:
connectionName
- The Martini Runtime Redis connection pool namestreamOffset
- name of the stream containing the offset to set.group
- name of the consumer group.- Returns:
- simple-reply true if successful.
-
xgroupCreateAsync
@GloopParameter(name="redisFutureXgroupCreateOutput") public static Future<String> xgroupCreateAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) XReadArgs.StreamOffset<Object> streamOffset, @GloopParameter(allowNull=false) Object group, GloopExecutionContext context)
Asynchronously create a consumer group.- Parameters:
connectionName
- The Martini Runtime Redis connection pool namestreamOffset
- name of the stream containing the offset to set.group
- name of the consumer group.- Returns:
- simple-reply true if successful.
-
xgroupDelconsumer
@GloopParameter(name="redisXgroupDelconsumerOutput") public static Boolean xgroupDelconsumer(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, @GloopParameter(allowNull=false) Consumer<Object> consumer, GloopExecutionContext context)
Delete a consumer from a consumer group.- Parameters:
connectionName
- The Martini Runtime Redis connection pool namekey
- the stream key.consumer
- consumer identified by group name and consumer key.- Returns:
- simple-reply true if successful.
-
xgroupDelconsumerAsync
@GloopParameter(name="redisFutureXgroupDelconsumerOutput") public static Future<Boolean> xgroupDelconsumerAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, @GloopParameter(allowNull=false) Consumer<Object> consumer, GloopExecutionContext context)
Asynchronously delete a consumer from a consumer group.- Parameters:
connectionName
- The Martini Runtime Redis connection pool namekey
- the stream key.consumer
- consumer identified by group name and consumer key.- Returns:
- simple-reply true if successful.
-
xgroupDestroy
@GloopParameter(name="redisXgroupDestroyOutput") public static Boolean xgroupDestroy(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, @GloopParameter(allowNull=false) Object group, GloopExecutionContext context)
Destroy a consumer group.- Parameters:
connectionName
- The Martini Runtime Redis connection pool namekey
- the stream key.group
- name of the consumer group.- Returns:
- simple-reply true if successful.
-
xgroupDestroyAsync
@GloopParameter(name="redisFutureXgroupDestroyOutput") public static Future<Boolean> xgroupDestroyAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, @GloopParameter(allowNull=false) Object group, GloopExecutionContext context)
Asynchronously destroy a consumer group.- Parameters:
connectionName
- The Martini Runtime Redis connection pool namekey
- the stream key.group
- name of the consumer group.- Returns:
- simple-reply true if successful.
-
xgroupSetid
@GloopParameter(name="redisXgroupSetidOutput") public static String xgroupSetid(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) XReadArgs.StreamOffset<Object> streamOffset, @GloopParameter(allowNull=false) Object group, GloopExecutionContext context)
Set the currentgroup
id.- Parameters:
connectionName
- The Martini Runtime Redis connection pool namestreamOffset
- name of the stream containing the offset to set.group
- name of the consumer group.- Returns:
- simple-reply OK
-
xgroupSetidAsync
@GloopParameter(name="redisFutureXgroupSetidOutput") public static Future<String> xgroupSetidAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) XReadArgs.StreamOffset<Object> streamOffset, @GloopParameter(allowNull=false) Object group, GloopExecutionContext context)
Asynchronously set the currentgroup
id.- Parameters:
connectionName
- The Martini Runtime Redis connection pool namestreamOffset
- name of the stream containing the offset to set.group
- name of the consumer group.- Returns:
- simple-reply oK
-
xlen
@GloopParameter(name="redisXlenOutput") public static Long xlen(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, GloopExecutionContext context)
Get the length of a steam.- Parameters:
connectionName
- The Martini Runtime Redis connection pool namekey
- the stream key.- Returns:
- simple-reply the length of the stream.
-
xlenAsync
@GloopParameter(name="redisFutureXlenOutput") public static Future<Long> xlenAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, GloopExecutionContext context)
Asynchronously get the length of a steam.- Parameters:
connectionName
- The Martini Runtime Redis connection pool namekey
- the stream key.- Returns:
- simple-reply the length of the stream.
-
xpending
@GloopParameter(name="redisXpendingOutput") public static List<Object> xpending(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, @GloopParameter(allowNull=false) Object group, GloopExecutionContext context)
Read pending messages from a stream for agroup
.- Parameters:
connectionName
- The Martini Runtime Redis connection pool namekey
- the stream key.group
- name of the consumer group.- Returns:
- List<Object> array-reply list pending entries.
-
xpending
@GloopParameter(name="redisXpendingOutput") public static List<Object> xpending(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, @GloopParameter(allowNull=false) Object group, @GloopParameter(allowNull=false) Range<String> range, @GloopParameter(allowNull=false) Limit limit, GloopExecutionContext context)
Read pending messages from a stream within a specificRange
.- Parameters:
connectionName
- The Martini Runtime Redis connection pool namekey
- the stream key.group
- name of the consumer group.range
- must not be null.limit
- must not be null.- Returns:
- List<Object> array-reply list with members of the resulting stream.
-
xpending
@GloopParameter(name="redisXpendingOutput") public static List<Object> xpending(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, @GloopParameter(allowNull=false) Consumer<Object> consumer, @GloopParameter(allowNull=false) Range<String> range, @GloopParameter(allowNull=false) Limit limit, GloopExecutionContext context)
Read pending messages from a stream within a specificRange
.- Parameters:
connectionName
- The Martini Runtime Redis connection pool namekey
- the stream key.consumer
- consumer identified by group name and consumer key.range
- must not be null.limit
- must not be null.- Returns:
- List<Object> array-reply list with members of the resulting stream.
-
xpendingAsync
@GloopParameter(name="redisFutureXpendingOutput") public static Future<List<Object>> xpendingAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, @GloopParameter(allowNull=false) Object group, GloopExecutionContext context)
Asynchronously read pending messages from a stream for agroup
.- Parameters:
connectionName
- The Martini Runtime Redis connection pool namekey
- the stream key.group
- name of the consumer group.- Returns:
- list<Object> array-reply list pending entries.
-
xpendingAsync
@GloopParameter(name="redisFutureXpendingOutput") public static Future<List<Object>> xpendingAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, @GloopParameter(allowNull=false) Object group, @GloopParameter(allowNull=false) Range<String> range, @GloopParameter(allowNull=false) Limit limit, GloopExecutionContext context)
Asynchronously read pending messages from a stream within a specificRange
.- Parameters:
connectionName
- The Martini Runtime Redis connection pool namekey
- the stream key.group
- name of the consumer group.range
- must not be null.limit
- must not be null.- Returns:
- list<Object> array-reply list with members of the resulting stream.
-
xpendingAsync
@GloopParameter(name="redisFutureXpendingOutput") public static Future<List<Object>> xpendingAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, @GloopParameter(allowNull=false) Consumer<Object> consumer, @GloopParameter(allowNull=false) Range<String> range, @GloopParameter(allowNull=false) Limit limit, GloopExecutionContext context)
Asynchronously read pending messages from a stream within a specificRange
.- Parameters:
connectionName
- The Martini Runtime Redis connection pool namekey
- the stream key.consumer
- consumer identified by group name and consumer key.range
- must not be null.limit
- must not be null.- Returns:
- list<Object> array-reply list with members of the resulting stream.
-
xrange
@GloopParameter(name="redisXrangeOutput") public static List<StreamMessage<Object,Object>> xrange(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, @GloopParameter(allowNull=false) Range<String> range, GloopExecutionContext context)
Read messages from a stream within a specificRange
.- Parameters:
connectionName
- The Martini Runtime Redis connection pool namekey
- the stream key.range
- must not be null.- Returns:
- List<StreamMessage> array-reply list with members of the resulting stream.
-
xrange
@GloopParameter(name="redisXrangeOutput") public static List<StreamMessage<Object,Object>> xrange(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, @GloopParameter(allowNull=false) Range<String> range, @GloopParameter(allowNull=false) Limit limit, GloopExecutionContext context)
- Parameters:
connectionName
- The Martini Runtime Redis connection pool namekey
- the stream key.range
- must not be null.limit
- must not be null.- Returns:
- List<StreamMessage> array-reply list with members of the resulting stream.
-
xrangeAsync
@GloopParameter(name="redisFutureXrangeOutput") public static Future<List<StreamMessage<Object,Object>>> xrangeAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, @GloopParameter(allowNull=false) Range<String> range, GloopExecutionContext context)
Asynchronously read messages from a stream within a specificRange
.- Parameters:
connectionName
- The Martini Runtime Redis connection pool namekey
- the stream key.range
- must not be null.- Returns:
- list<StreamMessage> array-reply list with members of the resulting stream.
-
xrangeAsync
@GloopParameter(name="redisFutureXrangeOutput") public static Future<List<StreamMessage<Object,Object>>> xrangeAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, @GloopParameter(allowNull=false) Range<String> range, @GloopParameter(allowNull=false) Limit limit, GloopExecutionContext context)
- Parameters:
connectionName
- The Martini Runtime Redis connection pool namekey
- the stream key.range
- must not be null.limit
- must not be null.- Returns:
- list<StreamMessage> array-reply list with members of the resulting stream.
-
xread
@GloopParameter(name="redisXreadOutput") public static List<StreamMessage<Object,Object>> xread(@GloopParameter(allowNull=false) String connectionName, GloopExecutionContext context, @GloopParameter(allowNull=false) XReadArgs.StreamOffset<Object>... streams)
Read messages from one or moreXReadArgs.StreamOffset
s.- Parameters:
connectionName
- The Martini Runtime Redis connection pool namestreams
- the streams to read from.- Returns:
- List<StreamMessage> array-reply list with members of the resulting stream.
-
xread
@GloopParameter(name="redisXreadOutput") public static List<StreamMessage<Object,Object>> xread(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) XReadArgs args, GloopExecutionContext context, @GloopParameter(allowNull=false) XReadArgs.StreamOffset<Object>... streams)
Read messages from one or moreXReadArgs.StreamOffset
s.- Parameters:
connectionName
- The Martini Runtime Redis connection pool nameargs
- read arguments.streams
- the streams to read from.- Returns:
- List<StreamMessage> array-reply list with members of the resulting stream.
-
xreadAsync
@GloopParameter(name="redisFutureXreadOutput") public static Future<List<StreamMessage<Object,Object>>> xreadAsync(@GloopParameter(allowNull=false) String connectionName, GloopExecutionContext context, @GloopParameter(allowNull=false) XReadArgs.StreamOffset<Object>... streams)
Asynchronously read messages from one or moreXReadArgs.StreamOffset
s.- Parameters:
connectionName
- The Martini Runtime Redis connection pool namestreams
- the streams to read from.- Returns:
- list<StreamMessage> array-reply list with members of the resulting stream.
-
xreadAsync
@GloopParameter(name="redisFutureXreadOutput") public static Future<List<StreamMessage<Object,Object>>> xreadAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) XReadArgs args, GloopExecutionContext context, @GloopParameter(allowNull=false) XReadArgs.StreamOffset<Object>... streams)
Asynchronously read messages from one or moreXReadArgs.StreamOffset
s.- Parameters:
connectionName
- The Martini Runtime Redis connection pool nameargs
- read arguments.streams
- the streams to read from.- Returns:
- list<StreamMessage> array-reply list with members of the resulting stream.
-
xreadgroup
@GloopParameter(name="redisXreadgroupOutput") public static List<StreamMessage<Object,Object>> xreadgroup(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Consumer<Object> consumer, GloopExecutionContext context, @GloopParameter(allowNull=false) XReadArgs.StreamOffset<Object>... streams)
Read messages from one or moreXReadArgs.StreamOffset
s using a consumer group.- Parameters:
connectionName
- The Martini Runtime Redis connection pool nameconsumer
- consumer/group.streams
- the streams to read from.- Returns:
- List<StreamMessage> array-reply list with members of the resulting stream.
-
xreadgroup
@GloopParameter(name="redisXreadgroupOutput") public static List<StreamMessage<Object,Object>> xreadgroup(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Consumer<Object> consumer, @GloopParameter(allowNull=false) XReadArgs args, GloopExecutionContext context, @GloopParameter(allowNull=false) XReadArgs.StreamOffset<Object>... streams)
Read messages from one or moreXReadArgs.StreamOffset
s using a consumer group.- Parameters:
connectionName
- The Martini Runtime Redis connection pool nameconsumer
- consumer/group.args
- read arguments.streams
- the streams to read from.- Returns:
- List<StreamMessage> array-reply list with members of the resulting stream.
-
xreadgroupAsync
@GloopParameter(name="redisFutureXreadgroupOutput") public static Future<List<StreamMessage<Object,Object>>> xreadgroupAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Consumer<Object> consumer, GloopExecutionContext context, @GloopParameter(allowNull=false) XReadArgs.StreamOffset<Object>... streams)
Asynchronously read messages from one or moreXReadArgs.StreamOffset
s using a consumer group.- Parameters:
connectionName
- The Martini Runtime Redis connection pool nameconsumer
- consumer/group.streams
- the streams to read from.- Returns:
- list<StreamMessage> array-reply list with members of the resulting stream.
-
xreadgroupAsync
@GloopParameter(name="redisFutureXreadgroupOutput") public static Future<List<StreamMessage<Object,Object>>> xreadgroupAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Consumer<Object> consumer, @GloopParameter(allowNull=false) XReadArgs args, GloopExecutionContext context, @GloopParameter(allowNull=false) XReadArgs.StreamOffset<Object>... streams)
Asynchronously read messages from one or moreXReadArgs.StreamOffset
s using a consumer group.- Parameters:
connectionName
- The Martini Runtime Redis connection pool nameconsumer
- consumer/group.args
- read arguments.streams
- the streams to read from.- Returns:
- list<StreamMessage> array-reply list with members of the resulting stream.
-
xrevrange
@GloopParameter(name="redisXrevrangeOutput") public static List<StreamMessage<Object,Object>> xrevrange(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, @GloopParameter(allowNull=false) Range<String> range, GloopExecutionContext context)
Read messages from a stream within a specificRange
in reverse order.- Parameters:
connectionName
- The Martini Runtime Redis connection pool namekey
- the stream key.range
- must not be null.- Returns:
- List<StreamMessage> array-reply list with members of the resulting stream.
-
xrevrange
@GloopParameter(name="redisXrevrangeOutput") public static List<StreamMessage<Object,Object>> xrevrange(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, @GloopParameter(allowNull=false) Range<String> range, @GloopParameter(allowNull=false) Limit limit, GloopExecutionContext context)
- Parameters:
connectionName
- The Martini Runtime Redis connection pool namekey
- the stream key.range
- must not be null.limit
- must not be null.- Returns:
- List<StreamMessage> array-reply list with members of the resulting stream.
-
xrevrangeAsync
@GloopParameter(name="redisFutureXrevrangeOutput") public static Future<List<StreamMessage<Object,Object>>> xrevrangeAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, @GloopParameter(allowNull=false) Range<String> range, GloopExecutionContext context)
Asynchronously read messages from a stream within a specificRange
in reverse order.- Parameters:
connectionName
- The Martini Runtime Redis connection pool namekey
- the stream key.range
- must not be null.- Returns:
- list<StreamMessage> array-reply list with members of the resulting stream.
-
xrevrangeAsync
@GloopParameter(name="redisFutureXrevrangeOutput") public static Future<List<StreamMessage<Object,Object>>> xrevrangeAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, @GloopParameter(allowNull=false) Range<String> range, @GloopParameter(allowNull=false) Limit limit, GloopExecutionContext context)
Asynchronously read messages from a stream within a specificRange
applying aLimit
in reverse order.- Parameters:
connectionName
- The Martini Runtime Redis connection pool namekey
- the stream key.range
- must not be null.limit
- must not be null.- Returns:
- list<StreamMessage> array-reply list with members of the resulting stream.
-
xtrim
@GloopParameter(name="redisXtrimOutput") public static Long xtrim(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, @GloopParameter(allowNull=false) long count, GloopExecutionContext context)
Trims the stream tocount
elements.- Parameters:
connectionName
- The Martini Runtime Redis connection pool namekey
- the stream key.count
- length of the stream.- Returns:
- simple-reply number of removed entries.
-
xtrim
@GloopParameter(name="redisXtrimOutput") public static Long xtrim(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, @GloopParameter(allowNull=false) boolean approximateTrimming, @GloopParameter(allowNull=false) long count, GloopExecutionContext context)
Trims the stream tocount
elements.- Parameters:
connectionName
- The Martini Runtime Redis connection pool namekey
- the stream key.approximateTrimming
-
-
xtrimAsync
@GloopParameter(name="redisFutureXtrimOutput") public static Future<Long> xtrimAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, @GloopParameter(allowNull=false) long count, GloopExecutionContext context)
Asynchronously trims the stream tocount
elements.- Parameters:
connectionName
- The Martini Runtime Redis connection pool namekey
- the stream key.count
- length of the stream.- Returns:
- simple-reply number of removed entries.
-
xtrimAsync
@GloopParameter(name="redisFutureXtrimOutput") public static Future<Long> xtrimAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, @GloopParameter(allowNull=false) boolean approximateTrimming, @GloopParameter(allowNull=false) long count, GloopExecutionContext context)
Asynchronously trims the stream tocount
elements.- Parameters:
connectionName
- The Martini Runtime Redis connection pool namekey
- the stream key.approximateTrimming
-
-
-