com.hazelcast.transaction.impl.xa
Class XATransactionContextImpl

java.lang.Object
  extended by com.hazelcast.transaction.impl.xa.XATransactionContextImpl
All Implemented Interfaces:
TransactionalTaskContext, TransactionContext

public class XATransactionContextImpl
extends Object
implements TransactionContext


Constructor Summary
XATransactionContextImpl(NodeEngineImpl nodeEngine, Xid xid, String txOwnerUuid, int timeout)
           
 
Method Summary
 void beginTransaction()
          Begins a transaction.
 void commitTransaction()
          Commits a transaction.
<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.
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XATransactionContextImpl

public XATransactionContextImpl(NodeEngineImpl nodeEngine,
                                Xid xid,
                                String txOwnerUuid,
                                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.

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 TransactionalObject 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

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.