Beispiel #1
0
 public AddressEntry(FullShardAddress addr)
 {
     _id           = addr.ShardID.ToString();
     host          = addr.Host;
     peerPort      = addr.PeerPort;
     consensusPort = addr.ConsensusPort;
     observerPort  = addr.ObserverPort;
 }
Beispiel #2
0
 internal static void SignalAddressUpdate(FullShardAddress addr)
 {
     lock (registry)
     {
         foreach (var l in registry)
         {
             l.SendCompressed(addr);
         }
     }
 }
Beispiel #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);
 }