public class TransactionServiceImp extends java.lang.Object implements TransactionServiceProvider, FSMEnterListener, SubTxAwareParticipant, RecoveryService
Constructor and Description |
---|
TransactionServiceImp(java.lang.String name,
StateRecoveryManager recoverymanager,
UniqueIdMgr tidmgr,
long maxtimeout,
int maxActives,
boolean single_threaded_2pc,
RecoveryLog recoveryLog)
Create a new instance, with orphan checking set.
|
public TransactionServiceImp(java.lang.String name, StateRecoveryManager recoverymanager, UniqueIdMgr tidmgr, long maxtimeout, int maxActives, boolean single_threaded_2pc, RecoveryLog recoveryLog)
name
- The unique name of this TM.recoverymanager
- The recovery manager to use.tidmgr
- The String manager to use.maxtimeout
- The max timeout for new or imported txs.maxActives
- The max number of active txs, or negative if unlimited.
even for creation requests that ask for checks. This
mode may be needed for being compatible with certain
configurations that do not support orphan detection.single_threaded_2pc
- Whether 2PC commit should happen in the same thread that started the tx.recoveryLog2
- public java.lang.String getName()
getName
in interface RecoveryService
public CompositeCoordinator getCompositeCoordinator(java.lang.String root) throws SysException
getCompositeCoordinator
in interface TransactionService
SysException
TransactionService
public void addTSListener(TransactionServicePlugin listener) throws java.lang.IllegalStateException
addTSListener
in interface TransactionService
java.lang.IllegalStateException
TransactionService
public void removeTSListener(TransactionServicePlugin listener)
removeTSListener
in interface TransactionService
TransactionService
public void init(java.util.Properties properties) throws SysException
init
in interface TransactionServiceProvider
SysException
TransactionService
public Participant getParticipant(java.lang.String root) throws SysException
getParticipant
in interface TransactionService
SysException
TransactionService
public void entered(FSMEnterEvent event)
FSMEnterListener
entered
in interface FSMEnterListener
FSMEnterListener.
public void committed(CompositeTransaction tx)
committed
in interface SubTxAwareParticipant
SubTxAwareParticipant
public void rolledback(CompositeTransaction tx)
rolledback
in interface SubTxAwareParticipant
SubTxAwareParticipant
public CompositeTransaction getCompositeTransaction(java.lang.String tid)
getCompositeTransaction
in interface TransactionService
TransactionService
public CompositeTransaction recreateCompositeTransaction(Propagation context) throws SysException
recreateCompositeTransaction
in interface TransactionService
SysException
TransactionService
public void shutdown(boolean force)
shutdown
in interface TransactionService
TransactionService
public void shutdown(long maxWaitTime)
shutdown
in interface TransactionServiceProvider
public void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
public CompositeTransaction createCompositeTransaction(long timeout) throws SysException
createCompositeTransaction
in interface TransactionService
SysException
public RecoveryService getRecoveryService()
getRecoveryService
in interface TransactionServiceProvider
public RecoveryLog getRecoveryLog()
getRecoveryLog
in interface RecoveryService
public void transactionSuspended(CompositeTransaction ct)
transactionSuspended
in interface TransactionService
public void transactionResumed(CompositeTransaction ct)
transactionResumed
in interface TransactionService
Copyright © 2020. All Rights Reserved.