Adds key/score to both structures.
Shortcut for creating Aggregate actors.
Shortcut to the args of the current command.
Moves the current value into a transaction for the current command's client ID.
Utility for handling boundary args that wrap around ends of sequences and count backwards when negative.
Clones the value for use in a new transaction.
Removes and returns the transaction value.
The current command - normally will be set when a Command arrives via the actor's receive method.
Timeout for a single command.
Removes the transaction value and writes it back into the main value.
Flag that enables detailed command debugging.
Deletes old snapshots after a new one is saved.
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.
Actual value is a two item tuple, map of keys to scores, and set of score/key entries.
Checks if the current Command is in a transaction.
Increments score for a key by retrieving it, removing it and re-adding it.
Transaction isolation level: "repeatable" reads, read "committed", or read "uncommitted".
Shortcut to mapping of keys to scores.
The most recently saved snapshot.
Optionally handles the LIMIT arg in range commands.
Utility for dropping extraneous zeros from floats when converting to strings, for consistency with Redis' INCRBYFLOAT/HINCRBYFLOAT commands and sorted set scores.
Utility for glob-style filtering.
Stores the duration which controls the minimum delay between receiving a command that writes, and persisting the actual value written.
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.
Utility for selecting a random item.
Supports range commands on the score/key set, for use by the rangeByIndex and rangeByScore methods below.
Queries the the score/key set for a range by index.
Queries the the key/map for a range by key.
Queries the the score/key set for a range by score.
Index of key in the score set - we first loook up the score to get the correct entry in the set.
Main Receive handler - deals with starting/stopping/persisting, and receiving Command instances, then running the Node actor's CommandRunner.
Restore the Node actor's value on startup.
Removes key/score from both structures.
Handles the RENAME/RENAMENX commands for all node types.
Sends a Response (usually the result of a command) back to the command's destination (usually a ClientNode sending a Command).
Shortcut route method for sending command input without a constructed Command instance, using the state of the current command (eg: db, clientID).
Sends an unrouted Command to one or more KeyNode actors, either by routing by key, or broadcasting to all.
Abstract definition of each Node actor's CommandRunner that must be implemented.
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.
As discussed above, saves a snapshot.
Utility for scan-style commands, namely SCAN/SSCAN/HSCAN/ZSCAN.
Shortcut to set of score/key entries.
Utility for slicing sequences, for commands such as SLICE, GETRANGE, LRANGE, etc.
Handles the SORT command.
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.
Stores the duration which controls the amount of time we allow a transaction to exist for.
Value getter according to the configured transaction isolation level:
Value setter - writes the current value, either to the main key, or a client ID if in a transaction.
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.
(Since version 2.4) use persistAll instead
(Since version 2.4) use persistAllAsync instead