Interface ReactiveStringCommands
- All Known Subinterfaces:
- ReactiveClusterStringCommands
public interface ReactiveStringCommands
Redis String commands executed using reactive infrastructure.
- Since:
- 2.0
- Author:
- Christoph Strobl, Mark Paluch
- 
Nested Class SummaryNested ClassesModifier and TypeInterfaceDescriptionstatic classAPPENDcommand parameters.static classBITCOUNTcommand parameters.static classBITFIELDcommand parameters.static classBITOPcommand parameters.static classstatic classGETBITcommand parameters.static classReactiveRedisConnection.CommandforGETEX.static classMSETcommand parameters.static classSETBITcommand parameters.static classSETcommand parameters.static classSETRANGEcommand parameters.
- 
Method SummaryModifier and TypeMethodDescriptiondefault reactor.core.publisher.Mono<Long>append(ByteBuffer key, ByteBuffer value) Append a value to key.reactor.core.publisher.Flux<ReactiveRedisConnection.NumericResponse<ReactiveStringCommands.AppendCommand,Long>> append(org.reactivestreams.Publisher<ReactiveStringCommands.AppendCommand> commands) default reactor.core.publisher.Mono<Long>bitCount(ByteBuffer key) Count the number of set bits (population counting) in value stored at key.default reactor.core.publisher.Mono<Long>bitCount(ByteBuffer key, long start, long end) Count the number of set bits (population counting) of value stored at key between start and end.reactor.core.publisher.Flux<ReactiveRedisConnection.NumericResponse<ReactiveStringCommands.BitCountCommand,Long>> bitCount(org.reactivestreams.Publisher<ReactiveStringCommands.BitCountCommand> commands) Count the number of set bits (population counting) of value stored at key between start and end.bitField(ByteBuffer key, BitFieldSubCommands subCommands) Get / Manipulate specific integer fields of varying bit widths and arbitrary non (necessary) aligned offset stored at a givenkey.reactor.core.publisher.Flux<ReactiveRedisConnection.MultiValueResponse<ReactiveStringCommands.BitFieldCommand,Long>> bitField(org.reactivestreams.Publisher<ReactiveStringCommands.BitFieldCommand> commands) Get / Manipulate specific integer fields of varying bit widths and arbitrary non (necessary) aligned offset stored at a givenkey.default reactor.core.publisher.Mono<Long>bitOp(Collection<ByteBuffer> keys, RedisStringCommands.BitOperation bitOp, ByteBuffer destination) Perform bitwise operations between strings.reactor.core.publisher.Flux<ReactiveRedisConnection.NumericResponse<ReactiveStringCommands.BitOpCommand,Long>> bitOp(org.reactivestreams.Publisher<ReactiveStringCommands.BitOpCommand> commands) Perform bitwise operations between strings.default reactor.core.publisher.Mono<Long>bitPos(ByteBuffer key, boolean bit) Return the position of the first bit set to givenbitin a string.default reactor.core.publisher.Mono<Long>bitPos(ByteBuffer key, boolean bit, Range<Long> range) Return the position of the first bit set to givenbitin a string.reactor.core.publisher.Flux<ReactiveRedisConnection.NumericResponse<ReactiveStringCommands.BitPosCommand,Long>> bitPos(org.reactivestreams.Publisher<ReactiveStringCommands.BitPosCommand> commands) Emmit the the position of the first bit set to givenbitin a string.default reactor.core.publisher.Mono<ByteBuffer>get(ByteBuffer key) Get single element stored at key.reactor.core.publisher.Flux<ReactiveRedisConnection.ByteBufferResponse<ReactiveRedisConnection.KeyCommand>>get(org.reactivestreams.Publisher<ReactiveRedisConnection.KeyCommand> keys) Get elements one by one.default reactor.core.publisher.Mono<Boolean>getBit(ByteBuffer key, long offset) Get the bit value at offset of value at key.reactor.core.publisher.Flux<ReactiveRedisConnection.BooleanResponse<ReactiveStringCommands.GetBitCommand>>getBit(org.reactivestreams.Publisher<ReactiveStringCommands.GetBitCommand> commands) Get the bit value at offset of value at key.default reactor.core.publisher.Mono<ByteBuffer>getDel(ByteBuffer key) Return the value atkeyand delete the key.reactor.core.publisher.Flux<ReactiveRedisConnection.ByteBufferResponse<ReactiveRedisConnection.KeyCommand>>getDel(org.reactivestreams.Publisher<ReactiveRedisConnection.KeyCommand> commands) Return the value atkeyand delete the key.default reactor.core.publisher.Mono<ByteBuffer>getEx(ByteBuffer key, Expiration expiration) Return the value atkeyand expire the key by applyingExpiration.reactor.core.publisher.Flux<ReactiveRedisConnection.ByteBufferResponse<ReactiveStringCommands.GetExCommand>>getEx(org.reactivestreams.Publisher<ReactiveStringCommands.GetExCommand> commands) Return the value atkeyand expire the key by applyingExpiration.default reactor.core.publisher.Mono<ByteBuffer>getRange(ByteBuffer key, long start, long end) Get a substring of value of key between start and end.reactor.core.publisher.Flux<ReactiveRedisConnection.ByteBufferResponse<ReactiveRedisConnection.RangeCommand>>getRange(org.reactivestreams.Publisher<ReactiveRedisConnection.RangeCommand> commands) Get a substring of value of key between start and end.default reactor.core.publisher.Mono<ByteBuffer>getSet(ByteBuffer key, ByteBuffer value) Set value for key and return the existing value.reactor.core.publisher.Flux<ReactiveRedisConnection.ByteBufferResponse<ReactiveStringCommands.SetCommand>>getSet(org.reactivestreams.Publisher<ReactiveStringCommands.SetCommand> commands) Set value for key and return the existing value one by one.default reactor.core.publisher.Mono<List<ByteBuffer>>mGet(List<ByteBuffer> keys) Get multiple values in one batch.reactor.core.publisher.Flux<ReactiveRedisConnection.MultiValueResponse<List<ByteBuffer>,ByteBuffer>> mGet(org.reactivestreams.Publisher<List<ByteBuffer>> keysets) Get multiple values at for keysets in batches.default reactor.core.publisher.Mono<Boolean>mSet(Map<ByteBuffer, ByteBuffer> keyValuePairs) Set multiple keys to multiple values using key-value pairs provided in tuple.reactor.core.publisher.Flux<ReactiveRedisConnection.BooleanResponse<ReactiveStringCommands.MSetCommand>>mSet(org.reactivestreams.Publisher<ReactiveStringCommands.MSetCommand> commands) Set multiple keys to multiple values using key-value pairs provided in commands.default reactor.core.publisher.Mono<Boolean>mSetNX(Map<ByteBuffer, ByteBuffer> keyValuePairs) Set multiple keys to multiple values using key-value pairs provided in keyValuePairs only if the provided key does not exist.reactor.core.publisher.Flux<ReactiveRedisConnection.BooleanResponse<ReactiveStringCommands.MSetCommand>>mSetNX(org.reactivestreams.Publisher<ReactiveStringCommands.MSetCommand> source) Set multiple keys to multiple values using key-value pairs provided in tuples only if the provided key does not exist.default reactor.core.publisher.Mono<Boolean>pSetEX(ByteBuffer key, ByteBuffer value, Expiration expireTimeout) Set key value pair andExpiration.reactor.core.publisher.Flux<ReactiveRedisConnection.BooleanResponse<ReactiveStringCommands.SetCommand>>pSetEX(org.reactivestreams.Publisher<ReactiveStringCommands.SetCommand> commands) Set key value pairs andExpiration.default reactor.core.publisher.Mono<Boolean>set(ByteBuffer key, ByteBuffer value) Set value for key.default reactor.core.publisher.Mono<Boolean>set(ByteBuffer key, ByteBuffer value, Expiration expiration, RedisStringCommands.SetOption option) Set value for key with expiration and options.reactor.core.publisher.Flux<ReactiveRedisConnection.BooleanResponse<ReactiveStringCommands.SetCommand>>set(org.reactivestreams.Publisher<ReactiveStringCommands.SetCommand> commands) Set each and every item separately by invokingReactiveStringCommands.SetCommand.default reactor.core.publisher.Mono<Boolean>setBit(ByteBuffer key, long offset, boolean value) Sets the bit at offset in value stored at key and return the original value.reactor.core.publisher.Flux<ReactiveRedisConnection.BooleanResponse<ReactiveStringCommands.SetBitCommand>>setBit(org.reactivestreams.Publisher<ReactiveStringCommands.SetBitCommand> commands) Sets the bit at offset in value stored at key and return the original value.default reactor.core.publisher.Mono<Boolean>setEX(ByteBuffer key, ByteBuffer value, Expiration expireTimeout) Set key value pair andExpiration.reactor.core.publisher.Flux<ReactiveRedisConnection.BooleanResponse<ReactiveStringCommands.SetCommand>>setEX(org.reactivestreams.Publisher<ReactiveStringCommands.SetCommand> commands) Set key value pairs andExpiration.default reactor.core.publisher.Mono<Boolean>setNX(ByteBuffer key, ByteBuffer value) Set value for key, only if key does not exist.reactor.core.publisher.Flux<ReactiveRedisConnection.BooleanResponse<ReactiveStringCommands.SetCommand>>setNX(org.reactivestreams.Publisher<ReactiveStringCommands.SetCommand> values) Set key value pairs, only if key does not exist.default reactor.core.publisher.Mono<Long>setRange(ByteBuffer key, ByteBuffer value, long offset) Overwrite parts of key starting at the specified offset with given value.reactor.core.publisher.Flux<ReactiveRedisConnection.NumericResponse<ReactiveStringCommands.SetRangeCommand,Long>> setRange(org.reactivestreams.Publisher<ReactiveStringCommands.SetRangeCommand> commands) Overwrite parts ofReactiveRedisConnection.KeyCommand.keystarting at the specified offset with givenReactiveStringCommands.SetRangeCommand.value.default reactor.core.publisher.Mono<Long>strLen(ByteBuffer key) Get the length of the value stored at key.reactor.core.publisher.Flux<ReactiveRedisConnection.NumericResponse<ReactiveRedisConnection.KeyCommand,Long>> strLen(org.reactivestreams.Publisher<ReactiveRedisConnection.KeyCommand> keys) Get the length of the value stored at key.
- 
Method Details- 
setSet value for key.- Parameters:
- key- must not be null.
- value- must not be null.
- Returns:
- See Also:
 
