Ejemplo n.º 1
0
 public MessageRouter(ISocketFactory socketFactory,
                      IInternalRoutingTable internalRoutingTable,
                      IExternalRoutingTable externalRoutingTable,
                      IScaleOutConfigurationProvider scaleOutConfigurationProvider,
                      IClusterServices clusterServices,
                      IServiceMessageHandlerRegistry serviceMessageHandlerRegistry,
                      IPerformanceCounterManager <KinoPerformanceCounters> performanceCounterManager,
                      ISecurityProvider securityProvider,
                      ILocalSocket <IMessage> localRouterSocket,
                      ILocalReceivingSocket <InternalRouteRegistration> internalRegistrationsReceiver,
                      IInternalMessageRouteRegistrationHandler internalRegistrationHandler,
                      IRoundRobinDestinationList roundRobinDestinationList,
                      ILogger logger)
 {
     this.logger                        = logger;
     this.socketFactory                 = socketFactory;
     this.internalRoutingTable          = internalRoutingTable;
     this.externalRoutingTable          = externalRoutingTable;
     this.scaleOutConfigurationProvider = scaleOutConfigurationProvider;
     this.clusterServices               = clusterServices;
     this.serviceMessageHandlerRegistry = serviceMessageHandlerRegistry;
     this.performanceCounterManager     = performanceCounterManager;
     this.securityProvider              = securityProvider;
     this.localRouterSocket             = localRouterSocket;
     this.localRouterSocket.SendRate    = performanceCounterManager.GetCounter(KinoPerformanceCounters.MessageRouterLocalSocketSendRate);
     this.localRouterSocket.ReceiveRate = performanceCounterManager.GetCounter(KinoPerformanceCounters.MessageRouterLocalSocketReceiveRate);
     this.internalRegistrationsReceiver = internalRegistrationsReceiver;
     this.internalRegistrationHandler   = internalRegistrationHandler;
     this.roundRobinDestinationList     = roundRobinDestinationList;
 }
Ejemplo n.º 2
0
 public InternalRoutingTable(IRoundRobinDestinationList roundRobinList)
 {
     this.roundRobinList      = roundRobinList;
     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> > >();
 }
Ejemplo n.º 3
0
 public ExternalRoutingTable(IRoundRobinDestinationList roundRobinList, ILogger logger)
 {
     this.roundRobinList = roundRobinList;
     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> >();
 }