Interface TransactionLog
-
- All Known Implementing Classes:
HOWLLog,UnrecoverableLog
public interface TransactionLogInterface used to notify a logging subsystem of transaction events.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidbegin(Xid xid)voidcommit(Xid xid, Object logMark)intgetAverageBytesPerForce()intgetAverageForceTime()StringgetXMLStats()Objectprepare(Xid xid, List<? extends TransactionBranchInfo> branches)log prepare for the global xid xid and the list of TransactionBranchInfo branchesCollection<Recovery.XidBranchesPair>recover(XidFactory xidFactory)Recovers the log, returning a map of (top level) xid to List of TransactionBranchInfo for the branches.voidrollback(Xid xid, Object logMark)
-
-
-
Method Detail
-
begin
void begin(Xid xid) throws LogException
- Throws:
LogException
-
prepare
Object prepare(Xid xid, List<? extends TransactionBranchInfo> branches) throws LogException
log prepare for the global xid xid and the list of TransactionBranchInfo branches- Parameters:
xid- global xid for the transactionsbranches- List of TransactionBranchInfo- Returns:
- log mark to use in commit/rollback calls.
- Throws:
LogException- on error
-
commit
void commit(Xid xid, Object logMark) throws LogException
- Throws:
LogException
-
rollback
void rollback(Xid xid, Object logMark) throws LogException
- Throws:
LogException
-
recover
Collection<Recovery.XidBranchesPair> recover(XidFactory xidFactory) throws LogException
Recovers the log, returning a map of (top level) xid to List of TransactionBranchInfo for the branches. Uses the XidFactory to reconstruct the xids.- Parameters:
xidFactory- Xid factory- Returns:
- Map of recovered xid to List of TransactionBranchInfo representing the branches.
- Throws:
LogException- on error
-
getXMLStats
String getXMLStats()
-
getAverageForceTime
int getAverageForceTime()
-
getAverageBytesPerForce
int getAverageBytesPerForce()
-
-