Class DefaultWorkerCombinedView
- java.lang.Object
-
- com.snowflake.connectors.taskreactor.worker.DefaultWorkerCombinedView
-
- All Implemented Interfaces:
WorkerCombinedView
public class DefaultWorkerCombinedView extends Object implements WorkerCombinedView
Default implementation ofWorkerCombinedViewview.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stream<WorkerId>getWorkersExecuting(String resourceId)Returns the ids of workers executing ingestion of a specified resource.List<WorkerId>getWorkersExecuting(List<String> ids)Returns the ids of workers executing ingestion of a specified resource.voidrecreate(List<WorkerId> workerIds)Replaces current view, with actual state of queues.
-
-
-
Method Detail
-
getWorkersExecuting
public List<WorkerId> getWorkersExecuting(List<String> ids)
Description copied from interface:WorkerCombinedViewReturns the ids of workers executing ingestion of a specified resource.- Specified by:
getWorkersExecutingin interfaceWorkerCombinedView- Parameters:
ids- Identifiers of work queue items- Returns:
- list of ids of workers executing ingestion of a specified resource
-
getWorkersExecuting
public Stream<WorkerId> getWorkersExecuting(String resourceId)
Description copied from interface:WorkerCombinedViewReturns the ids of workers executing ingestion of a specified resource.- Specified by:
getWorkersExecutingin interfaceWorkerCombinedView- Parameters:
resourceId- resource id- Returns:
- list of ids of workers executing ingestion of a specified resource
-
recreate
public void recreate(List<WorkerId> workerIds)
Description copied from interface:WorkerCombinedViewReplaces current view, with actual state of queues.- Specified by:
recreatein interfaceWorkerCombinedView- Parameters:
workerIds- identifiers of currently active workers
-
-