Class

curiodb

JsonClientNode

Related Doc: package curiodb

Permalink

abstract class JsonClientNode extends ClientNode

Base ClientNode for HTTP and WebSocket ClientNode actors - provides methods for converting to/from JSON, and cleanup on disconnect.

Linear Supertypes
ClientNode, ScriptingClient, Scripting, AggregateCommands, PubSubClient, Node[Null], ActorLogging, CommandProcessing, PersistentActor, Eventsourced, PersistenceRecovery, PersistenceIdentity, StashFactory, Stash, RequiresMessageQueue[DequeBasedMessageQueueSemantics], UnrestrictedStash, StashSupport, Snapshotter, Actor, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. JsonClientNode
  2. ClientNode
  3. ScriptingClient
  4. Scripting
  5. AggregateCommands
  6. PubSubClient
  7. Node
  8. ActorLogging
  9. CommandProcessing
  10. PersistentActor
  11. Eventsourced
  12. PersistenceRecovery
  13. PersistenceIdentity
  14. StashFactory
  15. Stash
  16. RequiresMessageQueue
  17. UnrestrictedStash
  18. StashSupport
  19. Snapshotter
  20. Actor
  21. AnyRef
  22. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Instance Constructors

  1. new JsonClientNode()

    Permalink

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.

    Definition Classes
    CommandProcessing
  2. type Receive = PartialFunction[Any, Unit]

    Permalink
    Definition Classes
    Actor

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. val MISSING_ARG: String

    Permalink
  5. def abortTransaction(response: Any): Unit

    Permalink

    Cleanup performed whenever MULTI/EXEC is aborted, either explicitly via DISCARD or implicitly via an error.

    Cleanup performed whenever MULTI/EXEC is aborted, either explicitly via DISCARD or implicitly via an error.

    Definition Classes
    ClientNode
  6. def aggregate(props: Props): Unit

    Permalink

    Shortcut for creating Aggregate actors.

    Shortcut for creating Aggregate actors.

    Definition Classes
    CommandProcessing
  7. def args: Seq[String]

    Permalink

    Shortcut to the args of the current command.

    Shortcut to the args of the current command.

    Definition Classes
    CommandProcessing
  8. def aroundPostRestart(reason: Throwable): Unit

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

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

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

    Permalink
    Attributes
    protected[akka]
    Definition Classes
    Eventsourced → Actor
  12. def aroundReceive(receive: Receive, message: Any): Unit

    Permalink
    Attributes
    protected[akka]
    Definition Classes
    Eventsourced → Actor
  13. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  14. def awaitTransactionAcks(commandName: String, onComplete: ⇒ Unit): Unit

    Permalink

    Handles transaction management, specifically broadcasting either _MULTI or _EXEC to KeyNode (and indirectly, Node) actors, and then running the next stage on completion of receiving all expected replies.

    Handles transaction management, specifically broadcasting either _MULTI or _EXEC to KeyNode (and indirectly, Node) actors, and then running the next stage on completion of receiving all expected replies. Following are the three stages of a transaction:

    1) Send _MULTI and await all replies confirming we can begin 2) Send actual commands and await responses from Node actors 3) Send _EXEC and await all replies confirming we have committed

    The awaitTransactionAcks method therefore handles steps 1 and 3 (step 2 is handled by awaitTransactionResponses). In each case, we perform the same brodcast optimization found throughout Aggregation.scala, where we send all keys to all KeyNode actors, to reduce the number of messages sent, at the cost of redundant keys. When we broadcast all keys for a awaitTransactionAcks step, we need all KeyNode and relevant Node actors to confirm they are ready. This is managed by initially calculating the number of keys being transmitted (total keys * total KeyNode actors), and awaiting TransactionAck replies which each contain a keyCount. KeyNode actors will return a keyCount for the number of *invalid* keys it recevies, while passing on _MULTI and _EXEC to the Node actors it correctly received keys for - those Node actors should then return a keyCount of 1 in their TransactionAck replies.

    Once the ClientNode has received TransactionAck.keyCount values matching the total number of keys, it proceeds with the next step. For _MULTI, this means sending the actual queued commands via awaitTransactionResponses. For _EXEC, this means sending the collected Response messages back to the external client.

    Definition Classes
    ClientNode
  15. def awaitTransactionResponses(): Receive

    Permalink

    Middle phase of a transaction where we receive and collect Response messages for queued commands - once they're all received, we construct the final response, switch state back to the default receiveCommand, and send the final response back to self to be received as a regular Response.

    Middle phase of a transaction where we receive and collect Response messages for queued commands - once they're all received, we construct the final response, switch state back to the default receiveCommand, and send the final response back to self to be received as a regular Response. Here we also check for error replies if we're configured to abort transactions on errors, and if any are received, we abort the transaction with _DISCARD, and set all responses other than the error to null, so that clients can determine which command caused the error.

    Definition Classes
    ClientNode
  16. def beginTransaction(): Any

    Permalink

    Moves the current value into a transaction for the current command's client ID.

    Moves the current value into a transaction for the current command's client ID. This can occur at the start of a transaction (eg _MULTI command), or if the Node actor is created inside a transaction, in which case we use emptyValue, which handles the edge case of a Node existing, going into a transaction, being marked deleted, then being recreated.

    Definition Classes
    Node
  17. 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.

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

    Definition Classes
    CommandProcessing
  18. lazy val channels: Set[String]

    Permalink

    Channels subscribed to.

    Channels subscribed to.

    Definition Classes
    PubSubClient
  19. var client: Option[ActorRef]

    Permalink

    ActorRef we send final responses back to.

    ActorRef we send final responses back to.

    Definition Classes
    ClientNode
  20. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  21. def cloneValue: Null

    Permalink

    Clones the value for use in a new transaction.

    Clones the value for use in a new transaction. Node subclasses that work on mutable values must override, typically by calling value.clone, otherwise we just default to the current value.

    Definition Classes
    Node
  22. def closeTransaction(clientId: String = command.clientId, committing: Boolean = false): Option[Null]

    Permalink

    Removes and returns the transaction value.

    Removes and returns the transaction value. Expected to run twice per transaction - once when commitTransaction is called when _EXEC is received, and once when the transaction times out. We also check for the lack of a committed value, which indicates that the actor was created in a transaction

    Definition Classes
    Node
  23. var command: Command

    Permalink

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

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

    Definition Classes
    CommandProcessing
  24. 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.

    Definition Classes
    CommandProcessing
  25. var commands: LinkedHashMap[String, Command]

    Permalink

    Ordered map of commands that have been received - used to order responses received when multiple commands are in play, eg MULTI/EXEC.

    Ordered map of commands that have been received - used to order responses received when multiple commands are in play, eg MULTI/EXEC.

    Definition Classes
    ClientNode
  26. def commitTransaction(): Any

    Permalink

    Removes the transaction value and writes it back into the main value.

    Removes the transaction value and writes it back into the main value. This could be called after the transaction has timed out, so we only move the value if we're still in a transaction.

    Definition Classes
    Node
  27. def compileScript(uncompiled: String, onSuccess: (Prototype) ⇒ Any): Any

    Permalink

    Compiles a Lua script given by a command, and runs a success function when successful - storing it in the case of LOAD SCRIPT on a KeyNode, or running it in the case of EVAL on a CLientNode.

    Compiles a Lua script given by a command, and runs a success function when successful - storing it in the case of LOAD SCRIPT on a KeyNode, or running it in the case of EVAL on a CLientNode.

    Definition Classes
    Scripting
  28. implicit val context: ActorContext

    Permalink
    Definition Classes
    Actor
  29. var db: String

    Permalink

    The current DB name - default, or one provided by "SELECT".

    The current DB name - default, or one provided by "SELECT".

    Definition Classes
    ClientNode
  30. val debug: Boolean

    Permalink

    Flag that enables detailed command debugging.

    Flag that enables detailed command debugging.

    Definition Classes
    CommandProcessing
  31. def deferAsync[A](event: A)(handler: (A) ⇒ Unit): Unit

    Permalink
    Definition Classes
    Eventsourced
  32. def deleteMessages(toSequenceNr: Long): Unit

    Permalink
    Definition Classes
    Eventsourced
  33. def deleteOldSnapshots(stopping: Boolean = false): Unit

    Permalink

    Deletes old snapshots after a new one is saved.

    Deletes old snapshots after a new one is saved.

    Definition Classes
    Node
  34. def deleteSnapshot(sequenceNr: Long): Unit

    Permalink
    Definition Classes
    Snapshotter
  35. def deleteSnapshots(criteria: SnapshotSelectionCriteria): Unit

    Permalink
    Definition Classes
    Snapshotter
  36. lazy val digest: MessageDigest

    Permalink
    Definition Classes
    ScriptingClient
  37. val disabled: Set[String]

    Permalink

    List of disabled commands.

    List of disabled commands.

    Definition Classes
    ClientNode
  38. 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.

    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.

    Definition Classes
    CommandProcessing
  39. def emptyValue: Null

    Permalink

    Returns the default value for the type of Node, which subclasses must override.

    Returns the default value for the type of Node, which subclasses must override. Used to set the initial value when a Node is first created, and also in the edge case of resetting a transaction's value if within a transaction, the Node is marked deleted, and then recreated.

    Definition Classes
    ClientNodeNode
  40. def endTransaction(): Unit

    Permalink

    Sends the final response once a transaction has ended, which in the case of MULTI/EXEC, is a sequence of all the collected responses, ordered by their corresponding commands.

    Sends the final response once a transaction has ended, which in the case of MULTI/EXEC, is a sequence of all the collected responses, ordered by their corresponding commands.

    Definition Classes
    ClientNode
  41. final def eq(arg0: AnyRef): Boolean

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

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  44. def formatResponse(response: Any): Any

    Permalink

    Hook for subclasses to override and convert a response value into an appropriate format.

    Hook for subclasses to override and convert a response value into an appropriate format.

    Definition Classes
    ClientNode
  45. def fromJson(entity: String): Option[Seq[String]]

    Permalink

    Parses a JSON arg list from a HttpRequest or WebSocket TextFrame.

  46. final def getClass(): Class[_]

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

    Permalink
    Definition Classes
    AnyRef → Any
  48. lazy val id: String

    Permalink
    Definition Classes
    ClientNode
  49. def inTransaction: Boolean

    Permalink

    Checks if the current Command is in a transaction.

    Checks if the current Command is in a transaction.

    Definition Classes
    Node
  50. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  51. val isolationLevel: String

    Permalink

    Transaction isolation level: "repeatable" reads, read "committed", or read "uncommitted".

    Transaction isolation level: "repeatable" reads, read "committed", or read "uncommitted".

    Definition Classes
    Node
  52. def journalPluginId: String

    Permalink
    Definition Classes
    PersistenceIdentity
  53. def jsonResult(response: Any): String

    Permalink

    Constructs the final JSON object from a Response payload.

  54. def lastSequenceNr: Long

    Permalink
    Definition Classes
    Eventsourced
  55. var lastSnapshot: Option[SnapshotMetadata]

    Permalink

    The most recently saved snapshot.

    The most recently saved snapshot. We store it on save and recover, so that we can delete it (and any earlier snapshots) each time we successfully save a new snapshot.

    Definition Classes
    Node
  56. def loadSnapshot(persistenceId: String, criteria: SnapshotSelectionCriteria, toSequenceNr: Long): Unit

    Permalink
    Definition Classes
    Snapshotter
  57. def log: LoggingAdapter

    Permalink
    Definition Classes
    ActorLogging
  58. def multi: Boolean

    Permalink

    Determines if a transaction is triggered via MULTI.

    Determines if a transaction is triggered via MULTI.

    Definition Classes
    ClientNode
  59. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  62. 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.

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

    Definition Classes
    CommandProcessing
  63. def onPersistFailure(cause: Throwable, event: Any, seqNr: Long): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Eventsourced
  64. def onPersistRejected(cause: Throwable, event: Any, seqNr: Long): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Eventsourced
  65. def onRecoveryFailure(cause: Throwable, event: Option[Any]): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Eventsourced
  66. def pattern(values: Iterable[String], pattern: String): Iterable[String]

    Permalink

    Utility for glob-style filtering.

    Utility for glob-style filtering.

    Definition Classes
    CommandProcessing
  67. lazy val patterns: Set[String]

    Permalink

    Patterns subscribed to.

    Patterns subscribed to.

    Definition Classes
    PubSubClient
  68. def persist[A](event: A)(handler: (A) ⇒ Unit): Unit

    Permalink
    Definition Classes
    Eventsourced
  69. val persistAfter: Int

    Permalink

    Stores the duration which controls the minimum delay between receiving a command that writes, and persisting the actual value written.

    Stores the duration which controls the minimum delay between receiving a command that writes, and persisting the actual value written.

    Definition Classes
    Node
  70. def persistAll[A](events: Seq[A])(handler: (A) ⇒ Unit): Unit

    Permalink
    Definition Classes
    Eventsourced
  71. def persistAllAsync[A](events: Seq[A])(handler: (A) ⇒ Unit): Unit

    Permalink
    Definition Classes
    Eventsourced
  72. def persistAsync[A](event: A)(handler: (A) ⇒ Unit): Unit

    Permalink
    Definition Classes
    Eventsourced
  73. def persistenceId: String

    Permalink
    Definition Classes
    Node → PersistenceIdentity
  74. var persisting: Boolean

    Permalink

    Boolean representing whether we've scheduled an internal Persist message, so that it only occurs once at a time according to the duration configured by the curiodb.persist-after setting.

    Boolean representing whether we've scheduled an internal Persist message, so that it only occurs once at a time according to the duration configured by the curiodb.persist-after setting.

    Definition Classes
    Node
  75. def postRestart(reason: Throwable): Unit

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

    Permalink
    Definition Classes
    UnrestrictedStash → Actor
  77. def preRestart(reason: Throwable, message: Option[Any]): Unit

    Permalink
    Definition Classes
    UnrestrictedStash → Actor
  78. def preStart(): Unit

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

    Permalink

    Utility for selecting a random item.

    Utility for selecting a random item.

    Definition Classes
    CommandProcessing
  80. def receive: Receive

    Permalink
    Definition Classes
    Node → PersistentActor → Actor
  81. def receiveCommand: Receive

    Permalink

    Receives final Response, which is then formatted per ClientNode subclass, and sent back to the original actor that provided the input for the Command.

    Receives final Response, which is then formatted per ClientNode subclass, and sent back to the original actor that provided the input for the Command.

    Definition Classes
    JsonClientNodeClientNodeNode → Eventsourced
  82. def receivePubSub: Receive

    Permalink

    Receive for PubSubClient, which is given a distinct name, so that ClientNode can compose together multiple Receive methods to form its own.

    Receive for PubSubClient, which is given a distinct name, so that ClientNode can compose together multiple Receive methods to form its own. Here we provide handling for PubSubEvent messages, which allow us to inform the client of the number of subscriptions it holds when subscribing or unsubscribing.

    Definition Classes
    PubSubClient
  83. def receiveRecover: Receive

    Permalink

    Restore the Node actor's value on startup.

    Restore the Node actor's value on startup.

    Definition Classes
    Node → Eventsourced
  84. def recovery: Recovery

    Permalink
    Definition Classes
    PersistenceRecovery
  85. def recoveryFinished: Boolean

    Permalink
    Definition Classes
    Eventsourced
  86. def recoveryRunning: Boolean

    Permalink
    Definition Classes
    Eventsourced
  87. def rename(fromValue: Any, toCommand: String): Unit

    Permalink

    Handles the RENAME/RENAMENX commands for all node types.

    Handles the RENAME/RENAMENX commands for all node types. Each Node subclass is responsible for converting its value to something that can be used by the relevant command given - this command is typically implemented (and named) differently per node, and knows how to accept fromValue. Renaming is basically a delete, then create a new node, so we first delete ourselves (via the internal _DEL command), then pass the fromValue arg with the given command to what will be a newly created Node.

    Definition Classes
    Node
  88. 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).

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

    Definition Classes
    CommandProcessing
  89. def respondFinal(response: Any): Unit

    Permalink

    Sends a final response back to the original actor that provided the input for the Command.

    Sends a final response back to the original actor that provided the input for the Command.

    Definition Classes
    ClientNode
  90. var responses: Map[String, Response]

    Permalink

    Map of responses that have been received inside a transaction.

    Map of responses that have been received inside a transaction.

    Definition Classes
    ClientNode
  91. 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).

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

    Definition Classes
    CommandProcessing
  92. 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.

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

    Definition Classes
    CommandProcessing
  93. def routeWithTimeout(command: Command): Unit

    Permalink

    Routes the given Command instance, initializing its timeout event.

    Routes the given Command instance, initializing its timeout event.

    Definition Classes
    ClientNode
  94. def run: CommandRunner

    Permalink

    Abstract definition of each Node actor's CommandRunner that must be implemented.

    Abstract definition of each Node actor's CommandRunner that must be implemented. It's the partial function that matches a Command name to the code that runs it.

    Definition Classes
    ClientNodeNode
  95. def runAggregate: CommandRunner

    Permalink

    CommandRunner for AggregateCommands, which is given a distinct name, so that ClientNode can compose together multiple CommandRunner methods to form its own.

    CommandRunner for AggregateCommands, which is given a distinct name, so that ClientNode can compose together multiple CommandRunner methods to form its own.

    Definition Classes
    AggregateCommands
  96. def runForAnyNode: CommandRunner

    Permalink

    Alternate Receive handler for all Node actors - these are internal commands can run for any Node type, and are not validated in any way, nor are they configured in commands.conf.

    Alternate Receive handler for all Node actors - these are internal commands can run for any Node type, and are not validated in any way, nor are they configured in commands.conf. Currently used for transaction begin (_MULTI) and commit (_EXEC).

    When _MULTI is received and a transaction is beginning, we store the current value in the transaction map against the transaction's client ID. Subsequent commands within the transaction will then read from and write to the transaction map, until it's committed via the _EXEC command, at which point we copy the value from the transaction map back to the main value, and remove it from the transaction map.

    The transaction may also timeout which is scheduled when _MULTI is received. If this occurs and then _EXEC is received, we don't send acknowledgement back to the ClientNode, so it can then deal with its own timeout.

    Definition Classes
    Node
  97. def runPubSub: CommandRunner

    Permalink

    CommandRunner for PubSubClient, which is given a distinct name, so that ClientNode can compose together multiple CommandRunner methods to form its own.

    CommandRunner for PubSubClient, which is given a distinct name, so that ClientNode can compose together multiple CommandRunner methods to form its own.

    Definition Classes
    PubSubClient
  98. def runScript(compiled: Prototype): Unit

    Permalink

    Runs a compiled Lua script by constructing a temporary ScriptRunner actor, and sending it the orignal command received so that it can eventually reply to it directly.

    Runs a compiled Lua script by constructing a temporary ScriptRunner actor, and sending it the orignal command received so that it can eventually reply to it directly.

    Definition Classes
    Scripting
  99. def runScripting: CommandRunner

    Permalink

    CommandRunner for ScriptingClient, which is given a distinct name, so that ClientNode can compose together multiple CommandRunner methods to form its own.

    CommandRunner for ScriptingClient, which is given a distinct name, so that ClientNode can compose together multiple CommandRunner methods to form its own.

    Definition Classes
    ScriptingClient
  100. def save(): Unit

    Permalink

    As discussed above, saves a snapshot.

    As discussed above, saves a snapshot. If curiodb.persist-after is zero or less (which means every change must cause a snapshot to be saved), then just save a snapshot. Otherwise schedule the internal Persist message to save a snapshot, if none has already been scheduled, according to the value of the persisting var.

    Definition Classes
    Node
  101. def saveSnapshot(snapshot: Any): Unit

    Permalink
    Definition Classes
    Snapshotter
  102. def scan(values: Iterable[String]): Seq[String]

    Permalink

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

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

    Definition Classes
    CommandProcessing
  103. implicit final val self: ActorRef

    Permalink
    Definition Classes
    Actor
  104. def sendCommand(input: Seq[String], originalClientId: Option[String] = None): Unit

    Permalink

    Internal API for subclasses to send a command once they've received its full input.

    Internal API for subclasses to send a command once they've received its full input. Here we constructs a Command payload for the given input, validate it, and typically route it to the relevant actor, other than in the case of transactionKeys. In this case, we either buffer the commands if MULTI/EXEC is the reason for the transaction (Lua scripts also run a transaction), and then when committing (EXEC/EVAL/EVALSHA), we begin the transaction phase - see awaitTransactionAcks for more detail.

    Definition Classes
    ClientNode
  105. final def sender(): ActorRef

    Permalink
    Definition Classes
    Actor
  106. def sha1: String

    Permalink

    Constructs the SHA1 digest of a given script - this happens on the ClientNode so that we can leverage the routing normally used for keys when sending the script to a KeyNode to be stored.

    Constructs the SHA1 digest of a given script - this happens on the ClientNode so that we can leverage the routing normally used for keys when sending the script to a KeyNode to be stored.

    Definition Classes
    ScriptingClient
  107. def slice[T](value: Seq[T]): Seq[T]

    Permalink

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

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

    Definition Classes
    CommandProcessing
  108. def snapshotPluginId: String

    Permalink
    Definition Classes
    PersistenceIdentity
  109. def snapshotSequenceNr: Long

    Permalink
    Definition Classes
    Eventsourced → Snapshotter
  110. def snapshotterId: String

    Permalink
    Definition Classes
    Eventsourced → Snapshotter
  111. def sort(values: Iterable[String]): Any

    Permalink

    Handles the SORT command.

    Handles the SORT command. Defined here since it can be run against multiple Node types, namely ListNode, SetNode and SortedSetNode.

    Definition Classes
    Node
  112. def stash(): Unit

    Permalink
    Definition Classes
    StashSupport
  113. def stop(): Unit

    Permalink

    Here we override the stop method used by CommandProcessing, which allows us to inform the KeyNode actors holding subscriptions to our channels and patterns that we're unsubscribing.

    Here we override the stop method used by CommandProcessing, which allows us to inform the KeyNode actors holding subscriptions to our channels and patterns that we're unsubscribing.

    Definition Classes
    PubSubClientCommandProcessing
  114. var streaming: Boolean

    Permalink

    Flag used to mark the ClientNode as being in "streaming" mode, namely when a PubSub channel is subscribed to, and command timeouts should be bypassed.

    Flag used to mark the ClientNode as being in "streaming" mode, namely when a PubSub channel is subscribed to, and command timeouts should be bypassed.

    Definition Classes
    ClientNode
  115. def subscribeOrUnsubscribe(): Unit

    Permalink

    Handles all commands that subscribe or unsubsubscribe, namely SUBSCRIBE/UNSUBSCRIBE/PSUBSCRIBE/PUNSUBSCRIBE.

    Handles all commands that subscribe or unsubsubscribe, namely SUBSCRIBE/UNSUBSCRIBE/PSUBSCRIBE/PUNSUBSCRIBE.

    Definition Classes
    PubSubClient
  116. def supervisorStrategy: SupervisorStrategy

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

    Permalink
    Definition Classes
    AnyRef
  118. def toJson(response: Any): JsValue

    Permalink

    Converts a response to JSON - we need to deal with each type specifically so that spray-json knows what to do with it.

    Converts a response to JSON - we need to deal with each type specifically so that spray-json knows what to do with it. ErrorReply is omitted, since different actions are taken when errors are returned.

  119. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  120. val transactionAbortOnError: Boolean

    Permalink

    Should transactions abort if any of their commands receives an error response.

    Should transactions abort if any of their commands receives an error response.

    Definition Classes
    ClientNode
  121. var transactionError: Boolean

    Permalink

    Flags a validation error occurring for a command inside MULTI/EXEC which is then used to abort when EXEC is called.

    Flags a validation error occurring for a command inside MULTI/EXEC which is then used to abort when EXEC is called.

    Definition Classes
    ClientNode
  122. val transactionTimeout: Int

    Permalink

    Stores the duration which controls the amount of time we allow a transaction to exist for.

    Stores the duration which controls the amount of time we allow a transaction to exist for. This ensures that if for some reason the transaction does not complete, it can start handling write commands again.

    Definition Classes
    Node
  123. def unhandled(message: Any): Unit

    Permalink
    Definition Classes
    Eventsourced → Actor
  124. def unstashAll(): Unit

    Permalink
    Definition Classes
    Eventsourced → StashSupport
  125. def validate: Option[ErrorReply]

    Permalink

    Performs initial Command validation before sending it anywhere, as per the command's definition in commands.conf, namely that the command belongs to a type of Node, it contains a key if required, and the number of arguments fall within the configured range.

    Performs initial Command validation before sending it anywhere, as per the command's definition in commands.conf, namely that the command belongs to a type of Node, it contains a key if required, and the number of arguments fall within the configured range.

    Definition Classes
    ClientNode
  126. def value: Null

    Permalink

    Value getter according to the configured transaction isolation level:

    Value getter according to the configured transaction isolation level:

    - repeatable: should always return the value of the current transaction - uncommitted: always returns the newest written value, even if uncommitted - committed: always return the commit value, even inside a transaction

    Note that there is no "serializable" level since there is no notion of a range query. You can read more info on isolation levels here: https://en.wikipedia.org/wiki/Isolation_(database_systems)

    Definition Classes
    Node
  127. def value_=(value: Null): Unit

    Permalink

    Value setter - writes the current value, either to the main key, or a client ID if in a transaction.

    Value setter - writes the current value, either to the main key, or a client ID if in a transaction.

    Definition Classes
    Node
  128. var values: LinkedHashMap[String, Null]

    Permalink

    MVCC map of transaction values for the Node mapped to client IDs, including the committed "main" value, which is identified with an empty string as its key.

    MVCC map of transaction values for the Node mapped to client IDs, including the committed "main" value, which is identified with an empty string as its key. LinkedHashMap is used so that we can access the most recently written value when transaction isolation is configued as read-uncommitted.

    Definition Classes
    Node
  129. final def wait(): Unit

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

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

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

Deprecated Value Members

  1. def persist[A](events: Seq[A])(handler: (A) ⇒ Unit): Unit

    Permalink
    Definition Classes
    Eventsourced
    Annotations
    @deprecated
    Deprecated

    (Since version 2.4) use persistAll instead

  2. def persistAsync[A](events: Seq[A])(handler: (A) ⇒ Unit): Unit

    Permalink
    Definition Classes
    Eventsourced
    Annotations
    @deprecated
    Deprecated

    (Since version 2.4) use persistAllAsync instead

Inherited from ClientNode

Inherited from ScriptingClient

Inherited from Scripting

Inherited from AggregateCommands

Inherited from PubSubClient

Inherited from Node[Null]

Inherited from ActorLogging

Inherited from CommandProcessing

Inherited from PersistentActor

Inherited from Eventsourced

Inherited from PersistenceRecovery

Inherited from PersistenceIdentity

Inherited from StashFactory

Inherited from Stash

Inherited from RequiresMessageQueue[DequeBasedMessageQueueSemantics]

Inherited from UnrestrictedStash

Inherited from StashSupport

Inherited from Snapshotter

Inherited from Actor

Inherited from AnyRef

Inherited from Any

Ungrouped