From 41b86b1a88e7730501ddcd650e738c0e44b18c97 Mon Sep 17 00:00:00 2001 From: M Sazzadul Hoque <7600764+sazzad16@users.noreply.github.com> Date: Tue, 8 Dec 2020 17:08:16 +0600 Subject: [PATCH] Move XREAD and XREADGROUP methods in MultiKey... interfaces --- .../jedis/commands/JedisClusterCommands.java | 18 +++--------- .../MultiKeyJedisClusterCommands.java | 28 +++++++++++++++++++ 2 files changed, 32 insertions(+), 14 deletions(-) diff --git a/src/main/java/redis/clients/jedis/commands/JedisClusterCommands.java b/src/main/java/redis/clients/jedis/commands/JedisClusterCommands.java index 9273831367..c5dc74632b 100644 --- a/src/main/java/redis/clients/jedis/commands/JedisClusterCommands.java +++ b/src/main/java/redis/clients/jedis/commands/JedisClusterCommands.java @@ -413,12 +413,8 @@ List georadiusByMemberReadonly(String key, String member, dou List xrevrange(String key, StreamEntryID end, StreamEntryID start, int count); /** - * XREAD [COUNT count] [BLOCK milliseconds] STREAMS key [key ...] ID [ID ...] - * - * @param count - * @param block - * @param streams - * @return + * @deprecated Will be removed in future version. Use + * {@link MultiKeyJedisClusterCommands#xread(int, long, java.util.Map.Entry...)}. */ List>> xread(int count, long block, Map.Entry... streams); @@ -470,14 +466,8 @@ List georadiusByMemberReadonly(String key, String member, dou Long xgroupDelConsumer( String key, String groupname, String consumername); /** - * XREAD [COUNT count] [BLOCK milliseconds] STREAMS key [key ...] ID [ID ...] - * - * @param groupname - * @param consumer - * @param count - * @param block - * @param streams - * @return + * @deprecated Will be removed in future version. Use + * {@link MultiKeyJedisClusterCommands#xreadGroup(java.lang.String, java.lang.String, int, long, boolean, java.util.Map.Entry...)}. */ List>> xreadGroup(String groupname, String consumer, int count, long block, boolean noAck, Map.Entry... streams); diff --git a/src/main/java/redis/clients/jedis/commands/MultiKeyJedisClusterCommands.java b/src/main/java/redis/clients/jedis/commands/MultiKeyJedisClusterCommands.java index ab6b253b71..5ddafce327 100644 --- a/src/main/java/redis/clients/jedis/commands/MultiKeyJedisClusterCommands.java +++ b/src/main/java/redis/clients/jedis/commands/MultiKeyJedisClusterCommands.java @@ -6,14 +6,18 @@ import redis.clients.jedis.ScanParams; import redis.clients.jedis.ScanResult; import redis.clients.jedis.SortingParams; +import redis.clients.jedis.StreamEntry; +import redis.clients.jedis.StreamEntryID; import redis.clients.jedis.ZParams; import redis.clients.jedis.params.GeoRadiusParam; import redis.clients.jedis.params.GeoRadiusStoreParam; import java.util.List; +import java.util.Map; import java.util.Set; public interface MultiKeyJedisClusterCommands { + Long del(String... keys); Long unlink(String... keys); @@ -87,4 +91,28 @@ Long georadiusStore(String key, double longitude, double latitude, double radius Long georadiusByMemberStore(String key, String member, double radius, GeoUnit unit, GeoRadiusParam param, GeoRadiusStoreParam storeParam); + + /** + * XREAD [COUNT count] [BLOCK milliseconds] STREAMS key [key ...] ID [ID ...] + * + * @param count + * @param block + * @param streams + * @return + */ + List>> xread(int count, long block, Map.Entry... streams); + + /** + * XREAD [COUNT count] [BLOCK milliseconds] STREAMS key [key ...] ID [ID ...] + * + * @param groupname + * @param consumer + * @param count + * @param block + * @param noAck + * @param streams + * @return + */ + List>> xreadGroup(String groupname, String consumer, int count, long block, boolean noAck, Map.Entry... streams); + }