Package redis.clients.jedis.commands
Interface SetBinaryCommands
- All Known Subinterfaces:
JedisBinaryCommands
- All Known Implementing Classes:
Jedis,JedisCluster,JedisPooled,JedisSentineled,JedisSharding,UnifiedJedis
public interface SetBinaryCommands
-
Method Summary
Modifier and TypeMethodDescriptionlongsadd(byte[] key, byte[]... members) longscard(byte[] key) Set<byte[]> sdiff(byte[]... keys) longsdiffstore(byte[] dstkey, byte[]... keys) Set<byte[]> sinter(byte[]... keys) longsintercard(byte[]... keys) This command works exactly likeSINTERbut instead of returning the result set, it returns just the cardinality of the result.longsintercard(int limit, byte[]... keys) This command works exactly likeSINTERbut instead of returning the result set, it returns just the cardinality of the result.longsinterstore(byte[] dstkey, byte[]... keys) booleansismember(byte[] key, byte[] member) Set<byte[]> smembers(byte[] key) smismember(byte[] key, byte[]... members) longsmove(byte[] srckey, byte[] dstkey, byte[] member) byte[]spop(byte[] key) Set<byte[]> spop(byte[] key, long count) byte[]srandmember(byte[] key) List<byte[]> srandmember(byte[] key, int count) longsrem(byte[] key, byte[]... members) default ScanResult<byte[]> sscan(byte[] key, byte[] cursor) ScanResult<byte[]> sscan(byte[] key, byte[] cursor, ScanParams params) Set<byte[]> sunion(byte[]... keys) longsunionstore(byte[] dstkey, byte[]... keys)
-
Method Details
-
sadd
long sadd(byte[] key, byte[]... members) -
smembers
-
srem
long srem(byte[] key, byte[]... members) -
spop
byte[] spop(byte[] key) -
spop
-
scard
long scard(byte[] key) -
sismember
boolean sismember(byte[] key, byte[] member) -
smismember
-
srandmember
byte[] srandmember(byte[] key) -
srandmember
-
sscan
-
sscan
-
sdiff
-
sdiffstore
long sdiffstore(byte[] dstkey, byte[]... keys) -
sinter
-
sinterstore
long sinterstore(byte[] dstkey, byte[]... keys) -
sintercard
long sintercard(byte[]... keys) This command works exactly likeSINTERbut instead of returning the result set, it returns just the cardinality of the result. LIMIT defaults to 0 and means unlimitedTime complexity O(N*M) worst case where N is the cardinality of the smallest
- Parameters:
keys-- Returns:
- The cardinality of the set which would result from the intersection of all the given sets
-
sintercard
long sintercard(int limit, byte[]... keys) This command works exactly likeSINTERbut instead of returning the result set, it returns just the cardinality of the result.Time complexity O(N*M) worst case where N is the cardinality of the smallest
- Parameters:
limit- If the intersection cardinality reaches limit partway through the computation, the algorithm will exit and yield limit as the cardinality.keys-- Returns:
- The cardinality of the set which would result from the intersection of all the given sets
-
sunion
-
sunionstore
long sunionstore(byte[] dstkey, byte[]... keys) -
smove
long smove(byte[] srckey, byte[] dstkey, byte[] member)
-