Interface ReactiveHashCommands
- All Known Subinterfaces:
- ReactiveClusterHashCommands
public interface ReactiveHashCommands
Redis Hash commands executed using reactive infrastructure.
- Since:
- 2.0
- Author:
- Christoph Strobl, Mark Paluch
- 
Nested Class SummaryNested ClassesModifier and TypeInterfaceDescriptionstatic classstatic classHEXISTSReactiveRedisConnection.Command.static classstatic classHRANDFIELDReactiveRedisConnection.Command.static classstatic class
- 
Method SummaryModifier and TypeMethodDescriptiondefault reactor.core.publisher.Mono<Boolean>hDel(ByteBuffer key, ByteBuffer field) Delete given hash field.default reactor.core.publisher.Mono<Long>hDel(ByteBuffer key, Collection<ByteBuffer> fields) Delete given hash fields.reactor.core.publisher.Flux<ReactiveRedisConnection.NumericResponse<ReactiveHashCommands.HDelCommand,Long>> hDel(org.reactivestreams.Publisher<ReactiveHashCommands.HDelCommand> commands) Delete given hash fields.default reactor.core.publisher.Mono<Boolean>hExists(ByteBuffer key, ByteBuffer field) Determine if given hash field exists.reactor.core.publisher.Flux<ReactiveRedisConnection.BooleanResponse<ReactiveHashCommands.HExistsCommand>>hExists(org.reactivestreams.Publisher<ReactiveHashCommands.HExistsCommand> commands) Determine if given hash field exists.default reactor.core.publisher.Mono<ByteBuffer>hGet(ByteBuffer key, ByteBuffer field) Get value for given field from hash at key.default reactor.core.publisher.Flux<Map.Entry<ByteBuffer,ByteBuffer>> hGetAll(ByteBuffer key) Get entire hash stored at key.reactor.core.publisher.Flux<ReactiveRedisConnection.CommandResponse<ReactiveRedisConnection.KeyCommand,reactor.core.publisher.Flux<Map.Entry<ByteBuffer, ByteBuffer>>>> hGetAll(org.reactivestreams.Publisher<ReactiveRedisConnection.KeyCommand> commands) Get entire hash stored at key.default reactor.core.publisher.Flux<ByteBuffer>hKeys(ByteBuffer key) Get key set (fields) of hash at key.reactor.core.publisher.Flux<ReactiveRedisConnection.CommandResponse<ReactiveRedisConnection.KeyCommand,reactor.core.publisher.Flux<ByteBuffer>>> hKeys(org.reactivestreams.Publisher<ReactiveRedisConnection.KeyCommand> commands) Get key set (fields) of hash at key.default reactor.core.publisher.Mono<Long>hLen(ByteBuffer key) Get size of hash at key.reactor.core.publisher.Flux<ReactiveRedisConnection.NumericResponse<ReactiveRedisConnection.KeyCommand,Long>> hLen(org.reactivestreams.Publisher<ReactiveRedisConnection.KeyCommand> commands) Get size of hash at key.default reactor.core.publisher.Mono<List<ByteBuffer>>hMGet(ByteBuffer key, Collection<ByteBuffer> fields) Get values for given fields from hash at key.reactor.core.publisher.Flux<ReactiveRedisConnection.MultiValueResponse<ReactiveHashCommands.HGetCommand,ByteBuffer>> hMGet(org.reactivestreams.Publisher<ReactiveHashCommands.HGetCommand> commands) Get values for given fields from hash at key.default reactor.core.publisher.Mono<Boolean>hMSet(ByteBuffer key, Map<ByteBuffer, ByteBuffer> fieldValueMap) Set multiple hash fields to multiple values using data provided in fieldValueMap.default reactor.core.publisher.Mono<ByteBuffer>hRandField(ByteBuffer key) Return a random field from the hash stored atkey.default reactor.core.publisher.Flux<ByteBuffer>hRandField(ByteBuffer key, long count) Return a random field from the hash stored atkey.reactor.core.publisher.Flux<ReactiveRedisConnection.CommandResponse<ReactiveHashCommands.HRandFieldCommand,reactor.core.publisher.Flux<ByteBuffer>>> hRandField(org.reactivestreams.Publisher<ReactiveHashCommands.HRandFieldCommand> commands) Get random fields of hash at key.default reactor.core.publisher.Mono<Map.Entry<ByteBuffer,ByteBuffer>> Return a random field from the hash along with its value stored atkey.default reactor.core.publisher.Flux<Map.Entry<ByteBuffer,ByteBuffer>> hRandFieldWithValues(ByteBuffer key, long count) Return a random field from the hash along with its value stored atkey.reactor.core.publisher.Flux<ReactiveRedisConnection.CommandResponse<ReactiveHashCommands.HRandFieldCommand,reactor.core.publisher.Flux<Map.Entry<ByteBuffer, ByteBuffer>>>> hRandFieldWithValues(org.reactivestreams.Publisher<ReactiveHashCommands.HRandFieldCommand> commands) Get random fields along their values of hash at key.default reactor.core.publisher.Flux<Map.Entry<ByteBuffer,ByteBuffer>> hScan(ByteBuffer key) Use aFluxto iterate over entries in the hash atkey.default reactor.core.publisher.Flux<Map.Entry<ByteBuffer,ByteBuffer>> hScan(ByteBuffer key, ScanOptions options) reactor.core.publisher.Flux<ReactiveRedisConnection.CommandResponse<ReactiveRedisConnection.KeyCommand,reactor.core.publisher.Flux<Map.Entry<ByteBuffer, ByteBuffer>>>> hScan(org.reactivestreams.Publisher<ReactiveRedisConnection.KeyScanCommand> commands) Use aFluxto iterate over entries in the hash atkey.default reactor.core.publisher.Mono<Boolean>hSet(ByteBuffer key, ByteBuffer field, ByteBuffer value) Set the value of a hash field.reactor.core.publisher.Flux<ReactiveRedisConnection.BooleanResponse<ReactiveHashCommands.HSetCommand>>hSet(org.reactivestreams.Publisher<ReactiveHashCommands.HSetCommand> commands) Set the value of a hash field.default reactor.core.publisher.Mono<Boolean>hSetNX(ByteBuffer key, ByteBuffer field, ByteBuffer value) Set the value of a hash field.default reactor.core.publisher.Mono<Long>hStrLen(ByteBuffer key, ByteBuffer field) Get the length of the value associated withfield.reactor.core.publisher.Flux<ReactiveRedisConnection.NumericResponse<ReactiveHashCommands.HStrLenCommand,Long>> hStrLen(org.reactivestreams.Publisher<ReactiveHashCommands.HStrLenCommand> commands) Get the length of the value associated withfield.default reactor.core.publisher.Flux<ByteBuffer>hVals(ByteBuffer key) Get entry set (values) of hash at key.reactor.core.publisher.Flux<ReactiveRedisConnection.CommandResponse<ReactiveRedisConnection.KeyCommand,reactor.core.publisher.Flux<ByteBuffer>>> hVals(org.reactivestreams.Publisher<ReactiveRedisConnection.KeyCommand> commands) Get entry set (values) of hash at key.
- 
Method Details- 
hSetdefault reactor.core.publisher.Mono<Boolean> hSet(ByteBuffer key, ByteBuffer field, ByteBuffer value) Set the value of a hash field.- Parameters:
- key- must not be null.
- field- must not be null.
- value- must not be null.
- Returns:
- See Also:
 
