com.hazelcast.client.txn.proxy.xa
Class XATransactionContextProxy

java.lang.Object
  extended by com.hazelcast.client.txn.proxy.xa.XATransactionContextProxy
All Implemented Interfaces:
ClientTransactionContext, TransactionalTaskContext, TransactionContext

public class XATransactionContextProxy
extends Object
implements ClientTransactionContext


Constructor Summary
XATransactionContextProxy(ClientTransactionManagerServiceImpl transactionManager, Xid xid, int timeout)
           
 
Method Summary
 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.
 XATransactionProxy getTransaction()
           
<T extends TransactionalObject>
T
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XATransactionContextProxy

public XATransactionContextProxy(ClientTransactionManagerServiceImpl transactionManager,
                                 Xid xid,
                                 int timeout)
Method Detail

beginTransaction

public void beginTransaction()
Description copied from interface: TransactionContext
Begins a transaction.

Specified by:
beginTransaction in interface TransactionContext

commitTransaction

public void commitTransaction()
                       throws TransactionException
Description copied from interface: TransactionContext
Commits a transaction.

Specified by:
commitTransaction in interface TransactionContext
Throws:
TransactionException - if no transaction is active or the transaction could not be committed.

rollbackTransaction

public void rollbackTransaction()
Description copied from interface: TransactionContext
Rollback of the current transaction.

Specified by:
rollbackTransaction in interface TransactionContext

getTxnId

public String getTxnId()
Description copied from interface: TransactionContext
Gets the id that uniquely identifies the transaction.

Specified by:
getTxnId in interface TransactionContext
Returns:
the transaction id.

getClient

public HazelcastClientInstanceImpl getClient()
Specified by:
getClient in interface ClientTransactionContext

getConnection

public ClientConnection getConnection()
Specified by:
getConnection in interface ClientTransactionContext

getMap

public <K,V> TransactionalMap<K,V> getMap(String name)
Description copied from interface: TransactionalTaskContext
Returns the transactional distributed map instance with the specified name.

Specified by:
getMap in interface TransactionalTaskContext
Parameters:
name - name of the distributed transactional map
Returns:
transactional distributed map instance with the specified name

getQueue

public <E> TransactionalQueue<E> getQueue(String name)
Description copied from interface: TransactionalTaskContext
Returns the transactional queue instance with the specified name.

Specified by:
getQueue in interface TransactionalTaskContext
Parameters:
name - name of the transactional queue
Returns:
transactional queue instance with the specified name

getMultiMap

public <K,V> TransactionalMultiMap<K,V> getMultiMap(String name)
Description copied from interface: TransactionalTaskContext
Returns the transactional multimap instance with the specified name.

Specified by:
getMultiMap in interface TransactionalTaskContext
Parameters:
name - name of the transactional multimap
Returns:
transactional multimap instance with the specified name

getList

public <E> TransactionalList<E> getList(String name)
Description copied from interface: TransactionalTaskContext
Returns the transactional list instance with the specified name.

Specified by:
getList in interface TransactionalTaskContext
Parameters:
name - name of the transactional list
Returns:
transactional list instance with the specified name

getSet

public <E> TransactionalSet<E> getSet(String name)
Description copied from interface: TransactionalTaskContext
Returns the transactional set instance with the specified name.

Specified by:
getSet in interface TransactionalTaskContext
Parameters:
name - name of the transactional set
Returns:
transactional set instance with the specified name

getTransactionalObject

public <T extends TransactionalObject> T getTransactionalObject(String serviceName,
                                                                String name)
Description copied from interface: TransactionalTaskContext
Returns the transactional object instance with the specified name and service name.

Specified by:
getTransactionalObject in interface TransactionalTaskContext
Parameters:
serviceName - service name for the transactional object instance
name - name of the transactional object instance
Returns:
transactional object instance with the specified name

getTransaction

public XATransactionProxy getTransaction()

getXaResource

public XAResource getXaResource()
Description copied from interface: TransactionContext
Gets xaResource which will participate in XATransaction.

Specified by:
getXaResource in interface TransactionContext
Returns:
the xaResource.


Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.