Class DefaultCommandsQueue

    • Constructor Detail

      • DefaultCommandsQueue

        public DefaultCommandsQueue​(Session session,
                                    Identifier instanceSchema)
        Creates a DefaultCommandsQueue object with all fields initialized.
        Parameters:
        session - Snowpark session object
        instanceSchema - task reactor instance schema name
    • Method Detail

      • fetchAllSupportedOrderedBySeqNo

        public List<Command> fetchAllSupportedOrderedBySeqNo()
        Retrieves all commands of valid type from the commands queue sorted ascending by the command sequence number. This implementation assumes that there can be some commands in the queue with the invalid command type. These commands are filtered out from the queue.
        Specified by:
        fetchAllSupportedOrderedBySeqNo in interface CommandsQueue
        Returns:
        a list of the fetched commands
      • add

        public void add​(Command.CommandType type,
                        Variant payload)
        Creates a new command.
        Specified by:
        add in interface CommandsQueue
        Parameters:
        type - type of the command
        payload - custom command payload appropriate for the command type
      • deleteById

        public void deleteById​(String id)
        Deletes the command with the given id.
        Specified by:
        deleteById in interface CommandsQueue
        Parameters:
        id - id of the command entity to be deleted