- 
hSetNXdefault reactor.core.publisher.Mono<Boolean> hSetNX(ByteBuffer key, ByteBuffer field, ByteBuffer value) Set the value of a hash field.- Parameters:
- key- must not be null.
- field- must not be null.
- value- must not be null.
- Returns:
- See Also:
 
- 
hMSetdefault reactor.core.publisher.Mono<Boolean> hMSet(ByteBuffer key, Map<ByteBuffer, ByteBuffer> fieldValueMap) Set multiple hash fields to multiple values using data provided in fieldValueMap.- Parameters:
- key- must not be null.
- fieldValueMap- must not be null.
- Returns:
- See Also:
 
- 
hSetreactor.core.publisher.Flux<ReactiveRedisConnection.BooleanResponse<ReactiveHashCommands.HSetCommand>> hSet(org.reactivestreams.Publisher<ReactiveHashCommands.HSetCommand> commands) Set the value of a hash field.- Parameters:
- commands- must not be null.
- Returns:
- See Also:
 
- 
hGetGet value for given field from hash at key.- Parameters:
- key- must not be null.
- field- must not be null.
- Returns:
- See Also:
 
- 
hMGetdefault reactor.core.publisher.Mono<List<ByteBuffer>> hMGet(ByteBuffer key, Collection<ByteBuffer> fields) Get values for given fields from hash at key. Values are in the order of the requested keys. Absent field values are represented using null in the resultingList.- Parameters:
- key- must not be null.
- fields- must not be null.
- Returns:
- See Also:
 
