Drain the held messages buffer.
Drain the held messages buffer.
This is invoked when the actor is restarted to ensure any held messages are not lost. If this behaviour is not desired, and instead the messages should be dropped, then this method can be overridden to do nothing.
Fast failover settings.
Fast failover settings.
Override if you want to supply your own custom settings.
Any message that this returns true for will be held by the fast failover support as long as there is an outstanding fast failover message to process.
Any message that this returns true for will be held by the fast failover support as long as there is an outstanding fast failover message to process.
This is useful for implementing graceful shutdown, to block the processing of shutdown messages until all fast failover operations have completed. Note that if more operations continue to arrive, such that this actor never ends up with no active operations, then the messages could end up being held indefinitely.
Messages that get held must be tolerant to reordering, since other messages may arrive during the time that the messages are being held, which will overtake the held messages.
Java API: Support for implementing fast failover with an abstract actor.
Simply extend this class rather than akka.actor.AbstractActor.
Note that this is incompatible with any other abstract class due to Java's lack of multiple inheritance support. If you need to extend a different class, you should use FastFailoverHelper instead.