public BusyScope(IFailureDetector failureDetector) { _failureDetector = failureDetector; IsBusy = true; TurnBlueLedOn(); }
protected override Task OnActivateAsync() { if (this.Nodes == null) { this.NumberOfNodes = 2; this.Nodes = new Dictionary <int, INode>(); this.NodeMap = new Dictionary <INode, bool>(); this.FailureDetector = ActorProxy.Create <IFailureDetector>( new ActorId(1), "FailureDetectorProxy"); this.Initialize(); var configureTask = this.FailureDetector.Configure(this.Nodes.Keys.ToList()); ActorModel.Wait(configureTask); var registerTask = this.FailureDetector.RegisterClient(0); ActorModel.Wait(registerTask); this.FailureDetector.Start(); //this.Fail(); } return(base.OnActivateAsync()); }
public async Task Start() { ActorEventSource.Current.ActorMessage(this, "[Driver] is starting"); if (this.Nodes == null) { this.NumberOfNodes = 2; this.Nodes = new Dictionary <int, INode>(); this.NodeMap = new Dictionary <INode, bool>(); this.SafetyMonitor = ActorProxy.Create <ISafetyMonitor>(new ActorId(1), "fabric:/FabricFailureDetector"); this.FailureDetector = ActorProxy.Create <IFailureDetector>(new ActorId(2), "fabric:/FabricFailureDetector"); await this.Initialize(); await this.FailureDetector.Configure(this.Nodes.Keys.ToList()); await this.FailureDetector.RegisterClient(0); await this.FailureDetector.Start(); //this.Fail(); } }
public Executor(ITracer tracer, IFailureDetector failureDetector) { _tracer = tracer; _failureDetector = failureDetector; }