public interface TransactionService
| Modifier and Type | Method and Description |
|---|---|
void |
addTSListener(TransactionServicePlugin listener)
Adds a listener to the transaction service.
|
CompositeTransaction |
createCompositeTransaction(long timeout)
Starts a new transaction.
|
CompositeCoordinator |
getCompositeCoordinator(java.lang.String root)
Gets a composite coordinator for the given root.
|
CompositeTransaction |
getCompositeTransaction(java.lang.String tid)
Gets the composite transaction with the given tid.
|
Participant |
getParticipant(java.lang.String root)
Gets a participant handle for the given root.
|
CompositeTransaction |
recreateCompositeTransaction(Propagation context,
boolean orphancheck,
boolean heur_commit)
Recreates a composite transaction based on an imported context.
|
void |
removeTSListener(TransactionServicePlugin listener)
Removes a listener from the transaction service.
|
void |
shutdown(boolean force)
Shuts down the server in a clean way.
|
void addTSListener(TransactionServicePlugin listener)
listener - The listener.void removeTSListener(TransactionServicePlugin listener)
listener - The listener.CompositeTransaction getCompositeTransaction(java.lang.String tid)
tid - The transaction identifier.CompositeTransaction createCompositeTransaction(long timeout) throws SysException
SysExceptionCompositeTransaction recreateCompositeTransaction(Propagation context, boolean orphancheck, boolean heur_commit) throws SysException
context - The propagation context. Any interposition
actions should already have taken place, so that the propagation
is ready to be used by the local transaction service.orphancheck - If true, real composite transactions are done.
If false, unchecked behavior applies.heur_commit - True for heuristic commit, false for heuristic
rollback.timeout - Time in millis after which heur_commit is applied.SysExceptionvoid shutdown(boolean force)
throws SysException,
java.lang.IllegalStateException
force - If true, shutdown will not wait
for possibly indoubt txs to finish.
Calling shutdown with force being true implies that
shutdown will not fail, but there may be remaining timer
threads that stay asleep until there timeouts expire.
Such remaining active transactions will NOT be able to finish,
because the recovery manager will be shutdown by that time.
New transactions will not be allowed.java.lang.IllegalStateException - If active transactions exist, and not force.SysExceptionParticipant getParticipant(java.lang.String root) throws SysException
root - The root identifier.SysException - On failure, or if the given root is not known.CompositeCoordinator getCompositeCoordinator(java.lang.String root) throws SysException
root - The root in case.SysExceptionCopyright © 2018. All Rights Reserved.