K - Key type.V - Value type.public interface RedisSetCommands<K,V>
| Modifier and Type | Method and Description |
|---|---|
Long |
sadd(K key,
V... members)
Add one or more members to a set.
|
Long |
scard(K key)
Get the number of members in a set.
|
Set<V> |
sdiff(K... keys)
Subtract multiple sets.
|
Long |
sdiff(ValueStreamingChannel<V> channel,
K... keys)
Subtract multiple sets.
|
Long |
sdiffstore(K destination,
K... keys)
Subtract multiple sets and store the resulting set in a key.
|
Set<V> |
sinter(K... keys)
Intersect multiple sets.
|
Long |
sinter(ValueStreamingChannel<V> channel,
K... keys)
Intersect multiple sets.
|
Long |
sinterstore(K destination,
K... keys)
Intersect multiple sets and store the resulting set in a key.
|
Boolean |
sismember(K key,
V member)
Determine if a given value is a member of a set.
|
Set<V> |
smembers(K key)
Get all the members in a set.
|
Long |
smembers(ValueStreamingChannel<V> channel,
K key)
Get all the members in a set.
|
Boolean |
smove(K source,
K destination,
V member)
Move a member from one set to another.
|
V |
spop(K key)
Remove and return a random member from a set.
|
Set<V> |
spop(K key,
long count)
Remove and return one or multiple random members from a set.
|
V |
srandmember(K key)
Get one random member from a set.
|
List<V> |
srandmember(K key,
long count)
Get one or multiple random members from a set.
|
Long |
srandmember(ValueStreamingChannel<V> channel,
K key,
long count)
Get one or multiple random members from a set.
|
Long |
srem(K key,
V... members)
Remove one or more members from a set.
|
ValueScanCursor<V> |
sscan(K key)
Incrementally iterate Set elements.
|
ValueScanCursor<V> |
sscan(K key,
ScanArgs scanArgs)
Incrementally iterate Set elements.
|
ValueScanCursor<V> |
sscan(K key,
ScanCursor scanCursor)
Incrementally iterate Set elements.
|
ValueScanCursor<V> |
sscan(K key,
ScanCursor scanCursor,
ScanArgs scanArgs)
Incrementally iterate Set elements.
|
StreamScanCursor |
sscan(ValueStreamingChannel<V> channel,
K key)
Incrementally iterate Set elements.
|
StreamScanCursor |
sscan(ValueStreamingChannel<V> channel,
K key,
ScanArgs scanArgs)
Incrementally iterate Set elements.
|
StreamScanCursor |
sscan(ValueStreamingChannel<V> channel,
K key,
ScanCursor scanCursor)
Incrementally iterate Set elements.
|
StreamScanCursor |
sscan(ValueStreamingChannel<V> channel,
K key,
ScanCursor scanCursor,
ScanArgs scanArgs)
Incrementally iterate Set elements.
|
Set<V> |
sunion(K... keys)
Add multiple sets.
|
Long |
sunion(ValueStreamingChannel<V> channel,
K... keys)
Add multiple sets.
|
Long |
sunionstore(K destination,
K... keys)
Add multiple sets and store the resulting set in a key.
|
Long sadd(K key, V... members)
key - the keymembers - the member type: valueLong scard(K key)
key - the keykey does not
exist.Set<V> sdiff(K... keys)
keys - the keyLong sdiff(ValueStreamingChannel<V> channel, K... keys)
channel - the channelkeys - the keysLong sdiffstore(K destination, K... keys)
destination - the destination type: keykeys - the keySet<V> sinter(K... keys)
keys - the keyLong sinter(ValueStreamingChannel<V> channel, K... keys)
channel - the channelkeys - the keysLong sinterstore(K destination, K... keys)
destination - the destination type: keykeys - the keyBoolean sismember(K key, V member)
key - the keymember - the member type: valuekey does not exist.Boolean smove(K source, K destination, V member)
source - the source keydestination - the destination type: keymember - the member type: valuesource and no
operation was performed.Set<V> smembers(K key)
key - the keyLong smembers(ValueStreamingChannel<V> channel, K key)
channel - the channelkey - the keysV spop(K key)
key - the keykey does not exist.Set<V> spop(K key, long count)
key - the keycount - number of members to popkey does not exist.V srandmember(K key)
key - the keycount argument the command returns a Bulk Reply with the
randomly selected element, or null when key does not exist.List<V> srandmember(K key, long count)
key - the keycount - the count type: longcount argument the command returns a Bulk Reply
with the randomly selected element, or null when key does not exist.Long srandmember(ValueStreamingChannel<V> channel, K key, long count)
channel - streaming channel that receives a call for every valuekey - the keycount - the countLong srem(K key, V... members)
key - the keymembers - the member type: valueSet<V> sunion(K... keys)
keys - the keyLong sunion(ValueStreamingChannel<V> channel, K... keys)
channel - streaming channel that receives a call for every valuekeys - the keysLong sunionstore(K destination, K... keys)
destination - the destination type: keykeys - the keyValueScanCursor<V> sscan(K key)
key - the keyValueScanCursor<V> sscan(K key, ScanArgs scanArgs)
key - the keyscanArgs - scan argumentsValueScanCursor<V> sscan(K key, ScanCursor scanCursor, ScanArgs scanArgs)
key - the keyscanCursor - cursor to resume from a previous scan, must not be nullscanArgs - scan argumentsValueScanCursor<V> sscan(K key, ScanCursor scanCursor)
key - the keyscanCursor - cursor to resume from a previous scan, must not be nullStreamScanCursor sscan(ValueStreamingChannel<V> channel, K key)
channel - streaming channel that receives a call for every valuekey - the keyStreamScanCursor sscan(ValueStreamingChannel<V> channel, K key, ScanArgs scanArgs)
channel - streaming channel that receives a call for every valuekey - the keyscanArgs - scan argumentsStreamScanCursor sscan(ValueStreamingChannel<V> channel, K key, ScanCursor scanCursor, ScanArgs scanArgs)
channel - streaming channel that receives a call for every valuekey - the keyscanCursor - cursor to resume from a previous scan, must not be nullscanArgs - scan argumentsStreamScanCursor sscan(ValueStreamingChannel<V> channel, K key, ScanCursor scanCursor)
channel - streaming channel that receives a call for every valuekey - the keyscanCursor - cursor to resume from a previous scan, must not be nullCopyright © 2019 lettuce.io. All rights reserved.