internal void Rollback(ServerLockSession session) { foreach (var ds in m_PendingChanges)//may have duplicates { if (ds.Changing) { ds.Rollback(); } } m_PendingChanges.Clear(); }
public void EndSession(ServerLockSession session) { HashSet <DataSlot> set; if (!m_SessionOwnedData.TryGetValue(session, out set)) { return; } foreach (var slot in set) { m_TotalRecordCount -= slot.Data.RemoveAll(v => v.SessionID.Equals(session.Data.ID)); } m_SessionOwnedData.Remove(session); }
internal void Commit(ServerLockSession session) { foreach (var ds in m_PendingChanges)//may have duplicates { if (ds.Changing) { var deltaRecords = ds.Commit(); m_TotalRecordCount += deltaRecords; HashSet <DataSlot> set; if (!m_SessionOwnedData.TryGetValue(session, out set)) { set = new HashSet <DataSlot>(); m_SessionOwnedData[session] = set; } set.Add(ds); session.m_MutatedNamespaces.Add(m_Namespace); } } m_PendingChanges.Clear(); }
internal EvalContext(ServerLockSession session, Namespace ns, LockTransaction tran) { Session = session; Namespace = ns; Transaction = tran; }