Class BlockingSetCommandsImpl<K,V>
java.lang.Object
io.quarkus.redis.runtime.datasource.AbstractRedisCommandGroup
io.quarkus.redis.runtime.datasource.BlockingSetCommandsImpl<K,V>
- All Implemented Interfaces:
RedisCommands
,SetCommands<K,
V>
public class BlockingSetCommandsImpl<K,V>
extends AbstractRedisCommandGroup
implements SetCommands<K,V>
-
Field Summary
Fields inherited from class io.quarkus.redis.runtime.datasource.AbstractRedisCommandGroup
ds, timeout
-
Constructor Summary
ConstructorDescriptionBlockingSetCommandsImpl
(RedisDataSource ds, ReactiveSetCommands<K, V> reactive, Duration timeout) -
Method Summary
Modifier and TypeMethodDescriptionint
Execute the command SADD.long
Execute the command SCARD.Execute the command SDIFF.long
sdiffstore
(K destination, K... keys) Execute the command SDIFFSTORE.Execute the command SINTER.long
sintercard
(int limit, K... keys) Execute the command SINTERCARD.long
sintercard
(K... keys) Execute the command SINTERCARD.long
sinterstore
(K destination, K... keys) Execute the command SINTERSTORE.boolean
Execute the command SISMEMBER.Execute the command SMEMBERS.smismember
(K key, V... members) Execute the command SMISMEMBER.boolean
Execute the command SMOVE.Execute the command SORT.Execute the command SORT.long
sortAndStore
(K key, K destination) Execute the command SORT with theSTORE
option.long
sortAndStore
(K key, K destination, SortArgs sortArguments) Execute the command SORT with theSTORE
option.Execute the command SPOP.Execute the command SPOP.srandmember
(K key) Execute the command SRANDMEMBER.srandmember
(K key, int count) Execute the command SRANDMEMBER.int
Execute the command SREM.Execute the command SSCAN.Execute the command SSCAN.Execute the command SUNION.long
sunionstore
(K destination, K... keys) Execute the command SUNIONSTORE.Methods inherited from class io.quarkus.redis.runtime.datasource.AbstractRedisCommandGroup
getDataSource
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.quarkus.redis.datasource.RedisCommands
getDataSource
-
Constructor Details
-
BlockingSetCommandsImpl
public BlockingSetCommandsImpl(RedisDataSource ds, ReactiveSetCommands<K, V> reactive, Duration timeout)
-
-
Method Details
-
sadd
Description copied from interface:SetCommands
Execute the command SADD. Summary: Add one or more members to a set Group: set Requires Redis 1.0.0- Specified by:
sadd
in interfaceSetCommands<K,
V> - Parameters:
key
- the keyvalues
- the values- Returns:
- the number of elements that were added to the set, not including all the elements already present in the set.
-
scard
Description copied from interface:SetCommands
Execute the command SCARD. Summary: Get the number of members in a set Group: set Requires Redis 1.0.0- Specified by:
scard
in interfaceSetCommands<K,
V> - Parameters:
key
- the key- Returns:
- the cardinality (number of elements) of the set, or
0
key does not exist.
-
sdiff
Description copied from interface:SetCommands
Execute the command SDIFF. Summary: Subtract multiple sets Group: set Requires Redis 1.0.0- Specified by:
sdiff
in interfaceSetCommands<K,
V> - Parameters:
keys
- the keys- Returns:
- list with members of the resulting set.
-
sdiffstore
Description copied from interface:SetCommands
Execute the command SDIFFSTORE. Summary: Subtract multiple sets and store the resulting set in a key Group: set Requires Redis 1.0.0- Specified by:
sdiffstore
in interfaceSetCommands<K,
V> - Parameters:
destination
- the keykeys
- the keys- Returns:
- the number of elements in the resulting set.
-
sinter
Description copied from interface:SetCommands
Execute the command SINTER. Summary: Intersect multiple sets Group: set Requires Redis 1.0.0- Specified by:
sinter
in interfaceSetCommands<K,
V> - Parameters:
keys
- the keys- Returns:
- list with members of the resulting set.
-
sintercard
Description copied from interface:SetCommands
Execute the command SINTERCARD. Summary: Intersect multiple sets and return the cardinality of the result Group: set Requires Redis 7.0.0- Specified by:
sintercard
in interfaceSetCommands<K,
V> - Parameters:
keys
- the keys- Returns:
- the number of elements in the resulting intersection.
-
sintercard
Description copied from interface:SetCommands
Execute the command SINTERCARD. Summary: Intersect multiple sets and return the cardinality of the result Group: set Requires Redis 7.0.0- Specified by:
sintercard
in interfaceSetCommands<K,
V> - Parameters:
limit
- When provided with the optional LIMIT argument (which defaults to 0 and means unlimited), if the intersection cardinality reaches limit partway through the computation, the algorithm will exit and yield limit as the cardinality.keys
- the keys- Returns:
- the number of elements in the resulting intersection.
-
sinterstore
Description copied from interface:SetCommands
Execute the command SINTERSTORE. Summary: Intersect multiple sets and store the resulting set in a key Group: set Requires Redis 1.0.0- Specified by:
sinterstore
in interfaceSetCommands<K,
V> - Parameters:
destination
- the keykeys
- the keys- Returns:
- the number of elements in the resulting set.
-
sismember
Description copied from interface:SetCommands
Execute the command SISMEMBER. Summary: Determine if a given value is a member of a set Group: set Requires Redis 1.0.0- Specified by:
sismember
in interfaceSetCommands<K,
V> - Parameters:
key
- the keymember
- the member to check- Returns:
true
the element is a member of the set.false
the element is not a member of the set, or if key does not exist.
-
smembers
Description copied from interface:SetCommands
Execute the command SMEMBERS. Summary: Get all the members in a set Group: set Requires Redis 1.0.0- Specified by:
smembers
in interfaceSetCommands<K,
V> - Parameters:
key
- the key- Returns:
- all elements of the set.
-
smismember
Description copied from interface:SetCommands
Execute the command SMISMEMBER. Summary: Returns the membership associated with the given elements for a set Group: set Requires Redis 6.2.0- Specified by:
smismember
in interfaceSetCommands<K,
V> - Parameters:
key
- the keymembers
- the members to check- Returns:
- list representing the membership of the given elements, in the same order as they are requested.
-
smove
Description copied from interface:SetCommands
Execute the command SMOVE. Summary: Move a member from one set to another Group: set Requires Redis 1.0.0- Specified by:
smove
in interfaceSetCommands<K,
V> - Parameters:
source
- the keydestination
- the keymember
- the member to move- Returns:
true
the element is moved.false
the element is not a member of source and no operation was performed.
-
spop
Description copied from interface:SetCommands
Execute the command SPOP. Summary: Remove and return one or multiple random members from a set Group: set Requires Redis 1.0.0- Specified by:
spop
in interfaceSetCommands<K,
V> - Parameters:
key
- the key- Returns:
- the removed member, or
null
when key does not exist.
-
spop
Description copied from interface:SetCommands
Execute the command SPOP. Summary: Remove and return one or multiple random members from a set Group: set Requires Redis 1.0.0- Specified by:
spop
in interfaceSetCommands<K,
V> - Parameters:
key
- the key- Returns:
- the removed members, or an empty array when key does not exist.
-
srandmember
Description copied from interface:SetCommands
Execute the command SRANDMEMBER. Summary: Get one or multiple random members from a set Group: set Requires Redis 1.0.0- Specified by:
srandmember
in interfaceSetCommands<K,
V> - Parameters:
key
- the key- Returns:
- the randomly selected element, or
null
when key does not exist.
-
srandmember
Description copied from interface:SetCommands
Execute the command SRANDMEMBER. Summary: Get one or multiple random members from a set Group: set Requires Redis 1.0.0- Specified by:
srandmember
in interfaceSetCommands<K,
V> - Parameters:
key
- the keycount
- the number of elements to pick- Returns:
- an array of elements, or an empty array when key does not exist.
-
srem
Description copied from interface:SetCommands
Execute the command SREM. Summary: Remove one or more members from a set Group: set Requires Redis 1.0.0- Specified by:
srem
in interfaceSetCommands<K,
V> - Parameters:
key
- the key- Returns:
- the number of members that were removed from the set, not including non-existing members.
-
sunion
Description copied from interface:SetCommands
Execute the command SUNION. Summary: Add multiple sets Group: set Requires Redis 1.0.0- Specified by:
sunion
in interfaceSetCommands<K,
V> - Parameters:
keys
- the keys- Returns:
- list with members of the resulting set.
-
sunionstore
Description copied from interface:SetCommands
Execute the command SUNIONSTORE. Summary: Add multiple sets and store the resulting set in a key Group: set Requires Redis 1.0.0- Specified by:
sunionstore
in interfaceSetCommands<K,
V> - Parameters:
destination
- the destination keykeys
- the keys- Returns:
- the number of elements in the resulting set.
-
sscan
Description copied from interface:SetCommands
Execute the command SSCAN. Summary: Incrementally iterate Set elements Group: set Requires Redis 2.8.0- Specified by:
sscan
in interfaceSetCommands<K,
V> - Parameters:
key
- the key- Returns:
- the cursor
-
sscan
Description copied from interface:SetCommands
Execute the command SSCAN. Summary: Incrementally iterate Set elements Group: set Requires Redis 2.8.0- Specified by:
sscan
in interfaceSetCommands<K,
V> - Parameters:
key
- the keyscanArgs
- the extra parameters- Returns:
- the cursor
-
sort
Description copied from interface:SetCommands
Execute the command SORT. Summary: Sort the elements in a list, set or sorted set Group: generic Requires Redis 1.0.0- Specified by:
sort
in interfaceSetCommands<K,
V> - Returns:
- the list of sorted elements.
-
sort
Description copied from interface:SetCommands
Execute the command SORT. Summary: Sort the elements in a list, set or sorted set Group: generic Requires Redis 1.0.0- Specified by:
sort
in interfaceSetCommands<K,
V> - Parameters:
key
- the keysortArguments
- theSORT
command extra-arguments- Returns:
- the list of sorted elements.
-
sortAndStore
Description copied from interface:SetCommands
Execute the command SORT with theSTORE
option. Summary: Sort the elements in a list, set or sorted set Group: generic Requires Redis 1.0.0- Specified by:
sortAndStore
in interfaceSetCommands<K,
V> sortArguments
- the SORT command extra-arguments- Returns:
- the number of sorted elements in the destination list.
-
sortAndStore
Description copied from interface:SetCommands
Execute the command SORT with theSTORE
option. Summary: Sort the elements in a list, set or sorted set Group: generic Requires Redis 1.0.0- Specified by:
sortAndStore
in interfaceSetCommands<K,
V> - Returns:
- the number of sorted elements in the destination list.
-