Interface TransactionalStringCommands<K,V>
-
- All Known Implementing Classes:
BlockingTransactionalStringCommandsImpl
public interface TransactionalStringCommands<K,V>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description void
append(K key, V value)
Execute the command APPEND.void
decr(K key)
Execute the command DECR.void
decrby(K key, long amount)
Execute the command DECRBY.void
get(K key)
Execute the command GET.void
getdel(K key)
Execute the command GETDEL.void
getex(K key, GetExArgs args)
Execute the command GETEX.void
getrange(K key, long start, long end)
Execute the command GETRANGE.void
getset(K key, V value)
Deprecated.See https://redis.io/commands/getsetvoid
incr(K key)
Execute the command INCR.void
incrby(K key, long amount)
Execute the command INCRBY.void
incrbyfloat(K key, double amount)
Execute the command INCRBYFLOAT.void
lcs(K key1, K key2)
Execute the command LCS.void
lcsLength(K key1, K key2)
Execute the command LCS.void
mget(K... keys)
Execute the command MGET.void
mset(Map<K,V> map)
Execute the command MSET.void
msetnx(Map<K,V> map)
Execute the command MSETNX.void
psetex(K key, long milliseconds, V value)
Execute the command PSETEX.void
set(K key, V value)
Execute the command SET.void
set(K key, V value, SetArgs setArgs)
Execute the command SET.void
setex(K key, long seconds, V value)
Execute the command SETEX.void
setGet(K key, V value)
Execute the command SET.void
setGet(K key, V value, SetArgs setArgs)
Execute the command SET.void
setnx(K key, V value)
Execute the command SETNX.void
setrange(K key, long offset, V value)
Execute the command SETRANGE.void
strlen(K key)
Execute the command STRLEN.
-
-
-
Method Detail
-
append
void append(K key, V value)
Execute the command APPEND. Summary: Append a value to a key Group: string Requires Redis 2.0.0- Parameters:
key
- the keyvalue
- the value
-
decr
void decr(K key)
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
-
decrby
void decrby(K key, long amount)
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
-
get
void get(K key)
Execute the command GET. Summary: Get the value of a key Group: string Requires Redis 1.0.0- Parameters:
key
- the key
-
getdel
void getdel(K key)
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
-
getex
void getex(K key, GetExArgs args)
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
-
getrange
void getrange(K key, long start, long end)
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
-
getset
void 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
-
incr
void incr(K key)
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
-
incrby
void incrby(K key, long amount)
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
-
incrbyfloat
void incrbyfloat(K key, double amount)
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
-
lcs
void lcs(K key1, K key2)
Execute the command LCS. Summary: Find longest common substring Group: string Requires Redis 7.0.0- Parameters:
key1
- the keykey2
- the key
-
lcsLength
void lcsLength(K key1, K key2)
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
-
mget
void mget(K... keys)
Execute the command MGET. Summary: Get the values of all the given keys Group: string Requires Redis 1.0.0- Parameters:
keys
- the keys
-
mset
void mset(Map<K,V> map)
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
void msetnx(Map<K,V> map)
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
-
psetex
void psetex(K key, long milliseconds, V value)
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)
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)
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
void setGet(K key, V value)
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
-
setGet
void setGet(K key, V value, SetArgs setArgs)
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
-
setex
void setex(K key, long seconds, V value)
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
void setnx(K key, V value)
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
-
setrange
void setrange(K key, long offset, V value)
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
-
-