public InternalRoutingTable()
 {
     messageHubs              = new Bcl.Dictionary <ReceiverIdentifier, ILocalSendingSocket <IMessage> >();
     messageToActorMap        = new Bcl.Dictionary <MessageIdentifier, HashedLinkedList <ReceiverIdentifier> >();
     actorToSocketMap         = new Bcl.Dictionary <ReceiverIdentifier, ILocalSendingSocket <IMessage> >();
     socketToActorMessagesMap = new Bcl.Dictionary <ILocalSendingSocket <IMessage>, Bcl.IDictionary <ReceiverIdentifier, Bcl.HashSet <MessageIdentifier> > >();
 }
 public ExternalRoutingTable(ILogger logger)
 {
     this.logger         = logger;
     nodeMessageHubs     = new Bcl.Dictionary <ReceiverIdentifier, Bcl.HashSet <ReceiverIdentifier> >();
     nodeActors          = new Bcl.Dictionary <ReceiverIdentifier, Bcl.HashSet <ReceiverIdentifier> >();
     actorToMessageMap   = new Bcl.Dictionary <ReceiverIdentifier, Bcl.HashSet <MessageIdentifier> >();
     messageToNodeMap    = new Bcl.Dictionary <MessageIdentifier, HashedLinkedList <ReceiverIdentifier> >();
     nodeToConnectionMap = new Bcl.Dictionary <ReceiverIdentifier, PeerConnection>();
     uriToNodeMap        = new ConcurrentDictionary <string, Bcl.HashSet <ReceiverIdentifier> >();
 }
 private static void MapActorToMessage(InternalRouteRegistration routeRegistration,
                                       Bcl.IDictionary <ReceiverIdentifier, Bcl.HashSet <MessageIdentifier> > actorMessages,
                                       MessageContract messageContract)
 {
     if (!actorMessages.TryGetValue(routeRegistration.ReceiverIdentifier, out var messages))
     {
         messages = new Bcl.HashSet <MessageIdentifier>();
         actorMessages[routeRegistration.ReceiverIdentifier] = messages;
     }
     messages.Add(messageContract.Message);
 }