public class TransactionServiceImp extends java.lang.Object implements TransactionServiceProvider, FSMEnterListener, SubTxAwareParticipant, RecoveryService, AdminLog
| 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.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addTSListener(TransactionServicePlugin listener) |
void |
committed(CompositeTransaction tx)
Called if a tx is ended successfully.
|
CompositeTransaction |
createCompositeTransaction(long timeout) |
void |
entered(FSMEnterEvent event)
Called when the FSM has entered a new state.
|
void |
finalize() |
CompositeCoordinator |
getCompositeCoordinator(java.lang.String root) |
CompositeTransaction |
getCompositeTransaction(java.lang.String tid) |
CoordinatorLogEntry[] |
getCoordinatorLogEntries() |
LogControl |
getLogControl()
Get a LogControl for the service.
|
java.lang.String |
getName() |
Participant |
getParticipant(java.lang.String root) |
RecoveryLog |
getRecoveryLog() |
RecoveryService |
getRecoveryService() |
RecoveryCoordinator |
getSuperiorRecoveryCoordinator(java.lang.String root) |
void |
init(java.util.Properties properties) |
CompositeTransaction |
recreateCompositeTransaction(Propagation context,
boolean orphancheck,
boolean heur_commit) |
void |
remove(java.lang.String coordinatorId) |
void |
removeTSListener(TransactionServicePlugin listener) |
void |
rolledback(CompositeTransaction tx)
Called if a tx is ended with failure.
|
void |
shutdown(boolean force) |
void |
shutdown(long maxWaitTime) |
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.console - The console to use. Null if none.maxtimeout - The max timeout for new or imported txs.maxActives - The max number of active txs, or negative if unlimited.single_threaded_2pc - Whether 2PC commit should happen in the same thread that started the tx.public java.lang.String getName()
getName in interface RecoveryServicepublic LogControl getLogControl()
getLogControl in interface TransactionServiceProviderpublic CompositeCoordinator getCompositeCoordinator(java.lang.String root) throws SysException
getCompositeCoordinator in interface TransactionServiceSysExceptionTransactionServicepublic void addTSListener(TransactionServicePlugin listener) throws java.lang.IllegalStateException
addTSListener in interface TransactionServicejava.lang.IllegalStateExceptionTransactionServicepublic void removeTSListener(TransactionServicePlugin listener)
removeTSListener in interface TransactionServiceTransactionServicepublic void init(java.util.Properties properties)
throws SysException
init in interface TransactionServiceProviderSysExceptionTransactionServicepublic Participant getParticipant(java.lang.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(java.lang.String tid)
getCompositeTransaction in interface TransactionServiceTransactionServicepublic CompositeTransaction recreateCompositeTransaction(Propagation context, boolean orphancheck, boolean heur_commit) 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 java.lang.Throwable
finalize in class java.lang.Objectjava.lang.Throwablepublic RecoveryCoordinator getSuperiorRecoveryCoordinator(java.lang.String root)
com.atomikos.icatch.TransactionService#getSuperiorRecoveryCoordinator(java.lang.String)public CompositeTransaction createCompositeTransaction(long timeout) throws SysException
createCompositeTransaction in interface TransactionServiceSysExceptionpublic RecoveryService getRecoveryService()
getRecoveryService in interface TransactionServiceProviderpublic CoordinatorLogEntry[] getCoordinatorLogEntries()
getCoordinatorLogEntries in interface AdminLogpublic void remove(java.lang.String coordinatorId)
public RecoveryLog getRecoveryLog()
getRecoveryLog in interface RecoveryServiceCopyright © 2018. All Rights Reserved.