Esempio n. 1
0
 public AddressEntry(FullShardAddress addr)
 {
     _id           = addr.ShardID.ToString();
     host          = addr.Host;
     peerPort      = addr.PeerPort;
     consensusPort = addr.ConsensusPort;
     observerPort  = addr.ObserverPort;
 }
Esempio n. 2
0
 internal static void SignalAddressUpdate(FullShardAddress addr)
 {
     lock (registry)
     {
         foreach (var l in registry)
         {
             l.SendCompressed(addr);
         }
     }
 }
Esempio n. 3
0
 public static void PutNow(FullShardAddress addr)
 {
     if (OnPutLocalAddress != null)
     {
         OnPutLocalAddress(addr);
     }
     Try(() =>
     {
         bool suspended = hostRequests.Suspend(addr.ShardID);
         Put(HostsStore, new AddressEntry(addr)).Wait();
         if (suspended)
         {
             hostRequests.Resume(addr.ShardID);
         }
         return(true);
     }, 3);
 }