Class UnrecoverableLog
- java.lang.Object
-
- org.apache.geronimo.transaction.log.UnrecoverableLog
-
- All Implemented Interfaces:
TransactionLog
public class UnrecoverableLog extends java.lang.Object implements TransactionLog
A log sink that doesn't actually do anything. Not recommended for production use as heuristic recovery will be needed if the transaction coordinator dies.
-
-
Constructor Summary
Constructors Constructor Description UnrecoverableLog()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
begin(javax.transaction.xa.Xid xid)
void
commit(javax.transaction.xa.Xid xid, java.lang.Object logMark)
int
getAverageBytesPerForce()
int
getAverageForceTime()
java.lang.String
getXMLStats()
java.lang.Object
prepare(javax.transaction.xa.Xid xid, java.util.List<? extends TransactionBranchInfo> branches)
log prepare for the global xid xid and the list of TransactionBranchInfo branchesjava.util.Collection
recover(XidFactory xidFactory)
Recovers the log, returning a map of (top level) xid to List of TransactionBranchInfo for the branches.void
rollback(javax.transaction.xa.Xid xid, java.lang.Object logMark)
-
-
-
Method Detail
-
begin
public void begin(javax.transaction.xa.Xid xid) throws LogException
- Specified by:
begin
in interfaceTransactionLog
- Throws:
LogException
-
prepare
public java.lang.Object prepare(javax.transaction.xa.Xid xid, java.util.List<? extends TransactionBranchInfo> branches) throws LogException
Description copied from interface:TransactionLog
log prepare for the global xid xid and the list of TransactionBranchInfo branches- Specified by:
prepare
in interfaceTransactionLog
- Parameters:
xid
- global xid for the transactionsbranches
- List of TransactionBranchInfo- Returns:
- log mark to use in commit/rollback calls.
- Throws:
LogException
- on error
-
commit
public void commit(javax.transaction.xa.Xid xid, java.lang.Object logMark) throws LogException
- Specified by:
commit
in interfaceTransactionLog
- Throws:
LogException
-
rollback
public void rollback(javax.transaction.xa.Xid xid, java.lang.Object logMark) throws LogException
- Specified by:
rollback
in interfaceTransactionLog
- Throws:
LogException
-
recover
public java.util.Collection recover(XidFactory xidFactory) throws LogException
Description copied from interface:TransactionLog
Recovers the log, returning a map of (top level) xid to List of TransactionBranchInfo for the branches. Uses the XidFactory to reconstruct the xids.- Specified by:
recover
in interfaceTransactionLog
- Parameters:
xidFactory
- Xid factory- Returns:
- Map of recovered xid to List of TransactionBranchInfo representing the branches.
- Throws:
LogException
- on error
-
getXMLStats
public java.lang.String getXMLStats()
- Specified by:
getXMLStats
in interfaceTransactionLog
-
getAverageForceTime
public int getAverageForceTime()
- Specified by:
getAverageForceTime
in interfaceTransactionLog
-
getAverageBytesPerForce
public int getAverageBytesPerForce()
- Specified by:
getAverageBytesPerForce
in interfaceTransactionLog
-
-