Class/Object

com.github.trex_paxos

DynamicClusterDriver

Related Docs: object DynamicClusterDriver | package trex_paxos

Permalink

class DynamicClusterDriver extends BaseDriver with ActorLogging

A concrete driver which uses akka.tcp to send messages. FIXME Note akka documentation says that akka.tcp is not firewall friendly.

Linear Supertypes
BaseDriver, ActorLogging, Actor, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. DynamicClusterDriver
  2. BaseDriver
  3. ActorLogging
  4. Actor
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new DynamicClusterDriver(timeout: Timeout, maxAttempts: Int)

    Permalink

    timeout

    The client timeout. It is recommended that this is significantly longer than the cluster failover timeout.

    maxAttempts

    The number of retries before the driver fails. Should be set greater or equal to the max cluster size.

Type Members

  1. type Receive = PartialFunction[Any, Unit]

    Permalink
    Definition Classes
    Actor
  2. case class Request(timeoutTime: Long, client: ActorRef, command: CommandValue, attempt: Int) extends Product with Serializable

    Permalink
    Definition Classes
    BaseDriver

Value Members

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. object CheckMembership extends Product with Serializable

    Permalink
  5. def aroundPostRestart(reason: Throwable): Unit

    Permalink
    Attributes
    protected[akka]
    Definition Classes
    Actor
  6. def aroundPostStop(): Unit

    Permalink
    Attributes
    protected[akka]
    Definition Classes
    Actor
  7. def aroundPreRestart(reason: Throwable, message: Option[Any]): Unit

    Permalink
    Attributes
    protected[akka]
    Definition Classes
    Actor
  8. def aroundPreStart(): Unit

    Permalink
    Attributes
    protected[akka]
    Definition Classes
    Actor
  9. def aroundReceive(receive: akka.actor.Actor.Receive, msg: Any): Unit

    Permalink
    Attributes
    protected[akka]
    Definition Classes
    Actor
  10. final def asInstanceOf[T0]: T0

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  12. def clusterSize: Int

    Permalink

    Returns the current cluster size.

    Returns the current cluster size.

    Attributes
    protected
    Definition Classes
    DynamicClusterDriverBaseDriver
  13. implicit val context: ActorContext

    Permalink
    Definition Classes
    Actor
  14. def drop(request: Request): Unit

    Permalink
    Definition Classes
    BaseDriver
  15. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  17. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  18. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  19. def getSerializer(clazz: Class[_]): Serializer

    Permalink
    Definition Classes
    BaseDriver
  20. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  21. def hold(request: Request): Unit

    Permalink
    Definition Classes
    BaseDriver
  22. def incrementAndGetRequestId(): Long

    Permalink
    Definition Classes
    BaseDriver
  23. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  24. var leaderCounter: Long

    Permalink

    This counter modulo the cluster size is used to pick a member of the cluster to send leader messages.

    This counter modulo the cluster size is used to pick a member of the cluster to send leader messages. If we get back a response that the node isn't the leader the driver will increment the counter to try the next node.

    Attributes
    protected
    Definition Classes
    BaseDriver
  25. def localReceive: Receive

    Permalink
  26. def log: LoggingAdapter

    Permalink
    Definition Classes
    ActorLogging
  27. var membership: Option[CommittedMembership]

    Permalink
  28. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  31. def now(): Long

    Permalink

    override for tests

    override for tests

    Definition Classes
    BaseDriver
  32. def postRestart(reason: Throwable): Unit

    Permalink
    Definition Classes
    Actor
    Annotations
    @throws( classOf[java.lang.Exception] )
  33. def postStop(): Unit

    Permalink
    Definition Classes
    Actor
    Annotations
    @throws( classOf[java.lang.Exception] )
  34. def preRestart(reason: Throwable, message: Option[Any]): Unit

    Permalink
    Definition Classes
    Actor
    Annotations
    @throws( classOf[java.lang.Exception] )
  35. def preStart(): Unit

    Permalink
    Definition Classes
    Actor
    Annotations
    @throws( classOf[java.lang.Exception] )
  36. def receive: Receive

    Permalink
    Definition Classes
    DynamicClusterDriverBaseDriver → Actor
  37. def resend(out: Request): Unit

    Permalink
    Definition Classes
    BaseDriver
  38. def resolveActorSelectorForIndex(memberIndex: Int): Option[ActorSelection]

    Permalink

    Returns an ActorSelection mapped to the passed cluster membership index.

    Returns an ActorSelection mapped to the passed cluster membership index. This is abstract so that there can be a subclass which knows about cluster membership changes. Counter can be incremented to round-robin to find the new stable leader.

    memberIndex

    The index of the node in the cluster to resolve. Usually computed as counter%size

    Attributes
    protected
    Definition Classes
    DynamicClusterDriverBaseDriver
  39. implicit final val self: ActorRef

    Permalink
    Definition Classes
    Actor
  40. final def sender(): ActorRef

    Permalink
    Definition Classes
    Actor
  41. def supervisorStrategy: SupervisorStrategy

    Permalink
    Definition Classes
    Actor
  42. def swap(out: Request, in: Request): Unit

    Permalink
    Definition Classes
    BaseDriver
  43. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  44. val timeoutMillis: Long

    Permalink
    Definition Classes
    BaseDriver
  45. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  46. def transmit(counter: Long, request: Request): Unit

    Permalink

    Send a message to the cluster

    Send a message to the cluster

    counter

    A counter which is used to pick a node to transmit to.

    request

    A request to send.

    Definition Classes
    BaseDriver
  47. def unhandled(message: Any): Unit

    Permalink
    Definition Classes
    Actor
  48. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from BaseDriver

Inherited from ActorLogging

Inherited from Actor

Inherited from AnyRef

Inherited from Any

Ungrouped