Class/Object

akka.cluster.fastfailover

FastFailoverHelper

Related Docs: object FastFailoverHelper | package fastfailover

Permalink

class FastFailoverHelper extends AnyRef

Helper for actors that execute fast failover operation attempts.

This class can either be instantiated as is, or extended to override the FastFailoverHelper#fastFailoverSettings or FastFailoverHelper#shouldHoldUntilNoOperation methods.

The FastFailoverHelper#handleFastFailover (Scala Actor), FastFailoverHelper#handleFastFailoverReceive (Java AbstractActor) methods can be used to handle fast failover envelopes and heartbeats.

Linear Supertypes
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. FastFailoverHelper
  2. AnyRef
  3. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new FastFailoverHelper(context: ActorContext)

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. def +(other: String): String

    Permalink
    Implicit information
    This member is added by an implicit conversion from FastFailoverHelper to any2stringadd[FastFailoverHelper] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (FastFailoverHelper, B)

    Permalink
    Implicit information
    This member is added by an implicit conversion from FastFailoverHelper to ArrowAssoc[FastFailoverHelper] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. final def drainHeldMessages(): Unit

    Permalink

    Drain the held messages buffer.

    Drain the held messages buffer.

    This is offered primarily to allow held messages to not be lost across restarts, and should be invoked from the preRestart callback on an actor. It can also be used to manually drain the buffer at any time, but note that the buffer will automatically be drained once there are no outstanding operations.

  9. def ensuring(cond: (FastFailoverHelper) ⇒ Boolean, msg: ⇒ Any): FastFailoverHelper

    Permalink
    Implicit information
    This member is added by an implicit conversion from FastFailoverHelper to Ensuring[FastFailoverHelper] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  10. def ensuring(cond: (FastFailoverHelper) ⇒ Boolean): FastFailoverHelper

    Permalink
    Implicit information
    This member is added by an implicit conversion from FastFailoverHelper to Ensuring[FastFailoverHelper] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  11. def ensuring(cond: Boolean, msg: ⇒ Any): FastFailoverHelper

    Permalink
    Implicit information
    This member is added by an implicit conversion from FastFailoverHelper to Ensuring[FastFailoverHelper] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  12. def ensuring(cond: Boolean): FastFailoverHelper

    Permalink
    Implicit information
    This member is added by an implicit conversion from FastFailoverHelper to Ensuring[FastFailoverHelper] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  13. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  14. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  15. def fastFailoverSettings: FastFailoverSettings

    Permalink

    Fast failover settings.

    Fast failover settings.

    Override if you want to supply your own custom settings.

  16. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  17. def formatted(fmtstr: String): String

    Permalink
    Implicit information
    This member is added by an implicit conversion from FastFailoverHelper to StringFormat[FastFailoverHelper] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  18. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  19. final def handleFastFailover: Receive

    Permalink

    Partial function to handle fast failover messages.

    Partial function to handle fast failover messages.

    Mix this in with your receive logic, generally it should be mixed in first, in order to be able to buffer messages to hold.

    For example:

    class MyActor extends Actor {
      val helper = FastFailoverHelper(context)
      override def receive = helper.handleFastFailover.orElse {
        case ...
      }
    }
  20. final def handleFastFailoverReceive: Receive

    Permalink

    Java API: AbstractActor receive, for composition within AbstractActor support.

    Java API: AbstractActor receive, for composition within AbstractActor support.

    For example:

    public class MyActor extends AbstractActor {
      private final FastFailoverHelper helper = new FastFailoverHelper(context());
    
      public Receive createReceive() {
        return helper.handleFastFailoverReceive.orElse(
          receiveBuilder()
            .match(...)
            .build()
        );
      };
  21. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  22. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  23. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  24. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  25. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  26. def shouldHoldUntilNoOperation(msg: Any): Boolean

    Permalink

    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.

    If overriding this function to return true, be sure to implement the actors preRestart function to invoke FastFailoverHelper#drainHeldMessages, otherwise the held messages will be dropped.

  27. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  28. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  29. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  32. def [B](y: B): (FastFailoverHelper, B)

    Permalink
    Implicit information
    This member is added by an implicit conversion from FastFailoverHelper to ArrowAssoc[FastFailoverHelper] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd from FastFailoverHelper to any2stringadd[FastFailoverHelper]

Inherited by implicit conversion StringFormat from FastFailoverHelper to StringFormat[FastFailoverHelper]

Inherited by implicit conversion Ensuring from FastFailoverHelper to Ensuring[FastFailoverHelper]

Inherited by implicit conversion ArrowAssoc from FastFailoverHelper to ArrowAssoc[FastFailoverHelper]

Ungrouped