Example #1
0
 internal void Rollback(ServerLockSession session)
 {
     foreach (var ds in m_PendingChanges)//may have duplicates
     {
         if (ds.Changing)
         {
             ds.Rollback();
         }
     }
     m_PendingChanges.Clear();
 }
Example #2
0
        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);
        }
Example #3
0
        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();
        }
Example #4
0
 internal EvalContext(ServerLockSession session, Namespace ns, LockTransaction tran)
 {
     Session     = session;
     Namespace   = ns;
     Transaction = tran;
 }