class DefaultSupervisorOperations implements SupervisorOperations {

    @Override
    public Observable<SupervisorEvent> events() {
        return masterMonitor.observeMasters()
                .compose(ObservableExt.mapWithState(Collections.emptyMap(), this::buildEventList))
                .flatMap(Observable::from);
    }

    @Inject public  DefaultSupervisorOperations(LifecycleManager lifecycleManager,
                                       MasterMonitor masterMonitor,
                                       LeaderActivator leaderActivator,
                                       TitusRuntime titusRuntime);

}