com.hazelcast.transaction.impl
Class TransactionManagerServiceImpl

java.lang.Object
  extended by com.hazelcast.transaction.impl.TransactionManagerServiceImpl
All Implemented Interfaces:
ClientAwareService, ManagedService, MembershipAwareService, TransactionManagerService

public class TransactionManagerServiceImpl
extends Object
implements TransactionManagerService, ManagedService, MembershipAwareService, ClientAwareService


Field Summary
static int RECOVER_TIMEOUT
           
static String SERVICE_NAME
           
 
Constructor Summary
TransactionManagerServiceImpl(NodeEngineImpl nodeEngine)
           
 
Method Summary
 void addClientRecoveredTransaction(RecoveredTransaction rt)
           
 void addManagedTransaction(Xid xid, Transaction transaction)
           
 void addTxBackupLogForClientRecovery(Transaction transaction)
           
 void clientDisconnected(String clientUuid)
          Invoked when a client disconnected from a member.
<T> T
executeTransaction(TransactionOptions options, TransactionalTask<T> task)
           
 String getGroupName()
           
 Transaction getManagedTransaction(Xid xid)
           
 void init(NodeEngine nodeEngine, Properties properties)
          Initializes this ManagedService
 void memberAdded(MembershipServiceEvent event)
          Invoked when a new member is added to the cluster.
 void memberAttributeChanged(MemberAttributeServiceEvent event)
          Invoked when a member attribute is changed.
 void memberRemoved(MembershipServiceEvent event)
          Invoked when an existing member leaves the cluster.
 TransactionContext newClientTransactionContext(TransactionOptions options, String clientUuid)
           
 TransactionContext newTransactionContext(TransactionOptions options)
           
 Xid[] recover()
           
 void recoverClientTransaction(SerializableXID sXid, boolean commit)
           
 Set<RecoveredTransaction> recoverLocal()
           
 void removeManagedTransaction(Xid xid)
           
 void reset()
          reset this ManagedService back to initial state.
 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

RECOVER_TIMEOUT

public static final int RECOVER_TIMEOUT
See Also:
Constant Field Values
Constructor Detail

TransactionManagerServiceImpl

public TransactionManagerServiceImpl(NodeEngineImpl nodeEngine)
Method Detail

getGroupName

public String getGroupName()

executeTransaction

public <T> T executeTransaction(TransactionOptions options,
                                TransactionalTask<T> task)
                     throws TransactionException
Specified by:
executeTransaction in interface TransactionManagerService
Throws:
TransactionException

newTransactionContext

public TransactionContext newTransactionContext(TransactionOptions options)
Specified by:
newTransactionContext in interface TransactionManagerService

newClientTransactionContext

public TransactionContext newClientTransactionContext(TransactionOptions options,
                                                      String clientUuid)
Specified by:
newClientTransactionContext in interface TransactionManagerService

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

memberAdded

public void memberAdded(MembershipServiceEvent event)
Description copied from interface: MembershipAwareService
Invoked when a new member is added to the cluster.

Specified by:
memberAdded in interface MembershipAwareService

addClientRecoveredTransaction

public void addClientRecoveredTransaction(RecoveredTransaction rt)

recoverClientTransaction

public void recoverClientTransaction(SerializableXID sXid,
                                     boolean commit)

memberRemoved

public void memberRemoved(MembershipServiceEvent event)
Description copied from interface: MembershipAwareService
Invoked when an existing member leaves the cluster.

Specified by:
memberRemoved in interface MembershipAwareService

memberAttributeChanged

public void memberAttributeChanged(MemberAttributeServiceEvent event)
Description copied from interface: MembershipAwareService
Invoked when a member attribute is changed.

Specified by:
memberAttributeChanged in interface MembershipAwareService

addManagedTransaction

public void addManagedTransaction(Xid xid,
                                  Transaction transaction)

getManagedTransaction

public Transaction getManagedTransaction(Xid xid)

removeManagedTransaction

public void removeManagedTransaction(Xid xid)

clientDisconnected

public void clientDisconnected(String clientUuid)
Description copied from interface: ClientAwareService
Invoked when a client disconnected from a member.

Specified by:
clientDisconnected in interface ClientAwareService

addTxBackupLogForClientRecovery

public void addTxBackupLogForClientRecovery(Transaction transaction)

recover

public Xid[] recover()

recoverLocal

public Set<RecoveredTransaction> recoverLocal()


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