Exemplo n.º 1
0
 internal Variable(
     LockSessionID sessionID,
     Guid tranID,
     DateTime setTimeUTC,
     DateTime?expirationTimeUTC,
     string description,
     object value
     )
 {
     SessionID         = sessionID;
     TranID            = tranID;
     SetTimeUTC        = setTimeUTC;
     ExpirationTimeUTC = expirationTimeUTC;
     Description       = description;
     Value             = value;
 }
Exemplo n.º 2
0
        public bool EndLockSession(LockSessionID sessionID)
        {
            if (!Running)
            {
                return(false);
            }

            Interlocked.Increment(ref m_CurrentServerCalls);


            var sid = sessionID.ToString();
            var ss  = m_Sessions[sid];

            if (ss == null)
            {
                return(false);
            }


            if (m_InstrumentationEnabled)
            {
                Interlocked.Increment(ref m_stat_EndLockSessionCalls);
            }


            lock (ss)
            {
                //note: no need to update last interaction time
                m_Sessions.Unregister(ss);
                if (ss.Disposed)
                {
                    return(false);
                }

                ss.Dispose();
                return(true);
            }
        }
Exemplo n.º 3
0
 internal LockSessionData(LockSessionID id, string description, int?maxAgeSec)
 {
     ID          = id;
     Description = description;
     MaxAgeSec   = maxAgeSec;
 }
Exemplo n.º 4
0
 public bool EndLockSession(LockSessionID sessionID)
 => Service.Locker.EndLockSession(sessionID);