Interface ReactiveSetCommands
- All Known Subinterfaces:
ReactiveClusterSetCommands
public interface ReactiveSetCommands
Redis Set commands executed using reactive infrastructure.
- Since:
- 2.0
- Author:
- Christoph Strobl, Mark Paluch
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classSADDcommand parameters.static classSDIFFcommand parameters.static classSDIFFSTOREcommand parameters.static classSINTERcommand parameters.static classSINTERSTOREcommand parameters.static classSISMEMBERcommand parameters.static classSMISMEMBERcommand parameters.static classSMOVEcommand parameters.static classSPOPcommand parameters.static classSRANDMEMBERcommand parameters.static classSREMcommand parameters.static classSUNIONcommand parameters.static classSUNIONSTOREcommand parameters. -
Method Summary
Modifier and TypeMethodDescriptionsAdd(ByteBuffer key, ByteBuffer value) Add given value to set at key.sAdd(ByteBuffer key, Collection<ByteBuffer> values) Add given values to set at key.sAdd(Publisher<ReactiveSetCommands.SAddCommand> commands) Add givenReactiveSetCommands.SAddCommand.getValues()to set atReactiveRedisConnection.KeyCommand.getKey().sCard(ByteBuffer key) Get size of set at key.sCard(Publisher<ReactiveRedisConnection.KeyCommand> commands) Get size of set atReactiveRedisConnection.KeyCommand.getKey().default Flux<ByteBuffer>sDiff(Collection<ByteBuffer> keys) Returns the diff of the members of all given sets at keys.sDiff(Publisher<ReactiveSetCommands.SDiffCommand> commands) Returns the diff of the members of all given sets atReactiveSetCommands.SInterCommand.getKeys().sDiffStore(ByteBuffer destinationKey, Collection<ByteBuffer> keys) Diff all given sets at keys and store result in destinationKey.Diff all given sets at keys and store result in destinationKey.default Flux<ByteBuffer>sInter(Collection<ByteBuffer> keys) Returns the members intersecting all given sets at keys.sInter(Publisher<ReactiveSetCommands.SInterCommand> commands) Returns the members intersecting all given sets atReactiveSetCommands.SInterCommand.getKeys().sInterStore(ByteBuffer destinationKey, Collection<ByteBuffer> keys) Intersect all given sets at keys and store result in destinationKey.Intersect all given sets at keys and store result in destinationKey.sIsMember(ByteBuffer key, ByteBuffer value) Check if set at key contains value.Check if set atReactiveRedisConnection.KeyCommand.getKey()containsReactiveSetCommands.SIsMemberCommand.getValue().default Flux<ByteBuffer>sMembers(ByteBuffer key) Get all elements of set at key.sMembers(Publisher<ReactiveRedisConnection.KeyCommand> commands) Get all elements of set atReactiveRedisConnection.KeyCommand.getKey().sMIsMember(ByteBuffer key, List<ByteBuffer> values) Check if set atkeycontains one or morevalues.Check if set atReactiveRedisConnection.KeyCommand.getKey()containsReactiveSetCommands.SMIsMemberCommand.getValues().sMove(ByteBuffer sourceKey, ByteBuffer destinationKey, ByteBuffer value) Move value from sourceKey to destinationKeysMove(Publisher<ReactiveSetCommands.SMoveCommand> commands) default Mono<ByteBuffer>sPop(ByteBuffer key) Remove and return a random member from set at key.default Flux<ByteBuffer>sPop(ByteBuffer key, long count) Remove and returncountrandom members from set atkey.sPop(Publisher<ReactiveRedisConnection.KeyCommand> commands) Remove and return a random member from set atReactiveRedisConnection.KeyCommand.getKey()sPop(ReactiveSetCommands.SPopCommand command) Remove and return a random member from set at key.default Mono<ByteBuffer>sRandMember(ByteBuffer key) Get random element from set at key.default Flux<ByteBuffer>sRandMember(ByteBuffer key, Long count) Get count random elements from set at key.Flux<ReactiveRedisConnection.CommandResponse<ReactiveSetCommands.SRandMembersCommand,Flux<ByteBuffer>>> GetReactiveSetCommands.SRandMembersCommand.getCount()random elements from set atReactiveRedisConnection.KeyCommand.getKey().sRem(ByteBuffer key, ByteBuffer value) Remove given value from set at key and return the number of removed elements.sRem(ByteBuffer key, Collection<ByteBuffer> values) Remove given values from set at key and return the number of removed elements.sRem(Publisher<ReactiveSetCommands.SRemCommand> commands) Remove givenReactiveSetCommands.SRemCommand.getValues()from set atReactiveRedisConnection.KeyCommand.getKey().default Flux<ByteBuffer>sScan(ByteBuffer key) Use aFluxto iterate over members in the set atkey.default Flux<ByteBuffer>sScan(ByteBuffer key, ScanOptions options) sScan(Publisher<ReactiveRedisConnection.KeyScanCommand> commands) Use aFluxto iterate over members in the set atkey.default Flux<ByteBuffer>sUnion(Collection<ByteBuffer> keys) Returns the members intersecting all given sets at keys.sUnion(Publisher<ReactiveSetCommands.SUnionCommand> commands) Returns the members intersecting all given sets atReactiveSetCommands.SInterCommand.getKeys().sUnionStore(ByteBuffer destinationKey, Collection<ByteBuffer> keys) Union all given sets at keys and store result in destinationKey.Union all given sets at keys and store result in destinationKey.
-
Method Details
-
sAdd
Add given value to set at key.- Parameters:
key- must not be null.value- must not be null.- Returns:
- See Also:
-
sAdd
Add given values to set at key.- Parameters:
key- must not be null.values- must not be null.- Returns:
- See Also:
-
sAdd
Flux<ReactiveRedisConnection.NumericResponse<ReactiveSetCommands.SAddCommand,Long>> sAdd(Publisher<ReactiveSetCommands.SAddCommand> commands) Add givenReactiveSetCommands.SAddCommand.getValues()to set atReactiveRedisConnection.KeyCommand.getKey().- Parameters:
commands- must not be null.- Returns:
- See Also:
-
sRem
Remove given value from set at key and return the number of removed elements.- Parameters:
key- must not be null.value- must not be null.- Returns:
- See Also:
-
sRem
Remove given values from set at key and return the number of removed elements.- Parameters:
key- must not be null.values- must not be null.- Returns:
- See Also:
-
sRem
Flux<ReactiveRedisConnection.NumericResponse<ReactiveSetCommands.SRemCommand,Long>> sRem(Publisher<ReactiveSetCommands.SRemCommand> commands) Remove givenReactiveSetCommands.SRemCommand.getValues()from set atReactiveRedisConnection.KeyCommand.getKey().- Parameters:
commands- must not be null.- Returns:
- See Also:
-
sPop
Remove and return a random member from set at key.- Parameters:
key- must not be null.- Returns:
- See Also:
-
sPop
Remove and returncountrandom members from set atkey.- Parameters:
key- must not be null.count- number of random members to pop from the set.- Returns:
- See Also:
-
sPop
Remove and return a random member from set at key.- Parameters:
command- must not be null.- Returns:
- See Also:
-
sPop
Flux<ReactiveRedisConnection.ByteBufferResponse<ReactiveRedisConnection.KeyCommand>> sPop(Publisher<ReactiveRedisConnection.KeyCommand> commands) Remove and return a random member from set atReactiveRedisConnection.KeyCommand.getKey()- Parameters:
commands-- Returns:
- See Also:
-
sMove
Move value from sourceKey to destinationKey- Parameters:
sourceKey- must not be null.destinationKey- must not be null.value- must not be null.- Returns:
- See Also:
-
sMove
Flux<ReactiveRedisConnection.BooleanResponse<ReactiveSetCommands.SMoveCommand>> sMove(Publisher<ReactiveSetCommands.SMoveCommand> commands) MoveReactiveSetCommands.SMoveCommand.getValue()fromReactiveRedisConnection.KeyCommand.getKey()toReactiveSetCommands.SMoveCommand.getDestination().- Parameters:
commands- must not be null.- Returns:
- See Also:
-
sCard
Get size of set at key.- Parameters:
key- must not be null.- Returns:
- See Also:
-
sCard
Flux<ReactiveRedisConnection.NumericResponse<ReactiveRedisConnection.KeyCommand,Long>> sCard(Publisher<ReactiveRedisConnection.KeyCommand> commands) Get size of set atReactiveRedisConnection.KeyCommand.getKey().- Parameters:
commands- must not be null.- Returns:
- See Also:
-
sIsMember
Check if set at key contains value.- Parameters:
key- must not be null.value- must not be null.- Returns:
- See Also:
-
sIsMember
Flux<ReactiveRedisConnection.BooleanResponse<ReactiveSetCommands.SIsMemberCommand>> sIsMember(Publisher<ReactiveSetCommands.SIsMemberCommand> commands) Check if set atReactiveRedisConnection.KeyCommand.getKey()containsReactiveSetCommands.SIsMemberCommand.getValue().- Parameters:
commands- must not be null.- Returns:
- See Also:
-
sMIsMember
Check if set atkeycontains one or morevalues.- Parameters:
key- must not be null.values- must not be null.- Returns:
- null when used in pipeline / transaction.
- Since:
- 2.6
- See Also:
-
sMIsMember
Flux<ReactiveRedisConnection.MultiValueResponse<ReactiveSetCommands.SMIsMemberCommand,Boolean>> sMIsMember(Publisher<ReactiveSetCommands.SMIsMemberCommand> commands) Check if set atReactiveRedisConnection.KeyCommand.getKey()containsReactiveSetCommands.SMIsMemberCommand.getValues().- Parameters:
commands- must not be null.- Returns:
- Since:
- 2.6
- See Also:
-
sInter
Returns the members intersecting all given sets at keys.- Parameters:
keys- must not be null.- Returns:
- See Also:
-
sInter
Flux<ReactiveRedisConnection.CommandResponse<ReactiveSetCommands.SInterCommand,Flux<ByteBuffer>>> sInter(Publisher<ReactiveSetCommands.SInterCommand> commands) Returns the members intersecting all given sets atReactiveSetCommands.SInterCommand.getKeys().- Parameters:
commands- must not be null.- Returns:
- See Also:
-
sInterStore
Intersect all given sets at keys and store result in destinationKey.- Parameters:
destinationKey- must not be null.keys- must not be null.- Returns:
- size of set stored a destinationKey.
- See Also:
-
sInterStore
Flux<ReactiveRedisConnection.NumericResponse<ReactiveSetCommands.SInterStoreCommand,Long>> sInterStore(Publisher<ReactiveSetCommands.SInterStoreCommand> commands) Intersect all given sets at keys and store result in destinationKey.- Parameters:
commands- must not be null.- Returns:
- See Also:
-
sUnion
Returns the members intersecting all given sets at keys.- Parameters:
keys- must not be null.- Returns:
- See Also:
-
sUnion
Flux<ReactiveRedisConnection.CommandResponse<ReactiveSetCommands.SUnionCommand,Flux<ByteBuffer>>> sUnion(Publisher<ReactiveSetCommands.SUnionCommand> commands) Returns the members intersecting all given sets atReactiveSetCommands.SInterCommand.getKeys().- Parameters:
commands- must not be null.- Returns:
- See Also:
-
sUnionStore
Union all given sets at keys and store result in destinationKey.- Parameters:
destinationKey- must not be null.keys- must not be null.- Returns:
- size of set stored a destinationKey.
- See Also:
-
sUnionStore
Flux<ReactiveRedisConnection.NumericResponse<ReactiveSetCommands.SUnionStoreCommand,Long>> sUnionStore(Publisher<ReactiveSetCommands.SUnionStoreCommand> commands) Union all given sets at keys and store result in destinationKey.- Parameters:
commands- must not be null.- Returns:
- See Also:
-
sDiff
Returns the diff of the members of all given sets at keys.- Parameters:
keys- must not be null.- Returns:
- See Also:
-
sDiff
Flux<ReactiveRedisConnection.CommandResponse<ReactiveSetCommands.SDiffCommand,Flux<ByteBuffer>>> sDiff(Publisher<ReactiveSetCommands.SDiffCommand> commands) Returns the diff of the members of all given sets atReactiveSetCommands.SInterCommand.getKeys().- Parameters:
commands- must not be null.- Returns:
- See Also:
-
sDiffStore
Diff all given sets at keys and store result in destinationKey.- Parameters:
destinationKey- must not be null.keys- must not be null.- Returns:
- size of set stored a destinationKey.
- See Also:
-
sDiffStore
Flux<ReactiveRedisConnection.NumericResponse<ReactiveSetCommands.SDiffStoreCommand,Long>> sDiffStore(Publisher<ReactiveSetCommands.SDiffStoreCommand> commands) Diff all given sets at keys and store result in destinationKey.- Parameters:
commands- must not be null.- Returns:
- See Also:
-
sMembers
Get all elements of set at key.- Parameters:
key- must not be null.- Returns:
- See Also:
-
sMembers
Flux<ReactiveRedisConnection.CommandResponse<ReactiveRedisConnection.KeyCommand,Flux<ByteBuffer>>> sMembers(Publisher<ReactiveRedisConnection.KeyCommand> commands) Get all elements of set atReactiveRedisConnection.KeyCommand.getKey().- Parameters:
commands- must not be null.- Returns:
- See Also:
-
sScan
Use aFluxto iterate over members in the set atkey. The resultingFluxacts as a cursor and issuesSSCANcommands itself as long as the subscriber signals demand.- Parameters:
key- must not be null.- Returns:
- the
Fluxemitting the rawmembersone by one. - Throws:
IllegalArgumentException- when options is null.- Since:
- 2.1
- See Also:
-
sScan
Use aFluxto iterate over members in the set atkeygivenScanOptions. The resultingFluxacts as a cursor and issuesSSCANcommands itself as long as the subscriber signals demand.- Parameters:
key- must not be null.options- must not be null. UseScanOptions.NONEinstead.- Returns:
- the
Fluxemitting the rawmembersone by one. - Throws:
IllegalArgumentException- when one of the required arguments is null.- Since:
- 2.1
- See Also:
-
sScan
Flux<ReactiveRedisConnection.CommandResponse<ReactiveRedisConnection.KeyCommand,Flux<ByteBuffer>>> sScan(Publisher<ReactiveRedisConnection.KeyScanCommand> commands) Use aFluxto iterate over members in the set atkey. The resultingFluxacts as a cursor and issuesSSCANcommands itself as long as the subscriber signals demand.- Parameters:
commands- must not be null.- Returns:
- Since:
- 2.1
- See Also:
-
sRandMember
Get random element from set at key.- Parameters:
key- must not be null.- Returns:
- See Also:
-
sRandMember
Get count random elements from set at key.- Parameters:
key- must not be null.count- must not be null.- Returns:
- See Also:
-
sRandMember
Flux<ReactiveRedisConnection.CommandResponse<ReactiveSetCommands.SRandMembersCommand,Flux<ByteBuffer>>> sRandMember(Publisher<ReactiveSetCommands.SRandMembersCommand> commands) GetReactiveSetCommands.SRandMembersCommand.getCount()random elements from set atReactiveRedisConnection.KeyCommand.getKey().- Parameters:
commands- must not be null.- Returns:
- See Also:
-