Class/Object

com.github.trex_paxos

BaseDriver

Related Docs: object BaseDriver | package trex_paxos

Permalink

abstract class BaseDriver extends Actor with ActorLogging

Driver baseclass logic forwards messages to a trex cluster switching nodes until it finds the leader. The driver coverts the application command value into a byte array ready to journal on the server.

FIXME we retry on timeout yet we don't know if the command happened on a timeout and whether it is safe to retry we should have a map of what client messages types are known safe to retry (e.g. read-only) and only retry those.

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

Instance Constructors

  1. new BaseDriver(requestTimeout: Timeout, maxAttempts: Int)

    Permalink

    requestTimeout

    Timeout on individual requests.

    maxAttempts

    The maximum number of timeout retry attempts on any message.

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

Abstract Value Members

  1. abstract def clusterSize: Int

    Permalink

    Returns the current cluster size.

    Returns the current cluster size.

    Attributes
    protected
  2. abstract 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.

    Attributes
    protected

Concrete 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. def aroundPostRestart(reason: Throwable): Unit

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

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

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

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

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

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  11. implicit val context: ActorContext

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

    Permalink
  13. final def eq(arg0: AnyRef): Boolean

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

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

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

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

    Permalink
  18. def hashCode(): Int

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

    Permalink
  20. def incrementAndGetRequestId(): Long

    Permalink
  21. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  22. 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
  23. def log: LoggingAdapter

    Permalink
    Definition Classes
    ActorLogging
  24. final def ne(arg0: AnyRef): Boolean

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

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

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

    Permalink

    override for tests

  28. def postRestart(reason: Throwable): Unit

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

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

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

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

    Permalink
    Definition Classes
    BaseDriver → Actor
  33. def resend(out: Request): Unit

    Permalink
  34. implicit final val self: ActorRef

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

    Permalink
    Definition Classes
    Actor
  36. def supervisorStrategy: SupervisorStrategy

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

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

    Permalink
    Definition Classes
    AnyRef
  39. val timeoutMillis: Long

    Permalink
  40. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  41. 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.

  42. def unhandled(message: Any): Unit

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

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

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

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

Inherited from ActorLogging

Inherited from Actor

Inherited from AnyRef

Inherited from Any

Ungrouped