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.
Called on each of the blocking commands, storing the received Command in the blocked set if the list is currently empty, and scheduling its timeout.
Set of blocked Command instances awaiting a response.
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.
Returns the default value for the type of Node, which subclasses must override.
Checks if the current Command is in a transaction.
LINSERT command that handles BEFORE/AFTER args.
Transaction isolation level: "repeatable" reads, read "committed", or read "uncommitted".
The most recently saved snapshot.
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.
LPOP/RPOP/BLPOP/BRPOP - handles returning nil on empty lists, and also returning the key/item pair for blocking pops.
Utility for selecting a random item.
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.
LREM command - generates a new list, filtering out the given item for the given count, in either direction in linear time.
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.
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.
Called each time the Node actor's CommandRunner runs - if the Node actor's list has values and we have blocked commands, iterate through the blocked Command instances and replay their commands.
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