Interface WorkerQueue
-
public interface WorkerQueue
Implementation of Task Reactor Worker Queue
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description void
delete(WorkerId workerId)
Delete item in given Worker Queue.WorkItem
fetch(WorkerId workerId)
Fetches exactly one item from a Worker Queue.static WorkerQueue
getInstance(Session session, Identifier schema)
Returns a new instance of the default queue implementation.void
push(QueueItem queueItem, WorkerId workerId)
Pushes provided item to the 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 objectschema
- Schema of the Task Reactor- Returns:
- a new queue instance
- a default implementation of
-
-