Exemplo n.º 1
0
 public void AddOrUpdateNode(Node node)
 {
     lock (_nodeLock)
     {
         if (!_nodes.ContainsKey(node.Id))
         {
             Logger.DebugFormat("Information for {0} added.", node);
             _nodes.Add(node.Id, node);
         }
         else
         {
             Logger.DebugFormat("Information for {0} updated.", node);
             _nodes[node.Id] = node;
         }
     }
 }
 private AnnounceRequest CreateRequest(Node node, AnnounceType announceType)
 {
     return new AnnounceRequest()
     {
         Node = node,
         AnnounceType = announceType,
     };
 }
Exemplo n.º 3
0
 public bool Contains(Node node)
 {
     lock (_nodeLock)
     {
         return _nodes.ContainsKey(node.Id);
     }
 }