Normalized Pipeline[] interfaces and extracted all of the non-shardable commands into the MultiKey* interfaces

This commit is contained in:
samhendley
2012-12-24 10:45:19 -05:00
parent f9e818c92b
commit c0bda88e2c
7 changed files with 343 additions and 45 deletions

View File

@@ -0,0 +1,63 @@
package redis.clients.jedis;
import java.util.List;
import java.util.Set;
/**
* Multikey related commands (these are split out because they are non-shardable)
*/
public interface MultiKeyBinaryRedisPipeline {
Response<Long> del(byte[]... keys);
Response<List<byte[]>> blpop(byte[]... args);
Response<List<byte[]>> brpop(byte[]... args);
Response<Set<byte[]>> keys(byte[] pattern);
Response<List<byte[]>> mget(byte[]... keys);
Response<String> mset(byte[]... keysvalues);
Response<Long> msetnx(byte[]... keysvalues);
Response<byte[]> rename(byte[] oldkey, byte[] newkey);
Response<Long> renamenx(byte[] oldkey, byte[] newkey);
Response<byte[]> rpoplpush(byte[] srckey, byte[] dstkey);
Response<Set<byte[]>> sdiff(byte[]... keys);
Response<Long> sdiffstore(byte[] dstkey, byte[]... keys);
Response<Set<byte[]>> sinter(byte[]... keys);
Response<Long> sinterstore(byte[] dstkey, byte[]... keys);
Response<Long> smove(byte[] srckey, byte[] dstkey, byte[] member);
Response<List<byte[]>> sort(byte[] key, SortingParams sortingParameters, byte[] dstkey);
Response<List<byte[]>> sort(byte[] key, byte[] dstkey);
Response<Set<String>> sunion(byte[]... keys);
Response<Long> sunionstore(byte[] dstkey, byte[]... keys);
Response<String> watch(byte[]... keys);
Response<Long> zinterstore(byte[] dstkey, byte[]... sets);
Response<Long> zinterstore(byte[] dstkey, ZParams params, byte[]... sets);
Response<Long> zunionstore(byte[] dstkey, byte[]... sets);
Response<Long> zunionstore(byte[] dstkey, ZParams params, byte[]... sets);
Response<byte[]> brpoplpush(byte[] source, byte[] destination, int timeout);
Response<Long> publish(byte[] channel, byte[] message);
}