public ClusterMonitor(IScaleOutConfigurationProvider scaleOutConfigurationProvider, IAutoDiscoverySender autoDiscoverySender, IAutoDiscoveryListener autoDiscoveryListener, IHeartBeatSenderConfigurationProvider heartBeatConfigurationProvider, IRouteDiscovery routeDiscovery, ISecurityProvider securityProvider, ILogger logger) { this.scaleOutConfigurationProvider = scaleOutConfigurationProvider; this.autoDiscoverySender = autoDiscoverySender; this.autoDiscoveryListener = autoDiscoveryListener; this.heartBeatConfigurationProvider = heartBeatConfigurationProvider; this.routeDiscovery = routeDiscovery; this.securityProvider = securityProvider; this.logger = logger; }
public ClusterMonitor(IScaleOutConfigurationProvider scaleOutConfigurationProvider, IAutoDiscoverySender autoDiscoverySender, IAutoDiscoveryListener autoDiscoveryListener, IHeartBeatSenderConfigurationProvider heartBeatConfigurationProvider, IRouteDiscovery routeDiscovery, ISecurityProvider securityProvider, ClusterMembershipConfiguration clusterMembershipConfiguration, ILogger logger) { this.scaleOutConfigurationProvider = scaleOutConfigurationProvider; this.autoDiscoverySender = autoDiscoverySender; this.autoDiscoveryListener = autoDiscoveryListener; this.heartBeatConfigurationProvider = heartBeatConfigurationProvider; this.routeDiscovery = routeDiscovery; this.securityProvider = securityProvider; routeDiscoveryConfig = clusterMembershipConfiguration.RouteDiscovery; this.logger = logger; randomizer = new C5Random(); clusterRoutesRequestTimer = new Timer(_ => RequestClusterRoutes(), null, TimeSpan.FromMilliseconds(-1), TimeSpan.FromMilliseconds(-1)); }