Interface StringCommands<K,V>
-
- Type Parameters:
K- the type of the keyV- the type of the value
- All Superinterfaces:
RedisCommands
- All Known Implementing Classes:
BlockingStringCommandsImpl
@Deprecated public interface StringCommands<K,V> extends RedisCommands
Deprecated.UseValueCommandsinstead.Allows executing commands from thestringgroup. See the string command list for further information about these commands.This group can be used with value of type
String, or a type which will be automatically serialized/deserialized with a codec.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description longappend(K key, V value)Deprecated.Execute the command APPEND.longdecr(K key)Deprecated.Execute the command DECR.longdecrby(K key, long amount)Deprecated.Execute the command DECRBY.Vget(K key)Deprecated.Execute the command GET.Vgetdel(K key)Deprecated.Execute the command GETDEL.Vgetex(K key, GetExArgs args)Deprecated.Execute the command GETEX.Stringgetrange(K key, long start, long end)Deprecated.Execute the command GETRANGE.Vgetset(K key, V value)Deprecated.See https://redis.io/commands/getsetlongincr(K key)Deprecated.Execute the command INCR.longincrby(K key, long amount)Deprecated.Execute the command INCRBY.doubleincrbyfloat(K key, double amount)Deprecated.Execute the command INCRBYFLOAT.Stringlcs(K key1, K key2)Deprecated.Execute the command LCS.longlcsLength(K key1, K key2)Deprecated.Execute the command LCS.Map<K,V>mget(K... keys)Deprecated.Execute the command MGET.voidmset(Map<K,V> map)Deprecated.Execute the command MSET.booleanmsetnx(Map<K,V> map)Deprecated.Execute the command MSETNX.voidpsetex(K key, long milliseconds, V value)Deprecated.Execute the command PSETEX.voidset(K key, V value)Deprecated.Execute the command SET.voidset(K key, V value, SetArgs setArgs)Deprecated.Execute the command SET.voidsetex(K key, long seconds, V value)Deprecated.Execute the command SETEX.VsetGet(K key, V value)Deprecated.Execute the command SET.VsetGet(K key, V value, SetArgs setArgs)Deprecated.Execute the command SET.booleansetnx(K key, V value)Deprecated.Execute the command SETNX.longsetrange(K key, long offset, V value)Deprecated.Execute the command SETRANGE.longstrlen(K key)Deprecated.Execute the command STRLEN.-
Methods inherited from interface io.quarkus.redis.datasource.RedisCommands
getDataSource
-
-
-
-
Method Detail
-
append
long append(K key, V value)
Deprecated.Execute the command APPEND. Summary: Append a value to a key Group: string Requires Redis 2.0.0- Parameters:
key- the keyvalue- the value- Returns:
- the length of the string after the append operation.
-
decr
long decr(K key)
Deprecated.Execute the command DECR. Summary: Decrement the integer value of a key by one Group: string Requires Redis 1.0.0- Parameters:
key- the key- Returns:
- the value of key after the decrement
-
decrby
long decrby(K key, long amount)
Deprecated.Execute the command DECRBY. Summary: Decrement the integer value of a key by the given number Group: string Requires Redis 1.0.0- Parameters:
key- the keyamount- the amount, can be negative- Returns:
- the value of key after the decrement
-
get
V get(K key)
Deprecated.Execute the command GET. Summary: Get the value of a key Group: string Requires Redis 1.0.0- Parameters:
key- the key- Returns:
- the value of key, or
nullwhen key does not exist.
-
getdel
V getdel(K key)
Deprecated.Execute the command GETDEL. Summary: Get the value of a key and delete the key Group: string Requires Redis 6.2.0- Parameters:
key- the key- Returns:
- the value of key,
nullwhen key does not exist, or an error if the key's value type isn't a string.
-
getex
V getex(K key, GetExArgs args)
Deprecated.Execute the command GETEX. Summary: Get the value of a key and optionally set its expiration Group: string Requires Redis 6.2.0- Parameters:
key- the keyargs- the getex command extra-arguments- Returns:
- the value of key, or
nullwhen key does not exist.
-
getrange
String getrange(K key, long start, long end)
Deprecated.Execute the command GETRANGE. Summary: Get a substring of the string stored at a key Group: string Requires Redis 2.4.0- Parameters:
key- the keystart- the start offsetend- the end offset- Returns:
- the sub-string
-
getset
V getset(K key, V value)
Deprecated.See https://redis.io/commands/getsetExecute the command GETSET. Summary: Set the string value of a key and return its old value Group: string Requires Redis 1.0.0- Parameters:
key- the keyvalue- the value- Returns:
- the old value stored at key, or
nullwhen key did not exist.
-
incr
long incr(K key)
Deprecated.Execute the command INCR. Summary: Increment the integer value of a key by one Group: string Requires Redis 1.0.0- Parameters:
key- the key- Returns:
- the value of key after the increment
-
incrby
long incrby(K key, long amount)
Deprecated.Execute the command INCRBY. Summary: Increment the integer value of a key by the given amount Group: string Requires Redis 1.0.0- Parameters:
key- the keyamount- the amount, can be negative- Returns:
- the value of key after the increment
-
incrbyfloat
double incrbyfloat(K key, double amount)
Deprecated.Execute the command INCRBYFLOAT. Summary: Increment the float value of a key by the given amount Group: string Requires Redis 2.6.0- Parameters:
key- the keyamount- the amount, can be negative- Returns:
- the value of key after the increment.
-
lcs
String lcs(K key1, K key2)
Deprecated.Execute the command LCS. Summary: Find longest common substring Group: string Requires Redis 7.0.0- Parameters:
key1- the keykey2- the key- Returns:
- the string representing the longest common substring is returned.
-
lcsLength
long lcsLength(K key1, K key2)
Deprecated.Execute the command LCS. Summary: Find longest common substring and return the length (usingLEN) Group: string Requires Redis 7.0.0- Parameters:
key1- the keykey2- the key- Returns:
- the length of the longest common substring.
-
mget
Map<K,V> mget(K... keys)
Deprecated.Execute the command MGET. Summary: Get the values of all the given keys Group: string Requires Redis 1.0.0- 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
nullvalue associated with the missing key.
-
mset
void mset(Map<K,V> map)
Deprecated.Execute the command MSET. Summary: Set multiple keys to multiple values Group: string Requires Redis 1.0.1- Parameters:
map- the key/value map containing the items to store
-
msetnx
boolean msetnx(Map<K,V> map)
Deprecated.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- Parameters:
map- the key/value map containing the items to store- Returns:
truethe all the keys were set.falseno key was set (at least one key already existed).
-
psetex
void psetex(K key, long milliseconds, V value)
Deprecated.Execute the command PSETEX. Summary: Set the value and expiration in milliseconds of a key Group: string Requires Redis 2.6.0- Parameters:
key- the keymilliseconds- the duration in msvalue- the value
-
set
void set(K key, V value)
Deprecated.Execute the command SET. Summary: Set the string value of a key Group: string Requires Redis 1.0.0- Parameters:
key- the keyvalue- the value
-
set
void set(K key, V value, SetArgs setArgs)
Deprecated.Execute the command SET. Summary: Set the string value of a key Group: string Requires Redis 1.0.0- Parameters:
key- the keyvalue- the valuesetArgs- the set command extra-arguments
-
setGet
V setGet(K key, V value)
Deprecated.Execute the command SET. Summary: Set the string value of a key, and return the previous value Group: string Requires Redis 1.0.0- Parameters:
key- the keyvalue- the value- Returns:
- the old value,
nullif not present
-
setGet
V setGet(K key, V value, SetArgs setArgs)
Deprecated.Execute the command SET. Summary: Set the string value of a key, and return the previous value Group: string Requires Redis 1.0.0- Parameters:
key- the keyvalue- the valuesetArgs- the set command extra-arguments- Returns:
- the old value,
nullif not present
-
setex
void setex(K key, long seconds, V value)
Deprecated.Execute the command SETEX. Summary: Set the value and expiration of a key Group: string Requires Redis 2.0.0- Parameters:
key- the keyvalue- the value
-
setnx
boolean setnx(K key, V value)
Deprecated.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- Parameters:
key- the keyvalue- the value- Returns:
truethe key was setfalsethe key was not set
-
setrange
long setrange(K key, long offset, V value)
Deprecated.Execute the command SETRANGE. Summary: Overwrite part of a string at key starting at the specified offset Group: string Requires Redis 2.2.0- Parameters:
key- the keyvalue- the value- Returns:
- the length of the string after it was modified by the command.
-
-