/// <summary> /// 触发任务结束事件。 /// </summary> /// <param name="args">事件参数。。</param> protected void OnTerminate(TaskTerminateEventArgs args) { Terminated?.Invoke(this, args); }
public Coordinator isReduceCoordinatorTerminated(Terminated message) { return(validReduceCoordinator.Find(coord => coord.CoordinatorActor.Equals(message.ActorRef))); }
protected void FireTerminated() { Terminated?.Invoke(this, EventArgs.Empty); }
private void HandleTerminateTransaction(Terminated obj) { _activeTransactions.Remove(obj.ActorRef); }
public void Handle(Terminated message) { Console.Write("Server died"); }
protected virtual bool Terminate(Terminated message) { Logger.Warning("Aggregate of Type={0}, and Id={1}; has terminated.", typeof(TAggregate).PrettyPrint(), message.ActorRef.Path.Name); Context.Unwatch(message.ActorRef); return(true); }
private void Window_Closing() { logger.Info($"Instance has terminated."); control.Destroy(); Terminated?.Invoke(Id); }
public Task ConnectedAsync(IContext context) { switch (context.Message) { case RemoteTerminate msg: { if (_watched.TryGetValue(msg.Watcher.Id, out var pidSet)) { pidSet.Remove(msg.Watchee); if (pidSet.Count == 0) { _watched[msg.Watcher.Id] = null; } } //create a terminated event for the Watched actor var t = new Terminated { Who = msg.Watchee }; //send the address Terminated event to the Watcher msg.Watcher.SendSystemMessage(t); break; } case EndpointTerminatedEvent _: { _logger.LogDebug($"Handle terminated address {_address}"); foreach (var(id, pidSet) in _watched) { var watcherPid = new PID(ProcessRegistry.Instance.Address, id); var watcherRef = ProcessRegistry.Instance.Get(watcherPid); if (watcherRef != DeadLetterProcess.Instance) { foreach (var pid in pidSet) { //create a terminated event for the Watched actor var t = new Terminated { Who = pid, AddressTerminated = true }; //send the address Terminated event to the Watcher watcherPid.SendSystemMessage(t); } } } _watched.Clear(); _behavior.Become(TerminatedAsync); break; } case RemoteUnwatch msg: { if (_watched.TryGetValue(msg.Watcher.Id, out var pidSet)) { pidSet.Remove(msg.Watchee); if (pidSet.Count == 0) { _watched[msg.Watcher.Id] = null; } } var w = new Unwatch(msg.Watcher); Remote.SendMessage(msg.Watchee, w, -1); break; } case RemoteWatch msg: { if (_watched.TryGetValue(msg.Watcher.Id, out var pidSet)) { pidSet.Add(msg.Watchee); } else { _watched[msg.Watcher.Id] = new FastSet <PID> { msg.Watchee }; } var w = new Watch(msg.Watcher); Remote.SendMessage(msg.Watchee, w, -1); break; } case Stopped _: { _logger.LogDebug("Stopped EndpointWatcher"); break; } } return(Actor.Done); }
public void ConnectionTerminated(ClusterInbounConnection connection) { Terminated?.Invoke(this, new ClusterConnectionEventArgs(connection)); }
public void Terminate() { Terminated?.Invoke(this); End(); }
/// <inheritdoc /> public virtual void Terminate() { IsTerminated = true; Terminated?.Invoke(this, CurrentStatus); }
private void Process_Terminated(int exitCode) { logger.Info($"Application instance has terminated with exit code {exitCode}."); FinalizeEvents(); Terminated?.Invoke(Id); }
private void Handle(Terminated m) { // This function should be used under test environment only. Handle(new ClusterActorDiscoveryMessage.ActorDown(m.ActorRef, null)); }
private void ConnectionTerminatedCallback(HeliosConnectionException reason, IConnection closedchannel) { Terminated?.Invoke(reason, closedchannel); }
private void ReceiveTerminated(Terminated terminated) { }
/// <summary> /// Terminates the session. /// </summary> private void HandleTerminate() { Terminated?.Invoke(this, EventArgs.Empty); }
/// <summary> /// Handles a Terminated message. /// </summary> /// <param name="message">The message.</param> public virtual void HandleTerminationMessage(Terminated message) { }
/// <summary> /// Debugger has disconnected. /// </summary> protected override void OnConnectionLost() { base.OnConnectionLost(); Terminated.Fire(this); }
public WrappedTerminated(Terminated terminated) { _terminated = terminated; }
protected virtual Boolean Terminate(Terminated message) { Logger.Warning("DomainService of Type={0}, and Id={1}; has terminated.", typeof(TDomainService).PrettyPrint(), message.ActorRef.Path.Name); Context.Unwatch(message.ActorRef); return(true); }
/// <summary> /// Overrides this method if want to handle behavior when the application is terminated. /// If base.OnTerminate() is not called, the event 'Terminated' will not be emitted. /// </summary> /// <since_tizen> 3 </since_tizen> protected virtual void OnTerminate() { Terminated?.Invoke(this, EventArgs.Empty); }
public virtual void Terminate() => Terminated.Add(GetType());
private void HandleTerminated(Terminated msg) { Console.WriteLine($"Received Terminated message for {msg.Who.Address}: {msg.Who.Id}. Address terminated? {msg.AddressTerminated}"); _terminatedMessages.Add(msg); }
/// <summary> /// Handles the specified message. /// </summary> /// <param name="message">The message.</param> public virtual void Handle(Terminated message) { this.HandleTerminated(message); }
public bool isSSTerminated(Terminated message) { return(validSSWithSentReduceResults.Keys.Contains(message.ActorRef)); }
public WrappedTerminated(Terminated t) { T = t; }
/// <summary> /// Invokes Terminated event /// </summary> public void Terminate() { Terminated?.Invoke(this, EventArgs.Empty); }
public void Handle(Terminated message) { //remove terminated actor from hashlist _selfDBScheduledActor.Tell(new ClientDisconnectRequest(message.ActorRef)); }
protected virtual bool Terminate(Terminated message) { Logger.Warning($"{GetType().PrettyPrint()}: {message.ActorRef.Path} has terminated."); Context.Unwatch(message.ActorRef); return(true); }
private void Process_Exited(object sender, EventArgs e) { Terminated?.Invoke(this, forcedKill); }