- 
setdefault reactor.core.publisher.Mono<Boolean> set(ByteBuffer key, ByteBuffer value, Expiration expiration, RedisStringCommands.SetOption option) Set value for key with expiration and options.- Parameters:
- key- must not be null.
- value- must not be null.
- expiration- must not be null. Use- Expiration.persistent()for no expiration time or- Expiration.keepTtl()to keep the existing.
- option- must not be null.
- Returns:
- See Also:
 
- 
setreactor.core.publisher.Flux<ReactiveRedisConnection.BooleanResponse<ReactiveStringCommands.SetCommand>> set(org.reactivestreams.Publisher<ReactiveStringCommands.SetCommand> commands) Set each and every item separately by invokingReactiveStringCommands.SetCommand.- Parameters:
- commands- must not be null.
- Returns:
- Fluxof- ReactiveRedisConnection.BooleanResponseholding the- ReactiveStringCommands.SetCommandalong with the command result.
- See Also:
 
- 
getGet single element stored at key.- Parameters:
- key- must not be null.
- Returns:
- Mono.empty()in case key does not exist.
- See Also:
 
- 
getreactor.core.publisher.Flux<ReactiveRedisConnection.ByteBufferResponse<ReactiveRedisConnection.KeyCommand>> get(org.reactivestreams.Publisher<ReactiveRedisConnection.KeyCommand> keys) Get elements one by one.- Parameters:
- keys- must not be null.
- Returns:
- Fluxof- ReactiveRedisConnection.ByteBufferResponseholding the key to get along with the value retrieved.
- See Also:
 
