Class DefaultWorkerCombinedView
- java.lang.Object
-
- com.snowflake.connectors.taskreactor.worker.DefaultWorkerCombinedView
-
- All Implemented Interfaces:
WorkerCombinedView
public class DefaultWorkerCombinedView extends Object implements WorkerCombinedView
Default implementation ofWorkerCombinedView
view.
-
-
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.void
recreate(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:WorkerCombinedView
Returns the ids of workers executing ingestion of a specified resource.- Specified by:
getWorkersExecuting
in 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:WorkerCombinedView
Returns the ids of workers executing ingestion of a specified resource.- Specified by:
getWorkersExecuting
in 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:WorkerCombinedView
Replaces current view, with actual state of queues.- Specified by:
recreate
in interfaceWorkerCombinedView
- Parameters:
workerIds
- identifiers of currently active workers
-
-