public RecoveredTransactionReplayer( Uid actionUid, String actionType ) { _actionUid = actionUid; _actionType = actionType; _cachedRecoveredTransaction = new CachedRecoveredTransaction (_actionUid, _actionType); _recoveringCache.put(_actionUid, this); }
/** * Swap an old Resource that was registered with the transaction * for a new one. The old one is identified by its * RecoveryCoordinator that was returned when the Resource was * registered. The second parameter is the new Resouce. */ public final void swapResource (Uid rcUid, Resource r) { _cachedRecoveredTransaction.addResourceRecord(rcUid, r); }
/** * Get the recovery status of the transaction */ public int getRecoveryStatus () { return _cachedRecoveredTransaction.getRecoveryStatus(); }
protected void recoverTransaction (Uid tranUid) { if (jtsLogger.logger.isDebugEnabled()) { jtsLogger.logger.debug("ServerTransactionRecoveryModule.recoverTransaction()" + tranUid + ")"); } Status currentStatus = Status.StatusUnknown; CachedRecoveredTransaction cachedRecoveredTransaction = new CachedRecoveredTransaction (tranUid, _transactionType); currentStatus = cachedRecoveredTransaction.get_status(); if (jtsLogger.logger.isDebugEnabled()) { jtsLogger.logger.debug("Activated transaction "+tranUid+" status = "+Utility.stringStatus(currentStatus)); } // but first check that the original transaction isn't in mid-flight if ( cachedRecoveredTransaction.originalBusy() && (currentStatus != Status.StatusPrepared) ) { if (jtsLogger.logger.isDebugEnabled()) { jtsLogger.logger.debug("Transaction "+tranUid+" still busy"); } return; } cachedRecoveredTransaction.replayPhase2(); cachedRecoveredTransaction = null; }
public final void run() { _cachedRecoveredTransaction.replayPhase2(); _cachedRecoveredTransaction = null; tidyup(); }
/** * Get the status of the recovered transaction */ public final Status getStatus () { return _cachedRecoveredTransaction.get_status(); }
boolean /* sync ? */ originalBusy() Status originalStatus = getOriginalStatus();
private void recoverTransaction (Uid tranUid) //protected void recoverTransaction (Uid tranUid) { if (jtsLogger.logger.isDebugEnabled()) { jtsLogger.logger.debug("TransactionRecoveryModule.recoverTransaction(" + tranUid + ")"); } Status currentStatus = Status.StatusUnknown; CachedRecoveredTransaction cachedRecoveredTransaction = new CachedRecoveredTransaction (tranUid, _transactionType); currentStatus = cachedRecoveredTransaction.get_status(); if (jtsLogger.logger.isDebugEnabled()) { jtsLogger.logger.debug("Activated transaction "+tranUid+" status = "+Utility.stringStatus(currentStatus)); } // but first check that the original transaction isn't in mid-flight if ( cachedRecoveredTransaction.originalBusy() ) { if (jtsLogger.logger.isDebugEnabled()) { jtsLogger.logger.debug("Transaction "+tranUid+" still busy"); } return; } cachedRecoveredTransaction.replayPhase2(); cachedRecoveredTransaction = null; }
public final void run() { _cachedRecoveredTransaction.replayPhase2(); _cachedRecoveredTransaction = null; tidyup(); }
/** * Get the status of the recovered transaction */ public final Status getStatus () { return _cachedRecoveredTransaction.get_status(); }
boolean /* sync ? */ originalBusy() Status originalStatus = getOriginalStatus();
CachedRecoveredTransaction cachedRecoveredTransaction = new CachedRecoveredTransaction (tranUid, _transactionType); currentStatus = cachedRecoveredTransaction.get_status(); if ( cachedRecoveredTransaction.originalBusy() ) cachedRecoveredTransaction.replayPhase2(); cachedRecoveredTransaction = null;
/** * Get the recovery status of the transaction */ public int getRecoveryStatus () { return _cachedRecoveredTransaction.getRecoveryStatus(); }
/** * Swap an old Resource that was registered with the transaction * for a new one. The old one is identified by its * RecoveryCoordinator that was returned when the Resource was * registered. The second parameter is the new Resouce. */ public final void swapResource (Uid rcUid, Resource r) { _cachedRecoveredTransaction.addResourceRecord(rcUid, r); }
public RecoveredTransactionReplayer( Uid actionUid, String actionType ) { _actionUid = actionUid; _actionType = actionType; _cachedRecoveredTransaction = new CachedRecoveredTransaction (_actionUid, _actionType); _recoveringCache.put(_actionUid, this); }
CachedRecoveredTransaction cachedRecoveredTransaction = new CachedRecoveredTransaction (tranUid, _transactionType); currentStatus = cachedRecoveredTransaction.get_status(); if ( cachedRecoveredTransaction.originalBusy() && (currentStatus != Status.StatusPrepared) ) cachedRecoveredTransaction.replayPhase2(); cachedRecoveredTransaction = null;