class WorkerRegistryV2 implements WorkerRegistry, WorkerEventSubscriber {

    @Override
    public Set<WorkerId> getAllRunningWorkers() {

        return jobToWorkerInfoMap.values().stream()
            .flatMap(workerList -> workerList.stream()
                    .filter(wm -> WorkerState.isRunningState(wm.getState()))
                    .map(workerMeta -> workerMeta.getWorkerId()))
            .collect(Collectors.toSet());

    }

      WorkerRegistryV2();

}