- 
getDelReturn the value atkeyand delete the key.- Parameters:
- key- must not be null.
- Returns:
- Mono.empty()in case key does not exist.
- Since:
- 2.6
- See Also:
 
- 
getDelreactor.core.publisher.Flux<ReactiveRedisConnection.ByteBufferResponse<ReactiveRedisConnection.KeyCommand>> getDel(org.reactivestreams.Publisher<ReactiveRedisConnection.KeyCommand> commands) Return the value atkeyand delete the key.- Parameters:
- commands- must not be null.
- Returns:
- Fluxof- ReactiveRedisConnection.ByteBufferResponseholding the key to get along with the value retrieved.
- Since:
- 2.6
- See Also:
 
- 
getExReturn the value atkeyand expire the key by applyingExpiration.- Parameters:
- key- must not be null.
- expiration- must not be null.
- Returns:
- Mono.empty()in case key does not exist.
- Since:
- 2.6
- See Also:
 
- 
getExreactor.core.publisher.Flux<ReactiveRedisConnection.ByteBufferResponse<ReactiveStringCommands.GetExCommand>> getEx(org.reactivestreams.Publisher<ReactiveStringCommands.GetExCommand> commands) Return the value atkeyand expire the key by applyingExpiration.- Parameters:
- commands- must not be null.
- Returns:
- Fluxof- ReactiveRedisConnection.ByteBufferResponseholding the key to get along with the value retrieved.
- Since:
- 2.6
- See Also:
 
