Package io.lettuce.core.api.sync
Interface RedisTransactionalCommands<K,V>
-
- Type Parameters:
K
- Key type.V
- Value type.
- All Known Subinterfaces:
RedisClusterPubSubCommands<K,V>
,RedisCommands<K,V>
,RedisPubSubCommands<K,V>
public interface RedisTransactionalCommands<K,V>
Synchronous executed commands for Transactions.- Since:
- 4.0
- Author:
- Mark Paluch
- Generated class:
- by io.lettuce.apigenerator.CreateSyncApi
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
discard()
Discard all commands issued after MULTI.TransactionResult
exec()
Execute all commands issued after MULTI.String
multi()
Mark the start of a transaction block.String
unwatch()
Forget about all watched keys.String
watch(K... keys)
Watch the given keys to determine execution of the MULTI/EXEC block.
-
-
-
Method Detail
-
discard
String discard()
Discard all commands issued after MULTI.- Returns:
- String simple-string-reply always
OK
.
-
exec
TransactionResult exec()
Execute all commands issued after MULTI.- Returns:
- List<Object> array-reply each element being the reply to each of the commands in the atomic transaction.
When using
WATCH
,EXEC
can return adiscarded TransactionResult
. - See Also:
TransactionResult.wasDiscarded()
-
multi
String multi()
Mark the start of a transaction block.- Returns:
- String simple-string-reply always
OK
.
-
watch
String watch(K... keys)
Watch the given keys to determine execution of the MULTI/EXEC block.- Parameters:
keys
- the key.- Returns:
- String simple-string-reply always
OK
.
-
unwatch
String unwatch()
Forget about all watched keys.- Returns:
- String simple-string-reply always
OK
.
-
-