Esempio n. 1
0
        private void SendFullCacheUpdate(IPAddress ip)
        {
            if (ip == null)
            {
                throw new ArgumentException("The specified IP address is not valid", "ip");
            }

            if (!KnownNodes.Contains(ip))
            {
                throw new ArgumentException("The ip address specified is not known.", "ip");
            }

            // grab a copy of the cache
            CacheProvider <string, ClientResultMessage> temp = ResultCache;

            temp.ClearSubscribersNoNotify();
            InterNodeCommunicationMessage msg = new InterNodeCommunicationMessage {
                Data = CacheSerialiser.Serialise(temp), IsLocalOnly = true, MessageType = InterNodeMessageType.FullCacheUpdateReceived
            };

            SendToNode(ip, InterNodeCommunicationMessageSerialiser.Serialise(msg));
        }