Interface WorkItemQueue
-
- All Known Implementing Classes:
DefaultWorkItemQueue
public interface WorkItemQueueInterface of Task Reactor input Queue for basic management of the work items
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default voidcancelOngoingExecution(String id)Pushes cancel ongoing ingestion's item to work item queue.voidcancelOngoingExecutions(List<String> ids)Pushes cancel ongoing ingestion's items to work item queue.default voiddelete(String id)Remove items from work item queue with given id.voiddelete(List<String> ids)Remove items from work item queue with given ids.voiddeleteBefore(String resourceId, Timestamp timestamp)Remove items from work item queue which were created for a give resource id and before the given timestamp.List<QueueItem>fetchNotProcessedAndCancelingItems()Fetch items currently not processed items and technical items used for other item cancelingstatic WorkItemQueuegetInstance(Session session, Identifier schema)Gets a new instance of the default queue implementation.default voidpush(WorkItem workItem)Pushes singular work item to the queue.voidpush(List<WorkItem> workItems)Pushes group of work items to the queue.
-
-
-
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)
Remove items from work item queue which were created for a give resource id and before the given timestamp.Note: currently this method is considered temporary, it might be deleted in the future.
- Parameters:
resourceId- resource idtimestamp- limiting timestamp
-
getInstance
static WorkItemQueue getInstance(Session session, Identifier schema)
Gets a new instance of the default queue implementation.Default implementation of the queue uses:
- a default implementation of
DefaultWorkItemQueue, created for the<schema>.QUEUE_TABLEtable.
- Parameters:
session- Snowpark session objectschema- Schema of the Task Reactor- Returns:
- a new queue instance
- a default implementation of
-
-