Interface CommandsQueue

  • All Known Implementing Classes:
    DefaultCommandsQueue

    public interface CommandsQueue
    Task Reactor repository that works with the commands queue table.
    • 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 command
        payload - 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 the DefaultCommandsQueue which is default implementation.
        Parameters:
        session - Snowpark session object
        instanceName - task reactor instance schema name
        Returns:
        default, used by the task reactor implementation of the CommandsQueue