Class BlockingStringCommandsImpl<K,V>
java.lang.Object
io.quarkus.redis.runtime.datasource.AbstractRedisCommandGroup
io.quarkus.redis.runtime.datasource.BlockingStringCommandsImpl<K,V>
- All Implemented Interfaces:
RedisCommands
,StringCommands<K,
,V> ValueCommands<K,
V>
public class BlockingStringCommandsImpl<K,V>
extends AbstractRedisCommandGroup
implements StringCommands<K,V>, ValueCommands<K,V>
-
Field Summary
Fields inherited from class io.quarkus.redis.runtime.datasource.AbstractRedisCommandGroup
ds, timeout
-
Constructor Summary
ConstructorDescriptionBlockingStringCommandsImpl
(RedisDataSource ds, ReactiveValueCommands<K, V> reactive, Duration timeout) -
Method Summary
Modifier and TypeMethodDescriptionlong
Execute the command APPEND.long
Execute the command DECR.long
Execute the command DECRBY.Execute the command GET.Execute the command GETDEL.Execute the command GETEX.Execute the command GETEX.Execute the command GETRANGE.Execute the command GETSET.long
Execute the command INCR.long
Execute the command INCRBY.double
incrbyfloat
(K key, double amount) Execute the command INCRBYFLOAT.Execute the command LCS.long
Execute the command LCS.Execute the command MGET.void
Execute the command MSET.boolean
Execute the command MSETNX.void
Execute the command PSETEX.void
Execute the command SET.void
Execute the command SET.void
Execute the command SET.void
Execute the command SETEX.Execute the command SET.Execute the command SET.Execute the command SET.boolean
Execute the command SETNX.long
Execute the command SETRANGE.long
Execute the command STRLEN.Methods inherited from class io.quarkus.redis.runtime.datasource.AbstractRedisCommandGroup
getDataSource
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.quarkus.redis.datasource.RedisCommands
getDataSource
-
Constructor Details
-
BlockingStringCommandsImpl
public BlockingStringCommandsImpl(RedisDataSource ds, ReactiveValueCommands<K, V> reactive, Duration timeout)
-
-
Method Details
-
append
Description copied from interface:StringCommands
Execute the command APPEND. Summary: Append a value to a key Group: string Requires Redis 2.0.0- Specified by:
append
in interfaceStringCommands<K,
V> - Specified by:
append
in interfaceValueCommands<K,
V> - Parameters:
key
- the keyvalue
- the value- Returns:
- the length of the string after the append operation.
-
decr
Description copied from interface:StringCommands
Execute the command DECR. Summary: Decrement the integer value of a key by one Group: string Requires Redis 1.0.0- Specified by:
decr
in interfaceStringCommands<K,
V> - Specified by:
decr
in interfaceValueCommands<K,
V> - Parameters:
key
- the key- Returns:
- the value of key after the decrement
-
decrby
Description copied from interface:StringCommands
Execute the command DECRBY. Summary: Decrement the integer value of a key by the given number Group: string Requires Redis 1.0.0- Specified by:
decrby
in interfaceStringCommands<K,
V> - Specified by:
decrby
in interfaceValueCommands<K,
V> - Parameters:
key
- the keyamount
- the amount, can be negative- Returns:
- the value of key after the decrement
-
get
Description copied from interface:StringCommands
Execute the command GET. Summary: Get the value of a key Group: string Requires Redis 1.0.0- Specified by:
get
in interfaceStringCommands<K,
V> - Specified by:
get
in interfaceValueCommands<K,
V> - Parameters:
key
- the key- Returns:
- the value of key, or
null
when key does not exist.
-
getdel
Description copied from interface:StringCommands
Execute the command GETDEL. Summary: Get the value of a key and delete the key Group: string Requires Redis 6.2.0- Specified by:
getdel
in interfaceStringCommands<K,
V> - Specified by:
getdel
in interfaceValueCommands<K,
V> - Parameters:
key
- the key- Returns:
- the value of key,
null
when key does not exist, or an error if the key's value type isn't a string.
-
getex
Description copied from interface:StringCommands
Execute the command GETEX. Summary: Get the value of a key and optionally set its expiration Group: string Requires Redis 6.2.0- Specified by:
getex
in interfaceStringCommands<K,
V> - Parameters:
key
- the keyargs
- the getex command extra-arguments- Returns:
- the value of key, or
null
when key does not exist.
-
getex
Description copied from interface:ValueCommands
Execute the command GETEX. Summary: Get the value of a key and optionally set its expiration Group: string Requires Redis 6.2.0- Specified by:
getex
in interfaceValueCommands<K,
V> - Parameters:
key
- the keyargs
- the getex command extra-arguments- Returns:
- the value of key, or
null
when key does not exist.
-
getrange
Description copied from interface:StringCommands
Execute the command GETRANGE. Summary: Get a substring of the string stored at a key Group: string Requires Redis 2.4.0- Specified by:
getrange
in interfaceStringCommands<K,
V> - Specified by:
getrange
in interfaceValueCommands<K,
V> - Parameters:
key
- the keystart
- the start offsetend
- the end offset- Returns:
- the sub-string
-
getset
Description copied from interface:StringCommands
Execute the command GETSET. Summary: Set the string value of a key and return its old value Group: string Requires Redis 1.0.0- Specified by:
getset
in interfaceStringCommands<K,
V> - Specified by:
getset
in interfaceValueCommands<K,
V> - Parameters:
key
- the keyvalue
- the value- Returns:
- the old value stored at key, or
null
when key did not exist.
-
incr
Description copied from interface:StringCommands
Execute the command INCR. Summary: Increment the integer value of a key by one Group: string Requires Redis 1.0.0- Specified by:
incr
in interfaceStringCommands<K,
V> - Specified by:
incr
in interfaceValueCommands<K,
V> - Parameters:
key
- the key- Returns:
- the value of key after the increment
-
incrby
Description copied from interface:StringCommands
Execute the command INCRBY. Summary: Increment the integer value of a key by the given amount Group: string Requires Redis 1.0.0- Specified by:
incrby
in interfaceStringCommands<K,
V> - Specified by:
incrby
in interfaceValueCommands<K,
V> - Parameters:
key
- the keyamount
- the amount, can be negative- Returns:
- the value of key after the increment
-
incrbyfloat
Description copied from interface:StringCommands
Execute the command INCRBYFLOAT. Summary: Increment the float value of a key by the given amount Group: string Requires Redis 2.6.0- Specified by:
incrbyfloat
in interfaceStringCommands<K,
V> - Specified by:
incrbyfloat
in interfaceValueCommands<K,
V> - Parameters:
key
- the keyamount
- the amount, can be negative- Returns:
- the value of key after the increment.
-
lcs
Description copied from interface:StringCommands
Execute the command LCS. Summary: Find longest common substring Group: string Requires Redis 7.0.0- Specified by:
lcs
in interfaceStringCommands<K,
V> - Specified by:
lcs
in interfaceValueCommands<K,
V> - Parameters:
key1
- the keykey2
- the key- Returns:
- the string representing the longest common substring is returned.
-
lcsLength
Description copied from interface:StringCommands
Execute the command LCS. Summary: Find longest common substring and return the length (usingLEN
) Group: string Requires Redis 7.0.0- Specified by:
lcsLength
in interfaceStringCommands<K,
V> - Specified by:
lcsLength
in interfaceValueCommands<K,
V> - Parameters:
key1
- the keykey2
- the key- Returns:
- the length of the longest common substring.
-
mget
Description copied from interface:StringCommands
Execute the command MGET. Summary: Get the values of all the given keys Group: string Requires Redis 1.0.0- Specified by:
mget
in interfaceStringCommands<K,
V> - Specified by:
mget
in interfaceValueCommands<K,
V> - Parameters:
keys
- the keys- Returns:
- list of values at the specified keys. If one of the passed key does not exist, the returned map contains
a
null
value associated with the missing key.
-
mset
Description copied from interface:StringCommands
Execute the command MSET. Summary: Set multiple keys to multiple values Group: string Requires Redis 1.0.1- Specified by:
mset
in interfaceStringCommands<K,
V> - Specified by:
mset
in interfaceValueCommands<K,
V> - Parameters:
map
- the key/value map containing the items to store
-
msetnx
Description copied from interface:StringCommands
Execute the command MSETNX. Summary: Set multiple keys to multiple values, only if none of the keys exist Group: string Requires Redis 1.0.1- Specified by:
msetnx
in interfaceStringCommands<K,
V> - Specified by:
msetnx
in interfaceValueCommands<K,
V> - Parameters:
map
- the key/value map containing the items to store- Returns:
true
the all the keys were set.false
no key was set (at least one key already existed).
-
set
Description copied from interface:StringCommands
Execute the command SET. Summary: Set the string value of a key Group: string Requires Redis 1.0.0- Specified by:
set
in interfaceStringCommands<K,
V> - Specified by:
set
in interfaceValueCommands<K,
V> - Parameters:
key
- the keyvalue
- the value
-
set
Description copied from interface:StringCommands
Execute the command SET. Summary: Set the string value of a key Group: string Requires Redis 1.0.0- Specified by:
set
in interfaceStringCommands<K,
V> - Parameters:
key
- the keyvalue
- the valuesetArgs
- the set command extra-arguments
-
set
Description copied from interface:ValueCommands
Execute the command SET. Summary: Set the string value of a key Group: string Requires Redis 1.0.0- Specified by:
set
in interfaceValueCommands<K,
V> - Parameters:
key
- the keyvalue
- the valuesetArgs
- the set command extra-arguments
-
setGet
Description copied from interface:StringCommands
Execute the command SET. Summary: Set the string value of a key, and return the previous value Group: string Requires Redis 1.0.0- Specified by:
setGet
in interfaceStringCommands<K,
V> - Specified by:
setGet
in interfaceValueCommands<K,
V> - Parameters:
key
- the keyvalue
- the value- Returns:
- the old value,
null
if not present
-
setGet
Description copied from interface:StringCommands
Execute the command SET. Summary: Set the string value of a key, and return the previous value Group: string Requires Redis 1.0.0- Specified by:
setGet
in interfaceStringCommands<K,
V> - Parameters:
key
- the keyvalue
- the valuesetArgs
- the set command extra-arguments- Returns:
- the old value,
null
if not present
-
setGet
Description copied from interface:ValueCommands
Execute the command SET. Summary: Set the string value of a key, and return the previous value Group: string Requires Redis 1.0.0- Specified by:
setGet
in interfaceValueCommands<K,
V> - Parameters:
key
- the keyvalue
- the valuesetArgs
- the set command extra-arguments- Returns:
- the old value,
null
if not present
-
setex
Description copied from interface:StringCommands
Execute the command SETEX. Summary: Set the value and expiration of a key Group: string Requires Redis 2.0.0- Specified by:
setex
in interfaceStringCommands<K,
V> - Specified by:
setex
in interfaceValueCommands<K,
V> - Parameters:
key
- the keyvalue
- the value
-
psetex
Description copied from interface:StringCommands
Execute the command PSETEX. Summary: Set the value and expiration in milliseconds of a key Group: string Requires Redis 2.6.0- Specified by:
psetex
in interfaceStringCommands<K,
V> - Specified by:
psetex
in interfaceValueCommands<K,
V> - Parameters:
key
- the keymilliseconds
- the duration in msvalue
- the value
-
setnx
Description copied from interface:StringCommands
Execute the command SETNX. Summary: Set the value of a key, only if the key does not exist Group: string Requires Redis 1.0.0- Specified by:
setnx
in interfaceStringCommands<K,
V> - Specified by:
setnx
in interfaceValueCommands<K,
V> - Parameters:
key
- the keyvalue
- the value- Returns:
true
the key was setfalse
the key was not set
-
setrange
Description copied from interface:StringCommands
Execute the command SETRANGE. Summary: Overwrite part of a string at key starting at the specified offset Group: string Requires Redis 2.2.0- Specified by:
setrange
in interfaceStringCommands<K,
V> - Specified by:
setrange
in interfaceValueCommands<K,
V> - Parameters:
key
- the keyvalue
- the value- Returns:
- the length of the string after it was modified by the command.
-
strlen
Description copied from interface:StringCommands
Execute the command STRLEN. Summary: Get the length of the value stored in a key Group: string Requires Redis 2.2.0- Specified by:
strlen
in interfaceStringCommands<K,
V> - Specified by:
strlen
in interfaceValueCommands<K,
V> - Parameters:
key
- the key- Returns:
- the length of the string at key, or 0 when key does not exist.
-