Пример #1
0
 public void Deserialize(Runtime.Serialization.IO.CompactReader reader)
 {
     _node             = reader.ReadObject() as ServerNode;
     _itemCount        = reader.ReadInt64();
     _dataSize         = reader.ReadInt64();
     _clientsConnected = reader.ReadUInt16();
     _totalCacheSize   = reader.ReadInt64();
     _nodeStatus       = (CacheNodeStatus)reader.ReadInt32();
 }
Пример #2
0
        /// <summary>Set the status of a node</summary>
        public void SetNodeStatus(CacheNode node, CacheNodeStatus status)
        {
            if (node == null)
            {
                return;
            }

            // I don't think it's necessary to enter a read lock here.

            node.Status = status;

            // TODO - What if status is Migrating?  It shouldn't be part of the ring.
        }
Пример #3
0
 /// <summary>Set the status of a node</summary>
 public void SetNodeStatus(IPEndPoint endPoint, CacheNodeStatus status)
 {
     SetNodeStatus(FindNodeByIP(endPoint), status);
 }
Пример #4
0
 /// <summary>Set the status of a node</summary>
 public void SetNodeStatus(string nodeName, CacheNodeStatus status)
 {
     SetNodeStatus(FindNodeByName(nodeName), status);
 }