org.springframework.datastore.redis
Class RedisTransaction

java.lang.Object
  extended by org.springframework.datastore.redis.RedisTransaction
All Implemented Interfaces:
Transaction<RedisTemplate>

public class RedisTransaction
extends Object
implements Transaction<RedisTemplate>

Represents a Redis transaction

Since:
1.0

Constructor Summary
RedisTransaction(RedisTemplate redisTemplate)
           
 
Method Summary
 void commit()
          Commit the transaction.
 RedisTemplate getNativeTransaction()
           
 boolean isActive()
          Whether the transaction is active
 void rollback()
          Rollback the transaction.
 void setTimeout(int timeout)
          Sets the transaction timeout period
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RedisTransaction

public RedisTransaction(RedisTemplate redisTemplate)
Method Detail

commit

public void commit()
Description copied from interface: Transaction
Commit the transaction.

Specified by:
commit in interface Transaction<RedisTemplate>

isActive

public boolean isActive()
Description copied from interface: Transaction
Whether the transaction is active

Specified by:
isActive in interface Transaction<RedisTemplate>
Returns:
True if it is

setTimeout

public void setTimeout(int timeout)
Description copied from interface: Transaction
Sets the transaction timeout period

Specified by:
setTimeout in interface Transaction<RedisTemplate>
Parameters:
timeout - The timeout

rollback

public void rollback()
Description copied from interface: Transaction
Rollback the transaction.

Specified by:
rollback in interface Transaction<RedisTemplate>

getNativeTransaction

public RedisTemplate getNativeTransaction()
Specified by:
getNativeTransaction in interface Transaction<RedisTemplate>
Returns:
the native transaction object.