Interface WorkerQueue


  • public interface WorkerQueue
    Implementation of Task Reactor Worker Queue
    • Method Detail

      • push

        void push​(QueueItem queueItem,
                  WorkerId workerId)
        Pushes provided item to the queue.
        Parameters:
        queueItem - Item to be pushed.
        workerId - Identifier of a Worker Queue.
      • fetch

        WorkItem fetch​(WorkerId workerId)
        Fetches exactly one item from a Worker Queue. If there are multiple items throws exception due to invalid.
        Parameters:
        workerId - Identifier of a Worker Queue.
        Returns:
        Item selected from the queue.
      • delete

        void delete​(WorkerId workerId)
        Delete item in given Worker Queue.
        Parameters:
        workerId - Identifier of a Worker Queue.
      • getInstance

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

        Default implementation of the queue uses:

        • a default implementation of DefaultWorkerQueue, created for the <schema>.QUEUE_<worker-id> table.
        Parameters:
        session - Snowpark session object
        schema - Schema of the Task Reactor
        Returns:
        a new queue instance