Class ValkeyGlideClusterSetCommands
java.lang.Object
io.valkey.springframework.data.valkey.connection.valkeyglide.ValkeyGlideSetCommands
io.valkey.springframework.data.valkey.connection.valkeyglide.ValkeyGlideClusterSetCommands
- All Implemented Interfaces:
ValkeySetCommands
Implementation of
ValkeySetCommands for Valkey Glide in cluster mode.
This implementation handles multi-slot routing by fetching set members from different
cluster nodes in parallel and performing set operations locally.- Since:
- 2.0
- Author:
- Ilia Kolominsky
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSet<byte[]>sDiff(byte[]... keys) Diff all sets for givenkeys.sDiffStore(byte[] destKey, byte[]... keys) Diff all sets for givenkeysand store result indestKey.Set<byte[]>sInter(byte[]... keys) Returns the members intersecting all given sets atkeys.sInterStore(byte[] destKey, byte[]... keys) Intersect all given sets atkeysand store result indestKey.sMove(byte[] srcKey, byte[] destKey, byte[] value) MovevaluefromsrcKeytodestKeySet<byte[]>sUnion(byte[]... keys) Union all sets at givenkeys.sUnionStore(byte[] destKey, byte[]... keys) Union all sets at givenkeysand store result indestKey.Methods inherited from class io.valkey.springframework.data.valkey.connection.valkeyglide.ValkeyGlideSetCommands
sAdd, sCard, sIsMember, sMembers, sMIsMember, sPop, sPop, sRandMember, sRandMember, sRem, sScan
-
Constructor Details
-
ValkeyGlideClusterSetCommands
Creates a newValkeyGlideClusterSetCommands.- Parameters:
connection- must not be null.
-
-
Method Details
-
sInter
Description copied from interface:ValkeySetCommandsReturns the members intersecting all given sets atkeys.- Specified by:
sInterin interfaceValkeySetCommands- Overrides:
sInterin classValkeyGlideSetCommands- Parameters:
keys- must not be null.- Returns:
- empty
Setif no intersection found. null when used in pipeline / transaction. - See Also:
-
sUnion
Description copied from interface:ValkeySetCommandsUnion all sets at givenkeys.- Specified by:
sUnionin interfaceValkeySetCommands- Overrides:
sUnionin classValkeyGlideSetCommands- Parameters:
keys- must not be null.- Returns:
- empty
Setif keys do not exist. null when used in pipeline / transaction. - See Also:
-
sDiff
Description copied from interface:ValkeySetCommandsDiff all sets for givenkeys.- Specified by:
sDiffin interfaceValkeySetCommands- Overrides:
sDiffin classValkeyGlideSetCommands- Parameters:
keys- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
sDiffStore
Description copied from interface:ValkeySetCommandsDiff all sets for givenkeysand store result indestKey.- Specified by:
sDiffStorein interfaceValkeySetCommands- Overrides:
sDiffStorein classValkeyGlideSetCommands- Parameters:
destKey- must not be null.keys- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
sInterStore
Description copied from interface:ValkeySetCommandsIntersect all given sets atkeysand store result indestKey.- Specified by:
sInterStorein interfaceValkeySetCommands- Overrides:
sInterStorein classValkeyGlideSetCommands- Parameters:
destKey- must not be null.keys- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
sUnionStore
Description copied from interface:ValkeySetCommandsUnion all sets at givenkeysand store result indestKey.- Specified by:
sUnionStorein interfaceValkeySetCommands- Overrides:
sUnionStorein classValkeyGlideSetCommands- Parameters:
destKey- must not be null.keys- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
sMove
Description copied from interface:ValkeySetCommandsMovevaluefromsrcKeytodestKey- Specified by:
sMovein interfaceValkeySetCommands- Overrides:
sMovein classValkeyGlideSetCommands- Parameters:
srcKey- must not be null.destKey- must not be null.value- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-