/// <summary> /// Overridden callback. Prepends all messages in the stash to the mailbox, /// clears the stash. Must be called when overriding this method; otherwise stashed messages won't be /// propagated to DeadLetters when actor stops. /// </summary> protected override void PostStop() { try { CurrentStash.UnstashAll(); } finally { base.PostStop(); } }
/// <summary> /// Overridden callback. Prepends all messages in the stash to the mailbox, /// clears the stash, stops all children, and invokes the PostStop callback. /// </summary> protected override void PreRestart(Exception reason, object message) { try { CurrentStash.UnstashAll(); } finally { base.PreRestart(reason, message); } }
/// <summary> /// Unstashes all messages selected by the predicate function /// </summary> public void UnstashAll(Func <Envelope, bool> predicate) { CurrentStash.UnstashAll(predicate); }
/// <summary> /// Unstashes all messages /// </summary> public void UnstashAll() { CurrentStash.UnstashAll(); }