- 
hMGetreactor.core.publisher.Flux<ReactiveRedisConnection.MultiValueResponse<ReactiveHashCommands.HGetCommand,ByteBuffer>> hMGet(org.reactivestreams.Publisher<ReactiveHashCommands.HGetCommand> commands) Get values for given fields from hash at key. Values are in the order of the requested keys. Absent field values are represented using null in the resultingList.- Parameters:
- commands- must not be null.
- Returns:
- See Also:
 
- 
hExistsDetermine if given hash field exists.- Parameters:
- key- must not be null.
- field- must not be null.
- Returns:
- See Also:
 
- 
hExistsreactor.core.publisher.Flux<ReactiveRedisConnection.BooleanResponse<ReactiveHashCommands.HExistsCommand>> hExists(org.reactivestreams.Publisher<ReactiveHashCommands.HExistsCommand> commands) Determine if given hash field exists.- Parameters:
- commands-
- Returns:
- See Also:
 
- 
hDelDelete given hash field.- Parameters:
- key- must not be null.
- field- must not be null.
- Returns:
- See Also:
 
- 
hDelDelete given hash fields.- Parameters:
- key- must not be null.
- fields- must not be null.
- Returns:
- See Also:
 
- 
hDelreactor.core.publisher.Flux<ReactiveRedisConnection.NumericResponse<ReactiveHashCommands.HDelCommand,Long>> hDel(org.reactivestreams.Publisher<ReactiveHashCommands.HDelCommand> commands) Delete given hash fields.- Parameters:
- commands- must not be null.
- Returns:
- See Also:
 
- 
hLenGet size of hash at key.- Parameters:
- key- must not be null.
- Returns:
- See Also:
 
- 
hLenreactor.core.publisher.Flux<ReactiveRedisConnection.NumericResponse<ReactiveRedisConnection.KeyCommand,Long>> hLen(org.reactivestreams.Publisher<ReactiveRedisConnection.KeyCommand> commands) Get size of hash at key.- Parameters:
- commands- must not be null.
- Returns:
- See Also:
 
- 
hRandFieldReturn a random field from the hash stored atkey.- Parameters:
- key- must not be null.
- Returns:
- Since:
- 2.6
- See Also:
 
- 
hRandFieldWithValuesdefault reactor.core.publisher.Mono<Map.Entry<ByteBuffer,ByteBuffer>> hRandFieldWithValues(ByteBuffer key) Return a random field from the hash along with its value stored atkey.- Parameters:
- key- must not be null.
- Returns:
- Since:
- 2.6
- See Also:
 
- 
hRandFieldReturn a random field from the hash stored atkey. If the providedcountargument is positive, return a list of distinct fields, capped either atcountor the hash size. Ifcountis negative, the behavior changes and the command is allowed to return the same field multiple times. In this case, the number of returned fields is the absolute value of the specified count.- Parameters:
- key- must not be null.
- count- number of fields to return.
- Returns:
- Since:
- 2.6
- See Also:
 
- 
hRandFieldWithValuesdefault reactor.core.publisher.Flux<Map.Entry<ByteBuffer,ByteBuffer>> hRandFieldWithValues(ByteBuffer key, long count) Return a random field from the hash along with its value stored atkey. If the providedcountargument is positive, return a list of distinct fields, capped either atcountor the hash size. Ifcountis negative, the behavior changes and the command is allowed to return the same field multiple times. In this case, the number of returned fields is the absolute value of the specified count.- Parameters:
- key- must not be null.
- count- number of fields to return.
- Returns:
- null if key does not exist or when used in pipeline / transaction.
- Since:
- 2.6
- See Also:
 
- 
hRandFieldreactor.core.publisher.Flux<ReactiveRedisConnection.CommandResponse<ReactiveHashCommands.HRandFieldCommand,reactor.core.publisher.Flux<ByteBuffer>>> hRandField(org.reactivestreams.Publisher<ReactiveHashCommands.HRandFieldCommand> commands) Get random fields of hash at key.- Parameters:
- commands- must not be null.
- Returns:
- Since:
- 2.6
- See Also:
 
