private void HandleCommit(int writeStamp) { foreach (var entry in WriteSet) { var lo = entry.Key; var value = entry.Value; lo.Commit(value, writeStamp); } WriteSet.Unlock(); }
public bool Validate(out int writeStamp) { writeStamp = -1; if (Status == TransactionStatus.Aborted || !WriteSet.TryLock(STMSystem.TIME_OUT)) { return(false); } if (ValidateReadset()) { writeStamp = VersionClock.IncrementClock(); return(true); } WriteSet.Unlock(); return(false); }