K
- Key type.V
- Value type.public interface RedisSetAsyncCommands<K,V>
Modifier and Type | Method and Description |
---|---|
RedisFuture<Long> |
sadd(K key,
V... members)
Add one or more members to a set.
|
RedisFuture<Long> |
scard(K key)
Get the number of members in a set.
|
RedisFuture<Set<V>> |
sdiff(K... keys)
Subtract multiple sets.
|
RedisFuture<Long> |
sdiff(ValueStreamingChannel<V> channel,
K... keys)
Subtract multiple sets.
|
RedisFuture<Long> |
sdiffstore(K destination,
K... keys)
Subtract multiple sets and store the resulting set in a key.
|
RedisFuture<Set<V>> |
sinter(K... keys)
Intersect multiple sets.
|
RedisFuture<Long> |
sinter(ValueStreamingChannel<V> channel,
K... keys)
Intersect multiple sets.
|
RedisFuture<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. |
RedisFuture<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. |
RedisFuture<Long> |
sinterstore(K destination,
K... keys)
Intersect multiple sets and store the resulting set in a key.
|
RedisFuture<Boolean> |
sismember(K key,
V member)
Determine if a given value is a member of a set.
|
RedisFuture<Set<V>> |
smembers(K key)
Get all the members in a set.
|
RedisFuture<Long> |
smembers(ValueStreamingChannel<V> channel,
K key)
Get all the members in a set.
|
RedisFuture<List<Boolean>> |
smismember(K key,
V... members)
Returns whether each member is a member of the set stored at key.
|
RedisFuture<Boolean> |
smove(K source,
K destination,
V member)
Move a member from one set to another.
|
RedisFuture<V> |
spop(K key)
Remove and return a random member from a set.
|
RedisFuture<Set<V>> |
spop(K key,
long count)
Remove and return one or multiple random members from a set.
|
RedisFuture<V> |
srandmember(K key)
Get one random member from a set.
|
RedisFuture<List<V>> |
srandmember(K key,
long count)
Get one or multiple random members from a set.
|
RedisFuture<Long> |
srandmember(ValueStreamingChannel<V> channel,
K key,
long count)
Get one or multiple random members from a set.
|
RedisFuture<Long> |
srem(K key,
V... members)
Remove one or more members from a set.
|
RedisFuture<ValueScanCursor<V>> |
sscan(K key)
Incrementally iterate Set elements.
|
RedisFuture<ValueScanCursor<V>> |
sscan(K key,
ScanArgs scanArgs)
Incrementally iterate Set elements.
|
RedisFuture<ValueScanCursor<V>> |
sscan(K key,
ScanCursor scanCursor)
Incrementally iterate Set elements.
|
RedisFuture<ValueScanCursor<V>> |
sscan(K key,
ScanCursor scanCursor,
ScanArgs scanArgs)
Incrementally iterate Set elements.
|
RedisFuture<StreamScanCursor> |
sscan(ValueStreamingChannel<V> channel,
K key)
Incrementally iterate Set elements.
|
RedisFuture<StreamScanCursor> |
sscan(ValueStreamingChannel<V> channel,
K key,
ScanArgs scanArgs)
Incrementally iterate Set elements.
|
RedisFuture<StreamScanCursor> |
sscan(ValueStreamingChannel<V> channel,
K key,
ScanCursor scanCursor)
Incrementally iterate Set elements.
|
RedisFuture<StreamScanCursor> |
sscan(ValueStreamingChannel<V> channel,
K key,
ScanCursor scanCursor,
ScanArgs scanArgs)
Incrementally iterate Set elements.
|
RedisFuture<Set<V>> |
sunion(K... keys)
Add multiple sets.
|
RedisFuture<Long> |
sunion(ValueStreamingChannel<V> channel,
K... keys)
Add multiple sets.
|
RedisFuture<Long> |
sunionstore(K destination,
K... keys)
Add multiple sets and store the resulting set in a key.
|
RedisFuture<Long> sadd(K key, V... members)
key
- the key.members
- the member type: value.RedisFuture<Long> scard(K key)
key
- the key.false
if key
does not
exist.RedisFuture<Set<V>> sdiff(K... keys)
keys
- the key.RedisFuture<Long> sdiff(ValueStreamingChannel<V> channel, K... keys)
channel
- the channel.keys
- the keys.RedisFuture<Long> sdiffstore(K destination, K... keys)
destination
- the destination type: key.keys
- the key.RedisFuture<Set<V>> sinter(K... keys)
keys
- the key.RedisFuture<Long> sinter(ValueStreamingChannel<V> channel, K... keys)
channel
- the channel.keys
- the keys.RedisFuture<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.RedisFuture<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.RedisFuture<Long> sinterstore(K destination, K... keys)
destination
- the destination type: key.keys
- the key.RedisFuture<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.RedisFuture<Set<V>> smembers(K key)
key
- the key.RedisFuture<Long> smembers(ValueStreamingChannel<V> channel, K key)
channel
- the channel.key
- the keys.RedisFuture<List<Boolean>> smismember(K key, V... members)
key
- the key.members
- the member type: value.RedisFuture<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.RedisFuture<V> spop(K key)
key
- the key.null
when key
does not exist.RedisFuture<Set<V>> spop(K key, long count)
key
- the key.count
- number of members to pop.null
when key
does not exist.RedisFuture<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.RedisFuture<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.RedisFuture<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.RedisFuture<Long> srem(K key, V... members)
key
- the key.members
- the member type: value.RedisFuture<Set<V>> sunion(K... keys)
keys
- the key.RedisFuture<Long> sunion(ValueStreamingChannel<V> channel, K... keys)
channel
- streaming channel that receives a call for every value.keys
- the keys.RedisFuture<Long> sunionstore(K destination, K... keys)
destination
- the destination type: key.keys
- the key.RedisFuture<ValueScanCursor<V>> sscan(K key)
key
- the key.RedisFuture<ValueScanCursor<V>> sscan(K key, ScanArgs scanArgs)
key
- the key.scanArgs
- scan arguments.RedisFuture<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.RedisFuture<ValueScanCursor<V>> sscan(K key, ScanCursor scanCursor)
key
- the key.scanCursor
- cursor to resume from a previous scan, must not be null
.RedisFuture<StreamScanCursor> sscan(ValueStreamingChannel<V> channel, K key)
channel
- streaming channel that receives a call for every value.key
- the key.RedisFuture<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.RedisFuture<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.RedisFuture<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 © 2025 lettuce.io. All rights reserved.