/// <summary> /// Aborts a transaction on this server /// </summary> /// <param name="tid">transaction identifier</param> /// <param name="usedPadInts">Identifiers of PadInts involved</param> /// <returns>A predicate confirming the sucess of the operations</returns> internal override bool Abort(int tid, List <int> usedPadInts) { Logger.Log(new String[] { "PrimaryServer", Server.ID.ToString(), "abort", "tid", tid.ToString() }); bool resultAbort = true; try { VerifyPadInts(usedPadInts); foreach (int padIntUid in usedPadInts) { PadInt padInt = GetPadInt(padIntUid); resultAbort = padInt.Abort(tid) && resultAbort; } } catch (PadIntNotFoundException) { throw; } /* updates the backup server */ backupReplyTimer.Start(); BackupServer.Abort(tid, usedPadInts); backupReplyTimer.Stop(); return(resultAbort); }
/// <summary> /// Aborts a transaction on this server /// </summary> /// <param name="tid">transaction identifier</param> /// <param name="usedPadInts">Identifiers of PadInts involved</param> /// <returns>A predicate confirming the sucess of the operations</returns> internal override bool Abort(int tid, List <int> usedPadInts) { Logger.Log(new String[] { "BackupServer", Server.ID.ToString(), "abort", "tid", tid.ToString() }); bool resultAbort = true; try { VerifyPadInts(usedPadInts); foreach (int padIntUid in usedPadInts) { PadInt padInt = GetPadInt(padIntUid); resultAbort = padInt.Abort(tid) && resultAbort; } } catch (PadIntNotFoundException) { throw; } return(resultAbort); }