public class XATransactionContextProxy extends Object implements ClientTransactionContext
TransactionalMap.
Provides client instance and client connection proxies that need to be accessed for sending invocations.
XA implementation of ClientTransactionContext| Constructor and Description |
|---|
XATransactionContextProxy(com.hazelcast.client.spi.impl.ClientTransactionManagerServiceImpl transactionManager,
Xid xid,
int timeout) |
| Modifier and Type | Method and Description |
|---|---|
void |
beginTransaction()
Begins a transaction.
|
void |
commitTransaction()
Commits a transaction.
|
com.hazelcast.client.impl.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.
|
XATransactionProxy |
getTransaction() |
<T extends TransactionalObject> |
getTransactionalObject(String serviceName,
String name)
Returns the transactional object instance with the specified name and service name.
|
String |
getTxnId()
Gets the ID that uniquely identifies the transaction.
|
XAResource |
getXaResource()
Gets xaResource which will participate in XATransaction.
|
void |
rollbackTransaction()
Rollback of the current transaction.
|
public XATransactionContextProxy(com.hazelcast.client.spi.impl.ClientTransactionManagerServiceImpl transactionManager,
Xid xid,
int timeout)
public 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 String getTxnId()
TransactionContextgetTxnId in interface TransactionContextpublic com.hazelcast.client.impl.HazelcastClientInstanceImpl getClient()
getClient in interface ClientTransactionContextpublic ClientConnection getConnection()
getConnection in interface ClientTransactionContextpublic <K,V> TransactionalMap<K,V> getMap(String name)
TransactionalTaskContextgetMap in interface TransactionalTaskContextname - name of the distributed transactional mappublic <E> TransactionalQueue<E> getQueue(String name)
TransactionalTaskContextgetQueue in interface TransactionalTaskContextname - name of the transactional queuepublic <K,V> TransactionalMultiMap<K,V> getMultiMap(String name)
TransactionalTaskContextgetMultiMap in interface TransactionalTaskContextname - name of the transactional multimappublic <E> TransactionalList<E> getList(String name)
TransactionalTaskContextgetList in interface TransactionalTaskContextname - name of the transactional listpublic <E> TransactionalSet<E> getSet(String name)
TransactionalTaskContextgetSet in interface TransactionalTaskContextname - name of the transactional setpublic <T extends TransactionalObject> T getTransactionalObject(String serviceName, String name)
TransactionalTaskContextgetTransactionalObject in interface TransactionalTaskContextserviceName - service name for the transactional object instancename - name of the transactional object instancepublic XATransactionProxy getTransaction()
public XAResource getXaResource()
TransactionContextgetXaResource in interface TransactionContextCopyright © 2018 Hazelcast, Inc.. All rights reserved.