public interface SetCommands
Modifier and Type | Method and Description |
---|---|
long |
sadd(String key,
String... member) |
long |
scard(String key) |
Set<String> |
sdiff(String... keys) |
long |
sdiffstore(String dstkey,
String... keys) |
Set<String> |
sinter(String... keys) |
long |
sintercard(int limit,
String... keys)
This command works exactly like
SINTER but instead of returning
the result set, it returns just the cardinality of the result. |
long |
sintercard(String... keys)
This command works exactly like
SINTER but instead of returning
the result set, it returns just the cardinality of the result. |
long |
sinterstore(String dstkey,
String... keys) |
boolean |
sismember(String key,
String member) |
Set<String> |
smembers(String key) |
List<Boolean> |
smismember(String key,
String... members) |
long |
smove(String srckey,
String dstkey,
String member) |
String |
spop(String key) |
Set<String> |
spop(String key,
long count) |
String |
srandmember(String key) |
List<String> |
srandmember(String key,
int count) |
long |
srem(String key,
String... member) |
default ScanResult<String> |
sscan(String key,
String cursor) |
ScanResult<String> |
sscan(String key,
String cursor,
ScanParams params) |
Set<String> |
sunion(String... keys) |
long |
sunionstore(String dstkey,
String... keys) |
long scard(String key)
default ScanResult<String> sscan(String key, String cursor)
ScanResult<String> sscan(String key, String cursor, ScanParams params)
long sintercard(String... keys)
SINTER
but instead of returning
the result set, it returns just the cardinality of the result. LIMIT defaults to 0 and means unlimited
Time complexity O(N*M) worst case where N is the cardinality of the smallest
keys
- long sintercard(int limit, String... keys)
SINTER
but 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
limit
- If the intersection cardinality reaches limit partway through the computation,
the algorithm will exit and yield limit as the cardinality.keys
- Copyright © 2022. All rights reserved.