public class TransactionServiceImp extends Object implements TransactionServiceProvider, FSMEnterListener, SubTxAwareParticipant, RecoveryService
| Constructor and Description |
|---|
TransactionServiceImp(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(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 String getName()
getName in interface RecoveryServicepublic CompositeCoordinator getCompositeCoordinator(String root) throws SysException
getCompositeCoordinator in interface TransactionServiceSysExceptionTransactionServicepublic void addTSListener(TransactionServicePlugin listener) throws IllegalStateException
addTSListener in interface TransactionServiceIllegalStateExceptionTransactionServicepublic void removeTSListener(TransactionServicePlugin listener)
removeTSListener in interface TransactionServiceTransactionServicepublic void init(Properties properties) throws SysException
init in interface TransactionServiceProviderSysExceptionTransactionServicepublic Participant getParticipant(String root) throws SysException
getParticipant in interface TransactionServiceSysExceptionTransactionServicepublic void entered(FSMEnterEvent event)
FSMEnterListenerentered in interface FSMEnterListenerFSMEnterListener.public void committed(CompositeTransaction tx)
committed in interface SubTxAwareParticipantSubTxAwareParticipantpublic void rolledback(CompositeTransaction tx)
rolledback in interface SubTxAwareParticipantSubTxAwareParticipantpublic CompositeTransaction getCompositeTransaction(String tid)
getCompositeTransaction in interface TransactionServiceTransactionServicepublic CompositeTransaction recreateCompositeTransaction(Propagation context) throws SysException
recreateCompositeTransaction in interface TransactionServiceSysExceptionTransactionServicepublic void shutdown(boolean force)
shutdown in interface TransactionServiceTransactionServicepublic void shutdown(long maxWaitTime)
shutdown in interface TransactionServiceProviderpublic void finalize()
throws Throwable
public CompositeTransaction createCompositeTransaction(long timeout) throws SysException
createCompositeTransaction in interface TransactionServiceSysExceptionpublic RecoveryService getRecoveryService()
getRecoveryService in interface TransactionServiceProviderpublic RecoveryLog getRecoveryLog()
getRecoveryLog in interface RecoveryServicepublic boolean performRecovery()
performRecovery in interface RecoveryServiceprotected boolean performRecoveryPass()
public boolean performRecovery(boolean lax)
performRecovery in interface RecoveryServiceCopyright © 2023. All rights reserved.