public interface IRedisTransactionsCommands<K,V>
| Modifier and Type | Method and Description |
|---|---|
void |
discard()
Discard all commands issued after
multi(). |
List<Object> |
exec()
Executes all queued commands in a transaction started with
multi(). |
List<Object> |
exec(org.springframework.data.redis.serializer.RedisSerializer<?> valueSerializer)
Execute a transaction, using the provided
RedisSerializer to deserialize any results that are byte[]s or
Collections of byte[]s. |
void |
multi()
Mark the start of a transaction block.
|
void |
unwatch()
Flushes all the previously
watch(Object) keys. |
void |
watch(Collection<K> keys)
Watch given
keys for modifications during transaction started with multi(). |
void |
watch(K key)
Watch given
key for modifications during transaction started with multi(). |
void watch(K key)
key for modifications during transaction started with multi().key - must not be null.void watch(Collection<K> keys)
keys for modifications during transaction started with multi().keys - must not be null.void unwatch()
watch(Object) keys.void multi()
exec() or rolled back using discard()
void discard()
multi().List<Object> exec()
multi(). watch(Object) the operation will fail if any of watched keys has been modified.List<Object> exec(org.springframework.data.redis.serializer.RedisSerializer<?> valueSerializer)
RedisSerializer to deserialize any results that are byte[]s or
Collections of byte[]s. If a result is a Map, the provided RedisSerializer will be used for both the keys
and values. Other result types (Long, Boolean, etc) are left as-is in the converted results. Tuple results are
automatically converted to TypedTuples.valueSerializer - The RedisSerializer to use for deserializing the results of transaction execCopyright © 2021. All rights reserved.