Interface RedisTxCommands
- All Known Subinterfaces:
- DefaultedRedisClusterConnection,- DefaultedRedisConnection,- RedisClusterConnection,- RedisCommands,- RedisConnection,- RedisConnectionUtils.RedisConnectionProxy,- StringRedisConnection
- All Known Implementing Classes:
- AbstractRedisConnection,- DefaultStringRedisConnection,- JedisClusterConnection,- JedisConnection,- LettuceClusterConnection,- LettuceConnection
public interface RedisTxCommands
Transaction/Batch specific commands supported by Redis.
- Author:
- Costin Leau, Christoph Strobl, Mark Paluch
- 
Method SummaryModifier and TypeMethodDescriptionvoiddiscard()Discard all commands issued aftermulti().exec()Executes all queued commands in a transaction started withmulti().voidmulti()Mark the start of a transaction block.voidunwatch()Flushes all the previouslywatch(byte[]...)keys.voidwatch(byte[]... keys) Watch givenkeysfor modifications during transaction started withmulti().
- 
Method Details- 
multivoid multi()Mark the start of a transaction block.
 Commands will be queued and can then be executed by callingexec()or rolled back usingdiscard()- See Also:
 
- 
execExecutes all queued commands in a transaction started withmulti().
 If used along withwatch(byte[]...)the operation will fail if any of watched keys has been modified.- Returns:
- List of replies for each executed command.
- See Also:
 
- 
discardvoid discard()Discard all commands issued aftermulti().- See Also:
 
- 
watchvoid watch(byte[]... keys) Watch givenkeysfor modifications during transaction started withmulti().- Parameters:
- keys- must not be null.
- See Also:
 
- 
unwatchvoid unwatch()Flushes all the previouslywatch(byte[]...)keys.- See Also:
 
 
-