Interface WorkItemQueue

  • All Known Implementing Classes:
    DefaultWorkItemQueue

    public interface WorkItemQueue
    Interface of Task Reactor input Queue for basic management of the work items
    • Method Detail

      • fetchNotProcessedAndCancelingItems

        List<QueueItem> fetchNotProcessedAndCancelingItems()
        Fetch items currently not processed items and technical items used for other item canceling
        Returns:
        Subset of items from the queue
      • push

        default void push​(WorkItem workItem)
        Pushes singular work item to the queue.
        Parameters:
        workItem - Item scheduled to be processed by Task Reactor.
      • push

        void push​(List<WorkItem> workItems)
        Pushes group of work items to the queue.
        Parameters:
        workItems - User defined items scheduled to be processed by Task Reactor.
      • cancelOngoingExecution

        default void cancelOngoingExecution​(String id)
        Pushes cancel ongoing ingestion's item to work item queue.
        Parameters:
        id - Identifier of the work item to be cancelled.
      • cancelOngoingExecutions

        void cancelOngoingExecutions​(List<String> ids)
        Pushes cancel ongoing ingestion's items to work item queue.
        Parameters:
        ids - Identifiers of the work items to be cancelled.
      • delete

        default void delete​(String id)
        Remove items from work item queue with given id.
        Parameters:
        id - Identifier of the object to be removed.
      • delete

        void delete​(List<String> ids)
        Remove items from work item queue with given ids.
        Parameters:
        ids - Identifiers of the object to be removed.
      • deleteBefore

        void deleteBefore​(String resourceId,
                          Timestamp timestamp)
      • getInstance

        static WorkItemQueue getInstance​(Session session,
                                         Identifier schema)
        Gets a new instance of the default queue implementation.

        Default implementation of the queue uses:

        Parameters:
        session - Snowpark session object
        schema - Schema of the Task Reactor
        Returns:
        a new queue instance