Class

curiodb

ClientNode

Related Doc: package curiodb

Permalink

abstract class ClientNode extends Node[Null] with PubSubClient with AggregateCommands with ScriptingClient

A ClientNode is a special type of Node in the system. It does not represent any key/value provided by a client, but instead is responsible for managing the life-cycle of a single client connection.

ClientNode is subclassed according to each external protocol supported, such as the Redis protocol over TCP, JSON over HTTP, and also the Lua pcall/call scripting API. Each subclass is responsible for converting its input into a Command payload, and converting Response payloads back to the relevant protocol deal with.

ClientNode is a Node subclass, as it also handles certain commands itself, such as utiilities that don't need to be routed via KeyNode actors.

Linear Supertypes
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. ClientNode
  2. ScriptingClient
  3. Scripting
  4. AggregateCommands
  5. PubSubClient
  6. Node
  7. ActorLogging
  8. CommandProcessing
  9. PersistentActor
  10. Eventsourced
  11. PersistenceRecovery
  12. PersistenceIdentity
  13. StashFactory
  14. Stash
  15. RequiresMessageQueue
  16. UnrestrictedStash
  17. StashSupport
  18. Snapshotter
  19. Actor
  20. AnyRef
  21. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ClientNode()

    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. def abortTransaction(response: Any): Unit

    Permalink

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

  5. def aggregate(props: Props): Unit

    Permalink

    Shortcut for creating Aggregate actors.

    Shortcut for creating Aggregate actors.

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

    Permalink

    Shortcut to the args of the current command.

    Shortcut to the args of the current command.

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

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

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

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

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

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

    Permalink
    Definition Classes
    Any
  13. 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.

  14. 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.

  15. 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
  16. 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
  17. lazy val channels: Set[String]

    Permalink

    Channels subscribed to.

    Channels subscribed to.

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

    Permalink

    ActorRef we send final responses back to.

  19. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  20. 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
  21. 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
  22. 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
  23. 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
  24. 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.

  25. 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
  26. 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
  27. implicit val context: ActorContext

    Permalink
    Definition Classes
    Actor
  28. var db: String

    Permalink

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

  29. val debug: Boolean

    Permalink

    Flag that enables detailed command debugging.

    Flag that enables detailed command debugging.

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

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

    Permalink
    Definition Classes
    Eventsourced
  32. 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
  33. def deleteSnapshot(sequenceNr: Long): Unit

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

    Permalink
    Definition Classes
    Snapshotter
  35. lazy val digest: MessageDigest

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

    Permalink

    List of disabled commands.

  37. 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
  38. 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
  39. 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.

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

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

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

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

    Permalink

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

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

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

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

    Permalink
  47. 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
  48. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  49. 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
  50. def journalPluginId: String

    Permalink
    Definition Classes
    PersistenceIdentity
  51. def lastSequenceNr: Long

    Permalink
    Definition Classes
    Eventsourced
  52. 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
  53. def loadSnapshot(persistenceId: String, criteria: SnapshotSelectionCriteria, toSequenceNr: Long): Unit

    Permalink
    Definition Classes
    Snapshotter
  54. def log: LoggingAdapter

    Permalink
    Definition Classes
    ActorLogging
  55. def multi: Boolean

    Permalink

    Determines if a transaction is triggered via MULTI.

  56. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  59. 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
  60. def onPersistFailure(cause: Throwable, event: Any, seqNr: Long): Unit

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

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

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

    Permalink

    Utility for glob-style filtering.

    Utility for glob-style filtering.

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

    Permalink

    Patterns subscribed to.

    Patterns subscribed to.

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

    Permalink
    Definition Classes
    Eventsourced
  66. 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
  67. def persistAll[A](events: Seq[A])(handler: (A) ⇒ Unit): Unit

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

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

    Permalink
    Definition Classes
    Eventsourced
  70. def persistenceId: String

    Permalink
    Definition Classes
    Node → PersistenceIdentity
  71. 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
  72. def postRestart(reason: Throwable): Unit

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

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

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

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

    Permalink

    Utility for selecting a random item.

    Utility for selecting a random item.

    Definition Classes
    CommandProcessing
  77. def receive: Receive

    Permalink
    Definition Classes
    Node → PersistentActor → Actor
  78. 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
    ClientNodeNode → Eventsourced
  79. 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
  80. def receiveRecover: Receive

    Permalink

    Restore the Node actor's value on startup.

    Restore the Node actor's value on startup.

    Definition Classes
    Node → Eventsourced
  81. def recovery: Recovery

    Permalink
    Definition Classes
    PersistenceRecovery
  82. def recoveryFinished: Boolean

    Permalink
    Definition Classes
    Eventsourced
  83. def recoveryRunning: Boolean

    Permalink
    Definition Classes
    Eventsourced
  84. 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
  85. 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
  86. def respondFinal(response: Any): Unit

    Permalink

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

  87. var responses: Map[String, Response]

    Permalink

    Map of responses that have been received inside a transaction.

  88. 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
  89. 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
  90. def routeWithTimeout(command: Command): Unit

    Permalink

    Routes the given Command instance, initializing its timeout event.

  91. 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
  92. 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
  93. 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
  94. 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
  95. 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
  96. 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
  97. 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
  98. def saveSnapshot(snapshot: Any): Unit

    Permalink
    Definition Classes
    Snapshotter
  99. 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
  100. implicit final val self: ActorRef

    Permalink
    Definition Classes
    Actor
  101. 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.

  102. final def sender(): ActorRef

    Permalink
    Definition Classes
    Actor
  103. 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
  104. 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
  105. def snapshotPluginId: String

    Permalink
    Definition Classes
    PersistenceIdentity
  106. def snapshotSequenceNr: Long

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

    Permalink
    Definition Classes
    Eventsourced → Snapshotter
  108. 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
  109. def stash(): Unit

    Permalink
    Definition Classes
    StashSupport
  110. 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
  111. 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.

  112. 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
  113. def supervisorStrategy: SupervisorStrategy

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

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

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

    Permalink

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

  117. 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.

  118. 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
  119. def unhandled(message: Any): Unit

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

    Permalink
    Definition Classes
    Eventsourced → StashSupport
  121. 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.

  122. 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
  123. 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
  124. 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
  125. final def wait(): Unit

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  127. 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 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