Package com.sun.jts.CosTransactions
Class RecoveryManager
- java.lang.Object
-
- com.sun.jts.CosTransactions.RecoveryManager
-
public class RecoveryManager extends Object
This class manages information required for recovery, and also general state regarding transactions in a process.- Version:
- 0.01
- Author:
- Simon Holdsworth, IBM Corporation
-
-
Constructor Summary
Constructors Constructor Description RecoveryManager()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static byte[]
getRestart()
Gets the restart data for the process.static Boolean
isIncompleteTxRecoveryRequired()
static void
recoverIncompleteTx(XAResource[] xaresArray)
static void
recoverXAResources(Enumeration xaResources)
Recovers the in doubt transactions from the provided list of XAResource objects.static void
registerTransactionRecoveryFence(TransactionRecoveryFence fence)
Register the implementation of Transaction recovery fence.static void
setRestart(byte[] bytes)
Sets the restart data for the process.static int
sizeOfInCompleteTx()
static void
startResyncThread()
Start resync threadstatic void
startTransactionRecoveryFence()
Start Transaction recovery fence.static void
waitForRecovery()
Waits for recovery to complete.static void
waitForResync()
Waits for resync to complete.static void
waitForResync(int cmtTimeOut)
Waits for resync to complete with timeout.
-
-
-
Method Detail
-
recoverXAResources
public static void recoverXAResources(Enumeration xaResources)
Recovers the in doubt transactions from the provided list of XAResource objects. This method is never called by the recovery thread, and its the application threads which wants to pass in the XA resources that call this.- Parameters:
xaResources
- enumerated list of XA Resources to be recovered
-
getRestart
public static byte[] getRestart()
Gets the restart data for the process.- Returns:
- The restart data.
-
setRestart
public static void setRestart(byte[] bytes)
Sets the restart data for the process.- Parameters:
bytes
- The restart data.
-
waitForRecovery
public static void waitForRecovery()
Waits for recovery to complete.
-
waitForResync
public static void waitForResync()
Waits for resync to complete.
-
waitForResync
public static void waitForResync(int cmtTimeOut)
Waits for resync to complete with timeout.- Parameters:
cmtTimeout
- Container managed transaction timeout
-
isIncompleteTxRecoveryRequired
public static Boolean isIncompleteTxRecoveryRequired()
-
sizeOfInCompleteTx
public static int sizeOfInCompleteTx()
-
recoverIncompleteTx
public static void recoverIncompleteTx(XAResource[] xaresArray)
-
registerTransactionRecoveryFence
public static void registerTransactionRecoveryFence(TransactionRecoveryFence fence)
Register the implementation of Transaction recovery fence. This service is started as soon as all the resources are available.
-
startTransactionRecoveryFence
public static void startTransactionRecoveryFence()
Start Transaction recovery fence.
-
startResyncThread
public static void startResyncThread()
Start resync thread
-
-