Trait

curiodb

CommandProcessing

Related Doc: package curiodb

Permalink

trait CommandProcessing extends Actor

Actor trait containing behavior for dealing with a Command - it contains a command variable that the class should initially set upon receiving it via the actor's receive method. Used by anything that a Command passes through, such as all ClientNode, KeyNode, Node, and Aggregate actors.

Linear Supertypes
Actor, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. CommandProcessing
  2. Actor
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Type Members

  1. type CommandRunner = PartialFunction[String, Any]

    Permalink

    Signature for the partial function CommandRunner that actually handles each command.

    Signature for the partial function CommandRunner that actually handles each command. Every Node must implement the "run" method of this type (this requirement is actually codified in the base Node class). It takes a case statement mapping command names to the code that handles them - typically handled inline, or via a method if more complex. The result will then be sent back to the calling ClientNode, and converted into a Redis response before being sent back to the client socket. One special case is the handler returning Unit, in which case no response is sent back, in which case it's up to the handling code to manually send a response back to the client node. A common example of this is all of the aggregation commands, which need to coordinate with multiple nodes before calculating a response. But the bulk of commands are simple one-liners directly returning a response.

  2. type Receive = PartialFunction[Any, Unit]

    Permalink
    Definition Classes
    Actor

Abstract Value Members

  1. abstract def receive: akka.actor.Actor.Receive

    Permalink
    Definition Classes
    Actor

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 aggregate(props: Props): Unit

    Permalink

    Shortcut for creating Aggregate actors.

  5. def args: Seq[String]

    Permalink

    Shortcut to the args of the current command.

  6. def aroundPostRestart(reason: Throwable): Unit

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

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

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

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

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

    Permalink
    Definition Classes
    Any
  12. def bounds(from: Int, to: Int, size: Int): (Int, Int)

    Permalink

    Utility for handling boundary args that wrap around ends of sequences and count backwards when negative.

  13. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  14. var command: Command

    Permalink

    The current command - normally will be set when a Command arrives via the actor's receive method.

  15. val commandTimeout: Int

    Permalink

    Timeout for a single command.

    Timeout for a single command. Used by ClientNode to schedule timeout handlers for commands, and also in ScriptRunner to determine what the timeout for a Lua script should be.

  16. implicit val context: ActorContext

    Permalink
    Definition Classes
    Actor
  17. val debug: Boolean

    Permalink

    Flag that enables detailed command debugging.

  18. def durationSetting(name: String): Int

    Permalink

    Retrieves a duration config setting as milliseconds, and handles the value not being a duration value, so we can do something like set it to "off", in which case we default to 0.

  19. final def eq(arg0: AnyRef): Boolean

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

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  23. def hashCode(): Int

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

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

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

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

    Permalink
    Definition Classes
    AnyRef
  28. def numberToString(n: Any): String

    Permalink

    Utility for dropping extraneous zeros from floats when converting to strings, for consistency with Redis' INCRBYFLOAT/HINCRBYFLOAT commands and sorted set scores.

  29. def pattern(values: Iterable[String], pattern: String): Iterable[String]

    Permalink

    Utility for glob-style filtering.

  30. def postRestart(reason: Throwable): Unit

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

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

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

    Permalink
    Definition Classes
    Actor
    Annotations
    @throws( classOf[java.lang.Exception] )
  34. def randomItem(iterable: Iterable[String]): String

    Permalink

    Utility for selecting a random item.

  35. def respond(response: Any): Unit

    Permalink

    Sends a Response (usually the result of a command) back to the command's destination (usually a ClientNode sending a Command).

  36. def route(input: Seq[Any], client: Option[ActorRef] = None): Unit

    Permalink

    Shortcut route method for sending command input without a constructed Command instance, using the state of the current command (eg: db, clientID).

  37. def route(command: Command): Unit

    Permalink

    Sends an unrouted Command to one or more KeyNode actors, either by routing by key, or broadcasting to all.

  38. def scan(values: Iterable[String]): Seq[String]

    Permalink

    Utility for scan-style commands, namely SCAN/SSCAN/HSCAN/ZSCAN.

  39. implicit final val self: ActorRef

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

    Permalink
    Definition Classes
    Actor
  41. def slice[T](value: Seq[T]): Seq[T]

    Permalink

    Utility for slicing sequences, for commands such as SLICE, GETRANGE, LRANGE, etc.

  42. def stop(): Unit

    Permalink

    Stops the actor - we define this shortcut to give subclassing traits the chance to override it and inject extra shutdown behavior that concrete actors need not know about.

    Stops the actor - we define this shortcut to give subclassing traits the chance to override it and inject extra shutdown behavior that concrete actors need not know about. Note we wrap context.stop with Try here since it may be called twice due to transaction timeouts.

  43. def supervisorStrategy: SupervisorStrategy

    Permalink
    Definition Classes
    Actor
  44. final def synchronized[T0](arg0: ⇒ T0): T0

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

    Permalink
    Definition Classes
    AnyRef → Any
  46. def unhandled(message: Any): Unit

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

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

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

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

Inherited from Actor

Inherited from AnyRef

Inherited from Any

Ungrouped