Interface CommandsQueue
-
- All Known Implementing Classes:
DefaultCommandsQueue
public interface CommandsQueueTask Reactor repository that works with the commands queue table.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classCommandsQueue.ColumnNameColumn names of the commands queue table.
-
Field Summary
Fields Modifier and Type Field Description static VariantEMPTY_COMMAND_PAYLOADEmpty Variant payload for a Task Reactor command.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidadd(Command.CommandType type, Variant payload)Creates a new command.default voidaddCommandWithEmptyPayload(Command.CommandType type)Creates a new command with empty payload.voiddeleteById(String id)Deletes the command with the given id.voiddeleteUnsupportedCommands()Deletes all commands of type that should not be supported by the commands processorList<Command>fetchAllSupportedOrderedBySeqNo()Retrieves all commands of valid type from the commands queue sorted ascending by the command sequence number.static DefaultCommandsQueuegetInstance(Session session, Identifier instanceName)Returns a new instance of theDefaultCommandsQueuewhich is default implementation.
-
-
-
Field Detail
-
EMPTY_COMMAND_PAYLOAD
static final Variant EMPTY_COMMAND_PAYLOAD
Empty Variant payload for a Task Reactor command.
-
-
Method Detail
-
fetchAllSupportedOrderedBySeqNo
List<Command> fetchAllSupportedOrderedBySeqNo()
Retrieves all commands of valid type from the commands queue sorted ascending by the command sequence number.- Returns:
- a list of the fetched commands
-
add
void add(Command.CommandType type, Variant payload)
Creates a new command.- Parameters:
type- type of the commandpayload- custom command payload appropriate for the command type
-
addCommandWithEmptyPayload
default void addCommandWithEmptyPayload(Command.CommandType type)
Creates a new command with empty payload.- Parameters:
type- type of the command
-
deleteById
void deleteById(String id)
Deletes the command with the given id.- Parameters:
id- id of the command entity to be deleted
-
deleteUnsupportedCommands
void deleteUnsupportedCommands()
Deletes all commands of type that should not be supported by the commands processor
-
getInstance
static DefaultCommandsQueue getInstance(Session session, Identifier instanceName)
Returns a new instance of theDefaultCommandsQueuewhich is default implementation.- Parameters:
session- Snowpark session objectinstanceName- task reactor instance schema name- Returns:
- default, used by the task reactor implementation of the
CommandsQueue
-
-