/** * Applies the undo log, releases all the locks, and then discards the undo log. This * object must be discarded afterwards. */ void rollback(LocalDatabase db) throws IOException { // See Transaction.exit for more info. UndoLog undo = mUndoLog; if (undo != null) { undo.rollback(); } unlockAll(db); if (undo != null) { mContext.unregister(undo); } }
/** * Applies the undo log, releases all the locks, and then discards the undo log. This * object must be discarded afterwards. */ void rollback(LocalDatabase db) throws IOException { // See Transaction.exit for more info. UndoLog undo = mUndoLog; if (undo != null) { undo.rollback(); } unlockAll(db); if (undo != null) { mContext.unregister(undo); } }
/** * Applies the undo log, releases all the locks, and then discards the undo log. This * object must be discarded afterwards. */ void rollback(LocalDatabase db) throws IOException { // See Transaction.exit for more info. UndoLog undo = mUndoLog; if (undo != null) { undo.rollback(); } unlockAll(db); if (undo != null) { mTxnContext.unregister(undo); } }
private void rollback() throws IOException { int hasState = mHasState; ParentScope parentScope = mParentScope; while (parentScope != null) { hasState |= parentScope.mHasState; parentScope = parentScope.mParentScope; } try { if ((hasState & (HAS_SCOPE | HAS_COMMIT)) != 0) { mContext.redoRollbackFinal(mRedo, mTxnId); } mHasState = 0; } catch (UnmodifiableReplicaException e) { // Suppress and let undo proceed. } UndoLog undo = mUndoLog; if (undo != null) { undo.rollback(); } // Exit and release all locks. super.scopeExitAll(); mSavepoint = 0; if (undo != null) { mContext.unregister(undo); mUndoLog = null; } mTxnId = 0; }
private void rollback() throws IOException { int hasState = mHasState; ParentScope parentScope = mParentScope; while (parentScope != null) { hasState |= parentScope.mHasState; parentScope = parentScope.mParentScope; } try { if ((hasState & (HAS_SCOPE | HAS_COMMIT)) != 0) { mContext.redoRollbackFinal(mRedo, mTxnId); } mHasState = 0; } catch (UnmodifiableReplicaException e) { // Suppress and let undo proceed. } UndoLog undo = mUndoLog; if (undo != null) { undo.rollback(); } // Exit and release all locks. super.scopeExitAll(); mSavepoint = 0; if (undo != null) { mContext.unregister(undo); mUndoLog = null; } mTxnId = 0; }
undo.rollback();
try { if (undo != null) { undo.rollback();
undo.rollback();