org.springframework.datastore.transactions
Interface Transaction<T>

All Known Implementing Classes:
RedisTransaction

public interface Transaction<T>

Class giving the ability to start, commit and rollback a transaction.

Since:
1.0

Method Summary
 void commit()
          Commit the transaction.
 T getNativeTransaction()
           
 boolean isActive()
          Whether the transaction is active
 void rollback()
          Rollback the transaction.
 void setTimeout(int timeout)
          Sets the transaction timeout period
 

Method Detail

commit

void commit()
Commit the transaction.


rollback

void rollback()
Rollback the transaction.


getNativeTransaction

T getNativeTransaction()
Returns:
the native transaction object.

isActive

boolean isActive()
Whether the transaction is active

Returns:
True if it is

setTimeout

void setTimeout(int timeout)
Sets the transaction timeout period

Parameters:
timeout - The timeout