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 void
cancelOngoingExecutions(List<String> resourceIds)
Pushes cancel ongoing ingestion's items to work item queue.void
delete(List<String> ids)
Remove items from work item queue with given ids.void
deleteBefore(String resourceId, Timestamp timestamp)
List<QueueItem>
fetchNotProcessedAndCancelingItems()
Fetch items currently not processed items and technical items used for other item cancelingvoid
push(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:WorkItemQueue
Fetch items currently not processed items and technical items used for other item canceling- Specified by:
fetchNotProcessedAndCancelingItems
in interfaceWorkItemQueue
- Returns:
- Subset of items from the queue
-
push
public void push(List<WorkItem> workItems)
Description copied from interface:WorkItemQueue
Pushes group of work items to the queue.- Specified by:
push
in interfaceWorkItemQueue
- Parameters:
workItems
- User defined items scheduled to be processed by Task Reactor.
-
cancelOngoingExecutions
public void cancelOngoingExecutions(List<String> resourceIds)
Description copied from interface:WorkItemQueue
Pushes cancel ongoing ingestion's items to work item queue.- Specified by:
cancelOngoingExecutions
in interfaceWorkItemQueue
- Parameters:
resourceIds
- Identifiers of the work items to be cancelled.
-
delete
public void delete(List<String> ids)
Description copied from interface:WorkItemQueue
Remove items from work item queue with given ids.- Specified by:
delete
in interfaceWorkItemQueue
- Parameters:
ids
- Identifiers of the object to be removed.
-
deleteBefore
public void deleteBefore(String resourceId, Timestamp timestamp)
- Specified by:
deleteBefore
in interfaceWorkItemQueue
-
-