Class BlockingHashCommandsImpl<K,F,V>
java.lang.Object
io.quarkus.redis.runtime.datasource.AbstractRedisCommandGroup
io.quarkus.redis.runtime.datasource.BlockingHashCommandsImpl<K,F,V>
- All Implemented Interfaces:
HashCommands<K,,F, V> RedisCommands
public class BlockingHashCommandsImpl<K,F,V>
extends AbstractRedisCommandGroup
implements HashCommands<K,F,V>
-
Field Summary
Fields inherited from class io.quarkus.redis.runtime.datasource.AbstractRedisCommandGroup
ds, timeout -
Constructor Summary
ConstructorsConstructorDescriptionBlockingHashCommandsImpl(RedisDataSource ds, ReactiveHashCommands<K, F, V> reactive, Duration timeout) -
Method Summary
Modifier and TypeMethodDescriptionintExecute the command HDEL.booleanExecute the command HEXISTS.Execute the command HGET.Execute the command HGETALL.longExecute the command HINCRBY.doublehincrbyfloat(K key, F field, double amount) Execute the command HINCRBYFLOAT.Execute the command HKEYS.longExecute the command HLEN.Execute the command HMGET.voidExecute the command HMSET.hrandfield(K key) Execute the command HRANDFIELD.hrandfield(K key, long count) Execute the command HRANDFIELD.hrandfieldWithValues(K key, long count) Execute the command HRANDFIELD.Execute the command HSCAN.Execute the command HSCAN.booleanExecute the command HSET.longExecute the command HSET.booleanExecute the command HSETNX.longExecute the command HSTRLEN.Execute the command HVALS.Methods inherited from class io.quarkus.redis.runtime.datasource.AbstractRedisCommandGroup
getDataSourceMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.quarkus.redis.datasource.RedisCommands
getDataSource
-
Constructor Details
-
BlockingHashCommandsImpl
public BlockingHashCommandsImpl(RedisDataSource ds, ReactiveHashCommands<K, F, V> reactive, Duration timeout)
-
-
Method Details
-
hdel
Description copied from interface:HashCommandsExecute the command HDEL. Summary: Delete one or more hash fields Group: hash Requires Redis 2.0.0- Specified by:
hdelin interfaceHashCommands<K,F, V> - Parameters:
key- the key- Returns:
- the number of fields that were removed from the hash, not including specified but non-existing fields.
-
hexists
Description copied from interface:HashCommandsExecute the command HEXISTS. Summary: Determine if a hash field exists Group: hash Requires Redis 2.0.0- Specified by:
hexistsin interfaceHashCommands<K,F, V> - Parameters:
key- the keyfield- the value- Returns:
truethe hash contains field.falsethe hash does not contain field, or the key does not exist.
-
hget
Description copied from interface:HashCommandsExecute the command HGET. Summary: Get the value of a hash field Group: hash Requires Redis 2.0.0- Specified by:
hgetin interfaceHashCommands<K,F, V> - Parameters:
key- the keyfield- the value- Returns:
- the value associated with
field, ornullwhenfieldis not present in the hash or the key does not exist.
-
hincrby
Description copied from interface:HashCommandsExecute the command HINCRBY. Summary: Increment the integer value of a hash field by the given number Group: hash Requires Redis 2.0.0- Specified by:
hincrbyin interfaceHashCommands<K,F, V> - Parameters:
key- the keyfield- the value- Returns:
- the value at field after the increment operation.
-
hincrbyfloat
Description copied from interface:HashCommandsExecute the command HINCRBYFLOAT. Summary: Increment the float value of a hash field by the given amount Group: hash Requires Redis 2.6.0- Specified by:
hincrbyfloatin interfaceHashCommands<K,F, V> - Parameters:
key- the keyfield- the value- Returns:
- the value of field after the increment.
-
hgetall
Description copied from interface:HashCommandsExecute the command HGETALL. Summary: Get all the fields and values in a hash Group: hash Requires Redis 2.0.0- Specified by:
hgetallin interfaceHashCommands<K,F, V> - Parameters:
key- the key- Returns:
- the map fields -> values stored in the hash, or an empty map when
keydoes not exist.
-
hkeys
Description copied from interface:HashCommandsExecute the command HKEYS. Summary: Get all the fields in a hash Group: hash Requires Redis 2.0.0- Specified by:
hkeysin interfaceHashCommands<K,F, V> - Parameters:
key- the key- Returns:
- list of fields in the hash, or an empty list when key does not exist.
-
hlen
Description copied from interface:HashCommandsExecute the command HLEN. Summary: Get the number of fields in a hash Group: hash Requires Redis 2.0.0- Specified by:
hlenin interfaceHashCommands<K,F, V> - Parameters:
key- the key- Returns:
- number of fields in the hash, or 0 when key does not exist.
-
hmget
Description copied from interface:HashCommandsExecute the command HMGET. Summary: Get the values of all the given hash fields Group: hash Requires Redis 2.0.0- Specified by:
hmgetin interfaceHashCommands<K,F, V> - Parameters:
key- the keyfields- the fields- Returns:
- list of values associated with the given fields, in the same order as they are requested.
If a requested field does not exist, the returned map contains a
nullvalue for that field.
-
hmset
Description copied from interface:HashCommandsExecute the command HMSET. Summary: Set multiple hash fields to multiple values Group: hash Requires Redis 2.0.0- Specified by:
hmsetin interfaceHashCommands<K,F, V> - Parameters:
key- the keymap- the key/value map to set
-
hrandfield
Description copied from interface:HashCommandsExecute the command HRANDFIELD. Summary: Get one or multiple random fields from a hash Group: hash Requires Redis 6.2.0- Specified by:
hrandfieldin interfaceHashCommands<K,F, V> - Parameters:
key- the key- Returns:
- a random key from the hash,
nullif the key does not exist
-
hrandfield
Description copied from interface:HashCommandsExecute the command HRANDFIELD. Summary: Get one or multiple random fields from a hash Group: hash Requires Redis 6.2.0- Specified by:
hrandfieldin interfaceHashCommands<K,F, V> - Parameters:
key- the keycount- the number of random key to retrieve. Ifcountis positive, the selected keys are distinct. Ifcountis negative, the produced list can contain duplicated keys.- Returns:
- the list of keys, empty if the key does not exist
-
hrandfieldWithValues
Description copied from interface:HashCommandsExecute the command HRANDFIELD. Summary: Get one or multiple random fields and their associated values from a hash Group: hash Requires Redis 6.2.0- Specified by:
hrandfieldWithValuesin interfaceHashCommands<K,F, V> - Parameters:
key- the keycount- the number of random key to retrieve. Ifcountis positive, the selected keys are distinct. Ifcountis negative, the produced list can contain duplicated keys. These duplicates are not included in the producedMap.- Returns:
- the map containing the random keys and the associated values,
emptyif the key does not exist
-
hscan
Description copied from interface:HashCommandsExecute the command HSCAN. Summary: Incrementally iterate hash fields and associated values Group: hash Requires Redis 2.8.0- Specified by:
hscanin interfaceHashCommands<K,F, V> - Parameters:
key- the key- Returns:
- the cursor.
-
hscan
Description copied from interface:HashCommandsExecute the command HSCAN. Summary: Incrementally iterate hash fields and associated values Group: hash Requires Redis 2.8.0- Specified by:
hscanin interfaceHashCommands<K,F, V> - Parameters:
key- the keyscanArgs- the additional argument- Returns:
- the cursor
-
hset
Description copied from interface:HashCommandsExecute the command HSET. Summary: Set the string value of a hash field Group: hash Requires Redis 2.0.0- Specified by:
hsetin interfaceHashCommands<K,F, V> - Parameters:
key- the keyfield- the fieldvalue- the value- Returns:
trueif the value was set
-
hset
Description copied from interface:HashCommandsExecute the command HSET. Summary: Set the string value of a hash field Group: hash Requires Redis 2.0.0- Specified by:
hsetin interfaceHashCommands<K,F, V> - Parameters:
key- the keymap- the set of key -> value to add to the hash- Returns:
- the number of fields that were added.
-
hsetnx
Description copied from interface:HashCommandsExecute the command HSETNX. Summary: Set the value of a hash field, only if the field does not exist Group: hash Requires Redis 2.0.0- Specified by:
hsetnxin interfaceHashCommands<K,F, V> - Parameters:
key- the keyfield- the valuevalue- the value- Returns:
truefield is a new field in the hash and value was set.falsefield already exists in the hash and no operation was performed.
-
hstrlen
Description copied from interface:HashCommandsExecute the command HSTRLEN. Summary: Get the length of the value of a hash field Group: hash Requires Redis 3.2.0- Specified by:
hstrlenin interfaceHashCommands<K,F, V> - Parameters:
key- the keyfield- the value- Returns:
- the string length of the value associated with
field, or zero whenfieldis not present in the hash or key does not exist at all.
-
hvals
Description copied from interface:HashCommandsExecute the command HVALS. Summary: Get all the values in a hash Group: hash Requires Redis 2.0.0- Specified by:
hvalsin interfaceHashCommands<K,F, V> - Parameters:
key- the key- Returns:
- list of values in the hash, or an empty list when key does not exist.
-