Beispiel #1
0
 public DeadPeerDetectorEntry(PeerDescriptor descriptor, IDirectoryConfiguration configuration, IBus bus, TaskScheduler taskScheduler)
 {
     Descriptor     = descriptor;
     _configuration = configuration;
     _bus           = bus;
     _taskScheduler = taskScheduler;
 }
 public DeadPeerDetectorEntry(PeerDescriptor descriptor, IDirectoryConfiguration configuration, IBus bus, TaskScheduler taskScheduler)
 {
     Descriptor = descriptor;
     _configuration = configuration;
     _bus = bus;
     _taskScheduler = taskScheduler;
 }
 public DirectoryCommandsHandler(IBus bus, IPeerRepository peerRepository, IDirectoryConfiguration configuration, IDirectorySpeedReporter speedReporter)
 {
     _bus                 = bus;
     _peerRepository      = peerRepository;
     _configuration       = configuration;
     _speedReporter       = speedReporter;
     _blacklistedMachines = configuration.BlacklistedMachines.ToHashSet(StringComparer.OrdinalIgnoreCase);
 }
Beispiel #4
0
        public DeadPeerDetector(IBus bus, IPeerRepository peerRepository, IDirectoryConfiguration configuration)
        {
            _bus            = bus;
            _peerRepository = peerRepository;
            _configuration  = configuration;

            TaskScheduler = TaskScheduler.Current;
        }
        public DeadPeerDetector(IBus bus, IPeerRepository peerRepository, IDirectoryConfiguration configuration)
        {
            _bus = bus;
            _peerRepository = peerRepository;
            _configuration = configuration;

            TaskScheduler = TaskScheduler.Current;
            ExceptionHandler = ex => _logger.ErrorFormat("MainLoop error: {0}", ex);
        }
 public PeerDirectoryServer(IDirectoryConfiguration configuration, IPeerRepository peerRepository)
 {
     _configuration  = configuration;
     _peerRepository = peerRepository;
 }
Beispiel #7
0
 public InMemoryClusterDirectory(IDirectoryConfiguration configuration)
 {
     _world         = new Dictionary <string, ClusterMemberDescriptor>();
     _configuration = configuration;
 }
        public static ICluster Create <TRegistry>(IClusterConfiguration rootRemoteConfiguration, IDirectoryConfiguration directoryConfiguration) where TRegistry : Registry
        {
            var container = new Container((conf) => conf.AddRegistry(Activator.CreateInstance <TRegistry>()));

            container.Configure(conf => conf.For <IClusterConfiguration>().Use(rootRemoteConfiguration));
            container.Configure(conf => conf.For <IDirectoryConfiguration>().Use(directoryConfiguration));
            return(container.GetInstance <ICluster>());
        }