public class TransactionContextProxy extends Object implements TransactionContext
| Constructor and Description |
|---|
TransactionContextProxy(ClientTransactionManager transactionManager,
TransactionOptions options) |
| Modifier and Type | Method and Description |
|---|---|
void |
beginTransaction()
Begins a transaction.
|
void |
commitTransaction()
Commits a transaction.
|
HazelcastClientInstanceImpl |
getClient() |
ClientConnection |
getConnection() |
<E> TransactionalList<E> |
getList(String name)
Returns the transactional list instance with the specified name.
|
<K,V> TransactionalMap<K,V> |
getMap(String name)
Returns the transactional distributed map instance with the specified name.
|
<K,V> TransactionalMultiMap<K,V> |
getMultiMap(String name)
Returns the transactional multimap instance with the specified name.
|
<E> TransactionalQueue<E> |
getQueue(String name)
Returns the transactional queue instance with the specified name.
|
<E> TransactionalSet<E> |
getSet(String name)
Returns the transactional set instance with the specified name.
|
<T extends TransactionalObject> |
getTransactionalObject(String serviceName,
String name) |
ClientTransactionManager |
getTransactionManager() |
String |
getTxnId()
Gets the id that uniquely identifies the transaction.
|
XAResource |
getXaResource()
Gets xaResource which will participate in XATransaction
|
boolean |
isXAManaged()
Indicates that related transaction is managed by XAResource
|
void |
rollbackTransaction()
Rollback of the current transaction.
|
boolean |
setTransactionTimeout(int seconds) |
public TransactionContextProxy(ClientTransactionManager transactionManager, TransactionOptions options)
public String getTxnId()
TransactionContextgetTxnId in interface TransactionContextpublic void beginTransaction()
TransactionContextbeginTransaction in interface TransactionContextpublic void commitTransaction()
throws TransactionException
TransactionContextcommitTransaction in interface TransactionContextTransactionException - if no transaction is active or the transaction could not be committed.public void rollbackTransaction()
TransactionContextrollbackTransaction in interface TransactionContextpublic <K,V> TransactionalMap<K,V> getMap(String name)
TransactionalTaskContextgetMap in interface TransactionalTaskContextname - name of the distributed mappublic <E> TransactionalQueue<E> getQueue(String name)
TransactionalTaskContextgetQueue in interface TransactionalTaskContextname - name of the queuepublic <K,V> TransactionalMultiMap<K,V> getMultiMap(String name)
TransactionalTaskContextgetMultiMap in interface TransactionalTaskContextname - name of the multimappublic <E> TransactionalList<E> getList(String name)
TransactionalTaskContextgetList in interface TransactionalTaskContextname - name of the listpublic <E> TransactionalSet<E> getSet(String name)
TransactionalTaskContextgetSet in interface TransactionalTaskContextname - name of the setpublic <T extends TransactionalObject> T getTransactionalObject(String serviceName, String name)
getTransactionalObject in interface TransactionalTaskContextpublic ClientConnection getConnection()
public HazelcastClientInstanceImpl getClient()
public ClientTransactionManager getTransactionManager()
public XAResource getXaResource()
TransactionContextgetXaResource in interface TransactionContextpublic boolean isXAManaged()
TransactionContextisXAManaged in interface TransactionContextpublic boolean setTransactionTimeout(int seconds)
Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.