Class DefaultWorkItemQueue
- java.lang.Object
-
- com.snowflake.connectors.taskreactor.queue.DefaultWorkItemQueue
-
- All Implemented Interfaces:
WorkItemQueue
public class DefaultWorkItemQueue extends Object implements WorkItemQueue
Default implementation ofWorkItemQueue.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcancelOngoingExecutions(List<String> resourceIds)Pushes cancel ongoing ingestion's items to work item queue.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 cancelingvoidpush(List<WorkItem> workItems)Pushes group of work items to the queue.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.snowflake.connectors.taskreactor.queue.WorkItemQueue
cancelOngoingExecution, delete, push
-
-
-
-
Method Detail
-
fetchNotProcessedAndCancelingItems
public List<QueueItem> fetchNotProcessedAndCancelingItems()
Description copied from interface:WorkItemQueueFetch items currently not processed items and technical items used for other item canceling- Specified by:
fetchNotProcessedAndCancelingItemsin interfaceWorkItemQueue- Returns:
- Subset of items from the queue
-
push
public void push(List<WorkItem> workItems)
Description copied from interface:WorkItemQueuePushes group of work items to the queue.- Specified by:
pushin interfaceWorkItemQueue- Parameters:
workItems- User defined items scheduled to be processed by Task Reactor.
-
cancelOngoingExecutions
public void cancelOngoingExecutions(List<String> resourceIds)
Description copied from interface:WorkItemQueuePushes cancel ongoing ingestion's items to work item queue.- Specified by:
cancelOngoingExecutionsin interfaceWorkItemQueue- Parameters:
resourceIds- Identifiers of the work items to be cancelled.
-
delete
public void delete(List<String> ids)
Description copied from interface:WorkItemQueueRemove items from work item queue with given ids.- Specified by:
deletein interfaceWorkItemQueue- Parameters:
ids- Identifiers of the object to be removed.
-
deleteBefore
public void deleteBefore(String resourceId, Timestamp timestamp)
Description copied from interface:WorkItemQueueRemove 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.
- Specified by:
deleteBeforein interfaceWorkItemQueue- Parameters:
resourceId- resource idtimestamp- limiting timestamp
-
-