com.hazelcast.transaction.impl.xa
Class XAService

java.lang.Object
  extended by com.hazelcast.transaction.impl.xa.XAService
All Implemented Interfaces:
ManagedService, MigrationAwareService, RemoteService

public class XAService
extends Object
implements ManagedService, RemoteService, MigrationAwareService

Provides XAResource to the user via proxyService Holds all prepared state xa transactions


Field Summary
static String SERVICE_NAME
           
 
Constructor Summary
XAService(NodeEngineImpl nodeEngine)
           
 
Method Summary
 void beforeMigration(PartitionMigrationEvent event)
           
 void clearPartitionReplica(int partitionId)
           
 void commitMigration(PartitionMigrationEvent event)
           
 DistributedObject createDistributedObject(String objectName)
          Creates a distributed object.
 void destroyDistributedObject(String objectName)
          Destroys a distributed object.
 Set<SerializableXID> getXids()
           
 void init(NodeEngine nodeEngine, Properties properties)
          Initializes this ManagedService
 TransactionContext newXATransactionContext(Xid xid, int timeout)
           
 Operation prepareReplicationOperation(PartitionReplicationEvent event)
           
 void putTransaction(com.hazelcast.transaction.impl.xa.XATransactionImpl transaction)
           
 List<com.hazelcast.transaction.impl.xa.XATransactionImpl> removeTransactions(SerializableXID xid)
           
 void reset()
          reset this ManagedService back to initial state.
 void rollbackMigration(PartitionMigrationEvent event)
           
 void shutdown(boolean terminate)
          Shuts down this ManagedService.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SERVICE_NAME

public static final String SERVICE_NAME
See Also:
Constant Field Values
Constructor Detail

XAService

public XAService(NodeEngineImpl nodeEngine)
Method Detail

init

public void init(NodeEngine nodeEngine,
                 Properties properties)
Description copied from interface: ManagedService
Initializes this ManagedService

Specified by:
init in interface ManagedService
Parameters:
nodeEngine - the NodeEngine that this ManagedService belongs to.
properties - the Properties. Can be used to pass settings to the service.

reset

public void reset()
Description copied from interface: ManagedService
reset this ManagedService back to initial state. todo: what is the purpose of reset

Specified by:
reset in interface ManagedService

shutdown

public void shutdown(boolean terminate)
Description copied from interface: ManagedService
Shuts down this ManagedService. todo: what is the purpose of the terminate variable.

Specified by:
shutdown in interface ManagedService
Parameters:
terminate - true to shut down the ManagedService

createDistributedObject

public DistributedObject createDistributedObject(String objectName)
Description copied from interface: RemoteService
Creates a distributed object.

Specified by:
createDistributedObject in interface RemoteService
Parameters:
objectName - the name for the created distributed object
Returns:
the created distributed object

destroyDistributedObject

public void destroyDistributedObject(String objectName)
Description copied from interface: RemoteService
Destroys a distributed object.

Specified by:
destroyDistributedObject in interface RemoteService
Parameters:
objectName - the name of the distributed object to destroy

newXATransactionContext

public TransactionContext newXATransactionContext(Xid xid,
                                                  int timeout)

putTransaction

public void putTransaction(com.hazelcast.transaction.impl.xa.XATransactionImpl transaction)

removeTransactions

public List<com.hazelcast.transaction.impl.xa.XATransactionImpl> removeTransactions(SerializableXID xid)

getXids

public Set<SerializableXID> getXids()

prepareReplicationOperation

public Operation prepareReplicationOperation(PartitionReplicationEvent event)
Specified by:
prepareReplicationOperation in interface MigrationAwareService

beforeMigration

public void beforeMigration(PartitionMigrationEvent event)
Specified by:
beforeMigration in interface MigrationAwareService

commitMigration

public void commitMigration(PartitionMigrationEvent event)
Specified by:
commitMigration in interface MigrationAwareService

rollbackMigration

public void rollbackMigration(PartitionMigrationEvent event)
Specified by:
rollbackMigration in interface MigrationAwareService

clearPartitionReplica

public void clearPartitionReplica(int partitionId)
Specified by:
clearPartitionReplica in interface MigrationAwareService


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