コード例 #1
0
 internal override void Update <TKey>(Process process, TKey localkey, ProtocolMessage protocolMessage, Stopwatch stopwatch, out bool exiting)
 {
     if (protocolMessage.OriginalOpid == this.Opid)
     {
         exiting = true;
     }
     else
     {
         exiting = false;
         Requests[protocolMessage.OriginalOpid].Update(process, localkey, protocolMessage, stopwatch, out var innerIsExiting);
         if (innerIsExiting)
         {
             Requests.Remove(protocolMessage.OriginalOpid);
         }
     }
 }
コード例 #2
0
        public void Update <TKey>(TKey localkey, ProtocolMessage protocolMessage)
        {
            if (head == null)
            {
                throw new Exception("internal error: received update for request not holding lock");
            }

            head.Request.Update(Process, localkey, protocolMessage, head.Stopwatch, out var exiting);

            while (exiting)
            {
                head.Request.OnExit(Process);
                head = head.Next;

                if (head == null)
                {
                    return;
                }

                head.Request.OnEnter(Process);
                head.Request.Enter(Process, localkey, head.Stopwatch, out exiting);
            }
        }
コード例 #3
0
 internal virtual void Update <TKey>(Process process, TKey localkey, ProtocolMessage protocolMessage, Stopwatch stopwatch, out bool exiting)
 {
     throw new NotImplementedException();
 }
コード例 #4
0
 internal override void Update <TKey>(Process process, TKey localkey, ProtocolMessage protocolMessage, Stopwatch stopwatch, out bool exiting)
 {
     // try again now that initialization is done
     Enter(process, localkey, stopwatch, out exiting);
 }
コード例 #5
0
 internal override void Update <TKey>(Process process, TKey localkey, ProtocolMessage protocolMessage, Stopwatch stopwatch, out bool exiting)
 {
     PendingAcks--;
     TryCommit <TKey>(process, stopwatch, out exiting);
 }