- 
getSetSet value for key and return the existing value.- Parameters:
- key- must not be null.
- value- must not be null.
- Returns:
- Mono.empty()if key did not exist.
- See Also:
 
- 
getSetreactor.core.publisher.Flux<ReactiveRedisConnection.ByteBufferResponse<ReactiveStringCommands.SetCommand>> getSet(org.reactivestreams.Publisher<ReactiveStringCommands.SetCommand> commands) Set value for key and return the existing value one by one.- Parameters:
- commands- must not be null.
- Returns:
- Fluxof- ReactiveRedisConnection.ByteBufferResponseholding the- ReactiveStringCommands.SetCommandalong with the previously existing value.
- See Also:
 
- 
mGetGet multiple values in one batch. Values are in the order of the requested keys. Absent field values are represented using null in the resultingList.- Parameters:
- keys- must not be null.
- Returns:
- See Also:
 
- 
mGetreactor.core.publisher.Flux<ReactiveRedisConnection.MultiValueResponse<List<ByteBuffer>,ByteBuffer>> mGet(org.reactivestreams.Publisher<List<ByteBuffer>> keysets) Get multiple values at for keysets in batches. Values are in the order of the requested keys. Absent field values are represented using null in the resultingList.- Parameters:
- keysets- must not be null.
- Returns:
- See Also:
 
- 
setNXSet value for key, only if key does not exist.- Parameters:
- key- must not be null.
- value- must not be null.
- Returns:
- See Also:
 
- 
setNXreactor.core.publisher.Flux<ReactiveRedisConnection.BooleanResponse<ReactiveStringCommands.SetCommand>> setNX(org.reactivestreams.Publisher<ReactiveStringCommands.SetCommand> values) Set key value pairs, only if key does not exist.- Parameters:
- values- must not be null.
- Returns:
- See Also:
 
- 
setEXdefault reactor.core.publisher.Mono<Boolean> setEX(ByteBuffer key, ByteBuffer value, Expiration expireTimeout) Set key value pair andExpiration.- Parameters:
- key- must not be null.
- value- must not be null.
- expireTimeout- must not be null.
- Returns:
- See Also:
 
- 
setEXreactor.core.publisher.Flux<ReactiveRedisConnection.BooleanResponse<ReactiveStringCommands.SetCommand>> setEX(org.reactivestreams.Publisher<ReactiveStringCommands.SetCommand> commands) Set key value pairs andExpiration.- Parameters:
- commands- must not be null.
- Returns:
- See Also:
 
- 
pSetEXdefault reactor.core.publisher.Mono<Boolean> pSetEX(ByteBuffer key, ByteBuffer value, Expiration expireTimeout) Set key value pair andExpiration.- Parameters:
- key- must not be null.
- value- must not be null.
- expireTimeout- must not be null.
- Returns:
- See Also:
 
