Skip to content

Commit

Permalink
Move XREAD and XREADGROUP methods in MultiKey... interfaces (#2309)
Browse files Browse the repository at this point in the history
  • Loading branch information
sazzad16 authored Dec 8, 2020
1 parent 3418710 commit 89eeffe
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -413,12 +413,8 @@ List<GeoRadiusResponse> georadiusByMemberReadonly(String key, String member, dou
List<StreamEntry> 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<Map.Entry<String, List<StreamEntry>>> xread(int count, long block, Map.Entry<String, StreamEntryID>... streams);

Expand Down Expand Up @@ -470,14 +466,8 @@ List<GeoRadiusResponse> 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<Map.Entry<String, List<StreamEntry>>> xreadGroup(String groupname, String consumer, int count, long block, boolean noAck, Map.Entry<String, StreamEntryID>... streams);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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<Map.Entry<String, List<StreamEntry>>> xread(int count, long block, Map.Entry<String, StreamEntryID>... 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<Map.Entry<String, List<StreamEntry>>> xreadGroup(String groupname, String consumer, int count, long block, boolean noAck, Map.Entry<String, StreamEntryID>... streams);

}

0 comments on commit 89eeffe

Please sign in to comment.