Functions

Link copied to clipboard
open override fun addRemoteCommand(deviceId: String, command: RemoteCommand): Boolean

Add a new command, after which it will be pending. Returns false if the command is already active.

Link copied to clipboard
open override fun addRemoteCommandAt(deviceId: String, command: RemoteCommand, when: Timestamp): Boolean

Add a new command with an explicit timestamp. Primarily used by tests.

Link copied to clipboard
open override fun close()
Link copied to clipboard
open override fun destroy()
Link copied to clipboard
open override fun getUnsentCommands(): List<PendingCommand>

Return all unsent commands. This is for the code sending the commands, result is sorted by time_requested.

Link copied to clipboard
open override fun removeRemoteCommand(deviceId: String, command: RemoteCommand): Boolean

Removes the remote command. Typically used to implement "undo" but may also be used by the queue processor when it gives up trying to send a command.

Link copied to clipboard
open override fun setPendingCommandSent(command: PendingCommand): Boolean

Flag a command as sent.