- 
pSetEXreactor.core.publisher.Flux<ReactiveRedisConnection.BooleanResponse<ReactiveStringCommands.SetCommand>> pSetEX(org.reactivestreams.Publisher<ReactiveStringCommands.SetCommand> commands) Set key value pairs andExpiration.- Parameters:
- commands- must not be null.
- Returns:
- See Also:
 
- 
mSetSet multiple keys to multiple values using key-value pairs provided in tuple.- Parameters:
- keyValuePairs- must not be null.
- Returns:
- See Also:
 
- 
mSetreactor.core.publisher.Flux<ReactiveRedisConnection.BooleanResponse<ReactiveStringCommands.MSetCommand>> mSet(org.reactivestreams.Publisher<ReactiveStringCommands.MSetCommand> commands) Set multiple keys to multiple values using key-value pairs provided in commands.- Parameters:
- commands- must not be null.
- Returns:
- See Also:
 
- 
mSetNXSet multiple keys to multiple values using key-value pairs provided in keyValuePairs only if the provided key does not exist.- Parameters:
- keyValuePairs- must not be null.
- Returns:
- See Also:
 
- 
mSetNXreactor.core.publisher.Flux<ReactiveRedisConnection.BooleanResponse<ReactiveStringCommands.MSetCommand>> mSetNX(org.reactivestreams.Publisher<ReactiveStringCommands.MSetCommand> source) Set multiple keys to multiple values using key-value pairs provided in tuples only if the provided key does not exist.- Parameters:
- source- must not be null.
- Returns:
- See Also:
 
- 
appendAppend a value to key.- Parameters:
- key- must not be null.
- value- must not be null.
- Returns:
- See Also:
 
- 
appendreactor.core.publisher.Flux<ReactiveRedisConnection.NumericResponse<ReactiveStringCommands.AppendCommand,Long>> append(org.reactivestreams.Publisher<ReactiveStringCommands.AppendCommand> commands) Append aReactiveStringCommands.AppendCommand.getValue()to theReactiveRedisConnection.KeyCommand.getKey().- Parameters:
- commands- must not be null.
- Returns:
- See Also:
 
- 
getRangeGet a substring of value of key between start and end.- Parameters:
- key- must not be null.
- start-
- end-
- Returns:
- See Also:
 
- 
getRangereactor.core.publisher.Flux<ReactiveRedisConnection.ByteBufferResponse<ReactiveRedisConnection.RangeCommand>> getRange(org.reactivestreams.Publisher<ReactiveRedisConnection.RangeCommand> commands) Get a substring of value of key between start and end.- Parameters:
- commands- must not be null.
- Returns:
- See Also:
 
- 
setRangeOverwrite parts of key starting at the specified offset with given value.- Parameters:
- key- must not be null.
- value- must not be null.
- offset-
- Returns:
- See Also:
 
- 
setRangereactor.core.publisher.Flux<ReactiveRedisConnection.NumericResponse<ReactiveStringCommands.SetRangeCommand,Long>> setRange(org.reactivestreams.Publisher<ReactiveStringCommands.SetRangeCommand> commands) Overwrite parts ofReactiveRedisConnection.KeyCommand.keystarting at the specified offset with givenReactiveStringCommands.SetRangeCommand.value.- Parameters:
- commands- must not be null.
- Returns:
- See Also:
 
- 
getBitGet the bit value at offset of value at key.- Parameters:
- key- must not be null.
- offset-
- Returns:
- See Also:
 
- 
getBitreactor.core.publisher.Flux<ReactiveRedisConnection.BooleanResponse<ReactiveStringCommands.GetBitCommand>> getBit(org.reactivestreams.Publisher<ReactiveStringCommands.GetBitCommand> commands) Get the bit value at offset of value at key.- Parameters:
- commands- must not be null.
- Returns:
- See Also:
 
- 
setBitSets the bit at offset in value stored at key and return the original value.- Parameters:
- key- must not be null.
- offset-
- value-
- Returns:
 
