Interface CommandsQueue
-
- All Known Implementing Classes:
DefaultCommandsQueue
public interface CommandsQueue
Task Reactor repository that works with the commands queue table.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
CommandsQueue.ColumnName
Column names of the commands queue table.
-
Field Summary
Fields Modifier and Type Field Description static Variant
EMPTY_COMMAND_PAYLOAD
Empty Variant payload for a Task Reactor command.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
add(Command.CommandType type, Variant payload)
Creates a new command.default void
addCommandWithEmptyPayload(Command.CommandType type)
Creates a new command with empty payload.void
deleteById(String id)
Deletes the command with the given id.void
deleteUnsupportedCommands()
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 DefaultCommandsQueue
getInstance(Session session, Identifier instanceName)
Returns a new instance of theDefaultCommandsQueue
which 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 theDefaultCommandsQueue
which is default implementation.- Parameters:
session
- Snowpark session objectinstanceName
- task reactor instance schema name- Returns:
- default, used by the task reactor implementation of the
CommandsQueue
-
-