- 
hRandFieldWithValuesreactor.core.publisher.Flux<ReactiveRedisConnection.CommandResponse<ReactiveHashCommands.HRandFieldCommand,reactor.core.publisher.Flux<Map.Entry<ByteBuffer, hRandFieldWithValuesByteBuffer>>>> (org.reactivestreams.Publisher<ReactiveHashCommands.HRandFieldCommand> commands) Get random fields along their values of hash at key.- Parameters:
- commands- must not be null.
- Returns:
- Since:
- 2.6
- See Also:
 
- 
hKeysGet key set (fields) of hash at key.- Parameters:
- key- must not be null.
- Returns:
- See Also:
 
- 
hKeysreactor.core.publisher.Flux<ReactiveRedisConnection.CommandResponse<ReactiveRedisConnection.KeyCommand,reactor.core.publisher.Flux<ByteBuffer>>> hKeys(org.reactivestreams.Publisher<ReactiveRedisConnection.KeyCommand> commands) Get key set (fields) of hash at key.- Parameters:
- commands- must not be null.
- Returns:
- See Also:
 
- 
hValsGet entry set (values) of hash at key.- Parameters:
- key- must not be null.
- Returns:
- See Also:
 
- 
hValsreactor.core.publisher.Flux<ReactiveRedisConnection.CommandResponse<ReactiveRedisConnection.KeyCommand,reactor.core.publisher.Flux<ByteBuffer>>> hVals(org.reactivestreams.Publisher<ReactiveRedisConnection.KeyCommand> commands) Get entry set (values) of hash at key.- Parameters:
- commands- must not be null.
- Returns:
- See Also:
 
- 
hGetAllGet entire hash stored at key.- Parameters:
- key- must not be null.
- Returns:
- See Also:
 
- 
hGetAllreactor.core.publisher.Flux<ReactiveRedisConnection.CommandResponse<ReactiveRedisConnection.KeyCommand,reactor.core.publisher.Flux<Map.Entry<ByteBuffer, hGetAllByteBuffer>>>> (org.reactivestreams.Publisher<ReactiveRedisConnection.KeyCommand> commands) Get entire hash stored at key.- Parameters:
- commands- must not be null.
- Returns:
- See Also:
 
- 
hScanUse aFluxto iterate over entries in the hash atkey. The resultingFluxacts as a cursor and issuesHSCANcommands itself as long as the subscriber signals demand.- Parameters:
- key- must not be null.
- Returns:
- the Fluxemittingentriesone by one.
- Throws:
- IllegalArgumentException- in case the given key is null.
- Since:
- 2.1
- See Also:
 
- 
hScandefault reactor.core.publisher.Flux<Map.Entry<ByteBuffer,ByteBuffer>> hScan(ByteBuffer key, ScanOptions options) Use aFluxto iterate over entries in the hash atkeygivenScanOptions. The resultingFluxacts as a cursor and issuesHSCANcommands itself as long as the subscriber signals demand.- Parameters:
- key- must not be null.
- options- must not be null. Use- ScanOptions.NONEinstead.
- Returns:
- the Fluxemitting the rawentriesone by one.
- Throws:
- IllegalArgumentException- in case one of the required arguments is null.
- Since:
- 2.1
- See Also:
 
- 
hScanreactor.core.publisher.Flux<ReactiveRedisConnection.CommandResponse<ReactiveRedisConnection.KeyCommand,reactor.core.publisher.Flux<Map.Entry<ByteBuffer, hScanByteBuffer>>>> (org.reactivestreams.Publisher<ReactiveRedisConnection.KeyScanCommand> commands) Use aFluxto iterate over entries in the hash atkey. The resultingFluxacts as a cursor and issuesHSCANcommands itself as long as the subscriber signals demand.- Parameters:
- commands- must not be null.
- Returns:
- the FluxemittingReactiveRedisConnection.CommandResponseone by one.
- Since:
- 2.1
- See Also:
 
- 
hStrLenGet the length of the value associated withfield. If either thekeyor thefielddo not exist,0is emitted.- Parameters:
- key- must not be null.
- field- must not be null.
- Returns:
- never null.
- Since:
- 2.1
 
- 
hStrLenreactor.core.publisher.Flux<ReactiveRedisConnection.NumericResponse<ReactiveHashCommands.HStrLenCommand,Long>> hStrLen(org.reactivestreams.Publisher<ReactiveHashCommands.HStrLenCommand> commands) Get the length of the value associated withfield. If either thekeyor thefielddo not exist,0is emitted.- Parameters:
- commands- must not be null.
- Returns:
- never null.
- Since:
- 2.1
 
 
-