@Nullable private TcpDiscoveryNode resolveCoordinator(@Nullable Collection<TcpDiscoveryNode> filter){
synchronized (mux) {
    Collection<TcpDiscoveryNode> excluded=F.concat(false,failedNodes.keySet(),leavingNodes);
    if (!F.isEmpty(filter))     excluded=F.concat(false,excluded,filter);
    return ring.coordinator(excluded);
  }
}

@ Nullable private TcpDiscoveryNode resolveCoordinator ( @ Nullable Collection < TcpDiscoveryNode > filter ) { synchronized ( mux ) { Collection < TcpDiscoveryNode > excluded = F . concat ( false , failedNodes . keySet ( ) , leavingNodes ) ; if ( ! F . isEmpty ( filter ) ) excluded = F . concat ( false , excluded , filter ) ; return ring . coordinator ( excluded ) ; } }
resolves coordinator . nodes that are leaving or failed ( but are still in topology ) are removed from search as well as provided filter .
