K - Key type.V - Value type.public interface NodeSelectionSetAsyncCommands<K,V>
| Modifier and Type | Method and Description |
|---|---|
AsyncExecutions<Long> |
sadd(K key,
V... members)
Add one or more members to a set.
|
AsyncExecutions<Long> |
scard(K key)
Get the number of members in a set.
|
AsyncExecutions<Set<V>> |
sdiff(K... keys)
Subtract multiple sets.
|
AsyncExecutions<Long> |
sdiff(ValueStreamingChannel<V> channel,
K... keys)
Subtract multiple sets.
|
AsyncExecutions<Long> |
sdiffcard(K key1,
K key2)
Compute the number of elements in the difference between the set stored at
key1 and the set stored at
key2, without returning the difference itself. |
AsyncExecutions<Long> |
sdiffcard(K key1,
K key2,
SDiffCardArgs sdiffCardArgs)
Compute the number of elements in the difference between the set stored at
key1 and the set stored at
key2, without returning the difference itself, applying SDiffCardArgs. |
AsyncExecutions<Long> |
sdiffcard(List<K> keys)
Compute the number of elements in the difference between the set stored at the first key and the sets stored at all
successive keys, without returning the difference itself.
|
AsyncExecutions<Long> |
sdiffcard(List<K> keys,
SDiffCardArgs sdiffCardArgs)
Compute the number of elements in the difference between the set stored at the first key and the sets stored at all
successive keys, without returning the difference itself, applying
SDiffCardArgs. |
AsyncExecutions<Long> |
sdiffstore(K destination,
K... keys)
Subtract multiple sets and store the resulting set in a key.
|
AsyncExecutions<Set<V>> |
sinter(K... keys)
Intersect multiple sets.
|
AsyncExecutions<Long> |
sinter(ValueStreamingChannel<V> channel,
K... keys)
Intersect multiple sets.
|
AsyncExecutions<Long> |
sintercard(K... keys)
This command works exactly like
sinter(java.lang.Object[]) but instead of returning the result set, it returns
just the cardinality of the result. |
AsyncExecutions<Long> |
sintercard(long limit,
K... keys)
This command works exactly like
sinter(java.lang.Object[]) but instead of returning the result set, it returns
just the cardinality of the result. |
AsyncExecutions<Long> |
sinterstore(K destination,
K... keys)
Intersect multiple sets and store the resulting set in a key.
|
AsyncExecutions<Boolean> |
sismember(K key,
V member)
Determine if a given value is a member of a set.
|
AsyncExecutions<Set<V>> |
smembers(K key)
Get all the members in a set.
|
AsyncExecutions<Long> |
smembers(ValueStreamingChannel<V> channel,
K key)
Get all the members in a set.
|
AsyncExecutions<List<Boolean>> |
smismember(K key,
V... members)
Returns whether each member is a member of the set stored at key.
|
AsyncExecutions<Boolean> |
smove(K source,
K destination,
V member)
Move a member from one set to another.
|
AsyncExecutions<V> |
spop(K key)
Remove and return a random member from a set.
|
AsyncExecutions<Set<V>> |
spop(K key,
long count)
Remove and return one or multiple random members from a set.
|
AsyncExecutions<V> |
srandmember(K key)
Get one random member from a set.
|
AsyncExecutions<List<V>> |
srandmember(K key,
long count)
Get one or multiple random members from a set.
|
AsyncExecutions<Long> |
srandmember(ValueStreamingChannel<V> channel,
K key,
long count)
Get one or multiple random members from a set.
|
AsyncExecutions<Long> |
srem(K key,
V... members)
Remove one or more members from a set.
|
AsyncExecutions<ValueScanCursor<V>> |
sscan(K key)
Incrementally iterate Set elements.
|
AsyncExecutions<ValueScanCursor<V>> |
sscan(K key,
ScanArgs scanArgs)
Incrementally iterate Set elements.
|
AsyncExecutions<ValueScanCursor<V>> |
sscan(K key,
ScanCursor scanCursor)
Incrementally iterate Set elements.
|
AsyncExecutions<ValueScanCursor<V>> |
sscan(K key,
ScanCursor scanCursor,
ScanArgs scanArgs)
Incrementally iterate Set elements.
|
AsyncExecutions<StreamScanCursor> |
sscan(ValueStreamingChannel<V> channel,
K key)
Incrementally iterate Set elements.
|
AsyncExecutions<StreamScanCursor> |
sscan(ValueStreamingChannel<V> channel,
K key,
ScanArgs scanArgs)
Incrementally iterate Set elements.
|
AsyncExecutions<StreamScanCursor> |
sscan(ValueStreamingChannel<V> channel,
K key,
ScanCursor scanCursor)
Incrementally iterate Set elements.
|
AsyncExecutions<StreamScanCursor> |
sscan(ValueStreamingChannel<V> channel,
K key,
ScanCursor scanCursor,
ScanArgs scanArgs)
Incrementally iterate Set elements.
|
AsyncExecutions<Set<V>> |
sunion(K... keys)
Add multiple sets.
|
AsyncExecutions<Long> |
sunion(ValueStreamingChannel<V> channel,
K... keys)
Add multiple sets.
|
AsyncExecutions<Long> |
sunioncard(K key1,
K key2)
Compute the number of distinct elements in the union of the sets stored at
key1 and key2 without
returning the union itself. |
AsyncExecutions<Long> |
sunioncard(K key1,
K key2,
SUnionCardArgs sunionCardArgs)
Compute the number of distinct elements in the union of the sets stored at
key1 and key2 without
returning the union itself, applying SUnionCardArgs. |
AsyncExecutions<Long> |
sunioncard(List<K> keys)
Compute the number of distinct elements in the union of the sets stored at the given keys without returning the union
itself.
|
AsyncExecutions<Long> |
sunioncard(List<K> keys,
SUnionCardArgs sunionCardArgs)
Compute the number of distinct elements in the union of the sets stored at the given keys without returning the union
itself, applying
SUnionCardArgs. |
AsyncExecutions<Long> |
sunionstore(K destination,
K... keys)
Add multiple sets and store the resulting set in a key.
|
AsyncExecutions<Long> sadd(K key, V... members)
key - the key.members - the member type: value.AsyncExecutions<Long> scard(K key)
key - the key.false if key does not
exist.AsyncExecutions<Set<V>> sdiff(K... keys)
keys - the key.AsyncExecutions<Long> sdiff(ValueStreamingChannel<V> channel, K... keys)
channel - the channel.keys - the keys.AsyncExecutions<Long> sdiffcard(K key1, K key2)
key1 and the set stored at
key2, without returning the difference itself. Non-existing keys are treated as empty sets; when key1
does not exist the result is 0.key1 - the key of the set to subtract from, must not be null.key2 - the key of the set to subtract, must not be null.IllegalArgumentException - if key1 or key2 is null.AsyncExecutions<Long> sdiffcard(List<K> keys)
0.keys - the keys, must not be null or empty. The first key is the set to subtract from, all successive keys
are subtracted.IllegalArgumentException - if keys is null or empty.AsyncExecutions<Long> sdiffcard(K key1, K key2, SDiffCardArgs sdiffCardArgs)
key1 and the set stored at
key2, without returning the difference itself, applying SDiffCardArgs. Non-existing keys are treated as
empty sets; when key1 does not exist the result is 0.key1 - the key of the set to subtract from, must not be null.key2 - the key of the set to subtract, must not be null.sdiffCardArgs - the command arguments (LIMIT), must not be null.IllegalArgumentException - if key1, key2 or sdiffCardArgs is null.AsyncExecutions<Long> sdiffcard(List<K> keys, SDiffCardArgs sdiffCardArgs)
SDiffCardArgs. Non-existing keys are treated
as empty sets; when the first key does not exist the result is 0.keys - the keys, must not be null or empty. The first key is the set to subtract from, all successive keys
are subtracted.sdiffCardArgs - the command arguments (LIMIT), must not be null.IllegalArgumentException - if keys is null or empty, or sdiffCardArgs is null.AsyncExecutions<Long> sdiffstore(K destination, K... keys)
destination - the destination type: key.keys - the key.AsyncExecutions<Set<V>> sinter(K... keys)
keys - the key.AsyncExecutions<Long> sinter(ValueStreamingChannel<V> channel, K... keys)
channel - the channel.keys - the keys.AsyncExecutions<Long> sintercard(K... keys)
sinter(java.lang.Object[]) but instead of returning the result set, it returns
just the cardinality of the result.keys - the keys.AsyncExecutions<Long> sintercard(long limit, K... keys)
sinter(java.lang.Object[]) but instead of returning the result set, it returns
just the cardinality of the result.limit - If the intersection cardinality reaches limit partway through the computation, the algorithm will exit and
yield limit as the cardinality.keys - the keys.AsyncExecutions<Long> sinterstore(K destination, K... keys)
destination - the destination type: key.keys - the key.AsyncExecutions<Boolean> sismember(K key, V member)
key - the key.member - the member type: value.true if the element is a member of the set. false if the element is not a member of the set, or
if key does not exist.AsyncExecutions<Set<V>> smembers(K key)
key - the key.AsyncExecutions<Long> smembers(ValueStreamingChannel<V> channel, K key)
channel - the channel.key - the keys.AsyncExecutions<List<Boolean>> smismember(K key, V... members)
key - the key.members - the member type: value.AsyncExecutions<Boolean> smove(K source, K destination, V member)
source - the source key.destination - the destination type: key.member - the member type: value.true if the element is moved. false if the element is not a member of source and no
operation was performed.AsyncExecutions<V> spop(K key)
key - the key.null when key does not exist.AsyncExecutions<Set<V>> spop(K key, long count)
key - the key.count - number of members to pop.null when key does not exist.AsyncExecutions<V> srandmember(K key)
key - the key.count argument the command returns a Bulk Reply with the
randomly selected element, or null when key does not exist.AsyncExecutions<List<V>> srandmember(K key, long count)
key - the key.count - the count type: long.count argument the command returns a Bulk Reply
with the randomly selected element, or null when key does not exist.AsyncExecutions<Long> srandmember(ValueStreamingChannel<V> channel, K key, long count)
channel - streaming channel that receives a call for every value.key - the key.count - the count.AsyncExecutions<Long> srem(K key, V... members)
key - the key.members - the member type: value.AsyncExecutions<Set<V>> sunion(K... keys)
keys - the key.AsyncExecutions<Long> sunion(ValueStreamingChannel<V> channel, K... keys)
channel - streaming channel that receives a call for every value.keys - the keys.AsyncExecutions<Long> sunioncard(K key1, K key2)
key1 and key2 without
returning the union itself. Non-existing keys are treated as empty sets.key1 - the key of the first set, must not be null.key2 - the key of the second set, must not be null.IllegalArgumentException - if key1 or key2 is null.AsyncExecutions<Long> sunioncard(List<K> keys)
keys - the keys of the sets to union, must not be null or empty.IllegalArgumentException - if keys is null or empty.AsyncExecutions<Long> sunioncard(K key1, K key2, SUnionCardArgs sunionCardArgs)
key1 and key2 without
returning the union itself, applying SUnionCardArgs. Non-existing keys are treated as empty sets.key1 - the key of the first set, must not be null.key2 - the key of the second set, must not be null.sunionCardArgs - the command arguments (APPROX, LIMIT), must not be null.IllegalArgumentException - if key1, key2 or sunionCardArgs is null.AsyncExecutions<Long> sunioncard(List<K> keys, SUnionCardArgs sunionCardArgs)
SUnionCardArgs. Non-existing keys are treated as empty sets.keys - the keys of the sets to union, must not be null or empty.sunionCardArgs - the command arguments (APPROX, LIMIT), must not be null.IllegalArgumentException - if keys is null or empty, or sunionCardArgs is null.AsyncExecutions<Long> sunionstore(K destination, K... keys)
destination - the destination type: key.keys - the key.AsyncExecutions<ValueScanCursor<V>> sscan(K key)
key - the key.AsyncExecutions<ValueScanCursor<V>> sscan(K key, ScanArgs scanArgs)
key - the key.scanArgs - scan arguments.AsyncExecutions<ValueScanCursor<V>> sscan(K key, ScanCursor scanCursor, ScanArgs scanArgs)
key - the key.scanCursor - cursor to resume from a previous scan, must not be null.scanArgs - scan arguments.AsyncExecutions<ValueScanCursor<V>> sscan(K key, ScanCursor scanCursor)
key - the key.scanCursor - cursor to resume from a previous scan, must not be null.AsyncExecutions<StreamScanCursor> sscan(ValueStreamingChannel<V> channel, K key)
channel - streaming channel that receives a call for every value.key - the key.AsyncExecutions<StreamScanCursor> sscan(ValueStreamingChannel<V> channel, K key, ScanArgs scanArgs)
channel - streaming channel that receives a call for every value.key - the key.scanArgs - scan arguments.AsyncExecutions<StreamScanCursor> sscan(ValueStreamingChannel<V> channel, K key, ScanCursor scanCursor, ScanArgs scanArgs)
channel - streaming channel that receives a call for every value.key - the key.scanCursor - cursor to resume from a previous scan, must not be null.scanArgs - scan arguments.AsyncExecutions<StreamScanCursor> sscan(ValueStreamingChannel<V> channel, K key, ScanCursor scanCursor)
channel - streaming channel that receives a call for every value.key - the key.scanCursor - cursor to resume from a previous scan, must not be null.Copyright © 2026 lettuce.io. All rights reserved.