- 
setBitreactor.core.publisher.Flux<ReactiveRedisConnection.BooleanResponse<ReactiveStringCommands.SetBitCommand>> setBit(org.reactivestreams.Publisher<ReactiveStringCommands.SetBitCommand> commands) Sets the bit at offset in value stored at key and return the original value.- Parameters:
- commands- must not be null.
- Returns:
- See Also:
 
- 
bitCountCount the number of set bits (population counting) in value stored at key.- Parameters:
- key- must not be null.
- Returns:
- See Also:
 
- 
bitCountCount the number of set bits (population counting) of value stored at key between start and end.- Parameters:
- key- must not be null.
- start-
- end-
- Returns:
- See Also:
 
- 
bitCountreactor.core.publisher.Flux<ReactiveRedisConnection.NumericResponse<ReactiveStringCommands.BitCountCommand,Long>> bitCount(org.reactivestreams.Publisher<ReactiveStringCommands.BitCountCommand> commands) Count the number of set bits (population counting) of value stored at key between start and end.- Parameters:
- commands- must not be null.
- Returns:
- See Also:
 
- 
bitFielddefault reactor.core.publisher.Mono<List<Long>> bitField(ByteBuffer key, BitFieldSubCommands subCommands) Get / Manipulate specific integer fields of varying bit widths and arbitrary non (necessary) aligned offset stored at a givenkey.- Parameters:
- key- must not be null.
- subCommands-
- Returns:
- Since:
- 2.1
- See Also:
 
- 
bitFieldreactor.core.publisher.Flux<ReactiveRedisConnection.MultiValueResponse<ReactiveStringCommands.BitFieldCommand,Long>> bitField(org.reactivestreams.Publisher<ReactiveStringCommands.BitFieldCommand> commands) Get / Manipulate specific integer fields of varying bit widths and arbitrary non (necessary) aligned offset stored at a givenkey.- Parameters:
- commands- must not be null.
- Returns:
- Since:
- 2.1
- See Also:
 
- 
bitOpdefault reactor.core.publisher.Mono<Long> bitOp(Collection<ByteBuffer> keys, RedisStringCommands.BitOperation bitOp, ByteBuffer destination) Perform bitwise operations between strings.- Parameters:
- keys- must not be null.
- bitOp- must not be null.
- destination- must not be null.
- Returns:
- See Also:
 
- 
bitOpreactor.core.publisher.Flux<ReactiveRedisConnection.NumericResponse<ReactiveStringCommands.BitOpCommand,Long>> bitOp(org.reactivestreams.Publisher<ReactiveStringCommands.BitOpCommand> commands) Perform bitwise operations between strings.- Parameters:
- commands- must not be null.
- Returns:
- See Also:
 
- 
bitPosReturn the position of the first bit set to givenbitin a string.- Parameters:
- key- the key holding the actual String.
- bit- the bit value to look for.
- Returns:
- Monoemitting result when ready.
- Since:
- 2.1
 
- 
bitPosReturn the position of the first bit set to givenbitin a string.Rangestart and end can contain negative values in order to index bytes starting from the end of the string, where -1 is the last byte, -2 is the penultimate.- Parameters:
- key- the key holding the actual String.
- bit- the bit value to look for.
- range- must not be null. Use- Range.unbounded()to not limit search.
- Returns:
- Monoemitting result when ready.
- Since:
- 2.1
 
- 
bitPosreactor.core.publisher.Flux<ReactiveRedisConnection.NumericResponse<ReactiveStringCommands.BitPosCommand,Long>> bitPos(org.reactivestreams.Publisher<ReactiveStringCommands.BitPosCommand> commands) Emmit the the position of the first bit set to givenbitin a string. Get the length of the value stored at key.- Parameters:
- commands- must not be null.
- Returns:
- Fluxemitting results when ready.
- Since:
- 2.1
 
- 
strLenGet the length of the value stored at key.- Parameters:
- key- must not be null.
- Returns:
- See Also:
 
- 
strLenreactor.core.publisher.Flux<ReactiveRedisConnection.NumericResponse<ReactiveRedisConnection.KeyCommand,Long>> strLen(org.reactivestreams.Publisher<ReactiveRedisConnection.KeyCommand> keys) Get the length of the value stored at key.- Parameters:
- keys- must not be null.
- Returns:
- See Also:
 
 
-