Module lettuce.core
Package io.lettuce.core.api.async
Interface RedisTransactionalAsyncCommands<K,V>
- Type Parameters:
K- Key type.V- Value type.
- All Known Subinterfaces:
RedisAsyncCommands<K,V>,RedisClusterPubSubAsyncCommands<K,V>,RedisPubSubAsyncCommands<K,V>
- All Known Implementing Classes:
AbstractRedisAsyncCommands,RedisAdvancedClusterAsyncCommandsImpl,RedisAsyncCommandsImpl,RedisClusterPubSubAsyncCommandsImpl,RedisPubSubAsyncCommandsImpl
public interface RedisTransactionalAsyncCommands<K,V>
Asynchronous executed commands for Transactions.
- Since:
- 4.0
- Author:
- Mark Paluch
- Generated class:
- by io.lettuce.apigenerator.CreateAsyncApi
-
Method Summary
Modifier and Type Method Description RedisFuture<String>discard()Discard all commands issued after MULTI.RedisFuture<TransactionResult>exec()Execute all commands issued after MULTI.RedisFuture<String>multi()Mark the start of a transaction block.RedisFuture<String>unwatch()Forget about all watched keys.RedisFuture<String>watch(K... keys)Watch the given keys to determine execution of the MULTI/EXEC block.
-
Method Details
-
discard
RedisFuture<String> discard()Discard all commands issued after MULTI.- Returns:
- String simple-string-reply always
OK.
-
exec
RedisFuture<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,EXECcan return adiscarded TransactionResult. - See Also:
TransactionResult.wasDiscarded()
-
multi
RedisFuture<String> multi()Mark the start of a transaction block.- Returns:
- String simple-string-reply always
OK.
-
watch
Watch the given keys to determine execution of the MULTI/EXEC block.- Parameters:
keys- the key.- Returns:
- String simple-string-reply always
OK.
-
unwatch
RedisFuture<String> unwatch()Forget about all watched keys.- Returns:
- String simple-string-reply always
OK.
-