private List < ServerConnection > updateServerList ( ) { final Map < Endpoint , ServerConnection > allServersByEndpoint = allServers . stream ( ) . collect ( toImmutableMap ( ServerConnection :: endpoint , Function . identity ( ) , ( l , r ) -> l ) ) ; return allServers = delegate . endpoints ( ) . stream ( ) . map ( endpoint -> { ServerConnection connection = allServersByEndpoint . get ( endpoint ) ; if ( connection != null ) { return connection ; } return new ServerConnection ( endpoint , createEndpointHealthChecker ( endpoint ) ) ; } ) . collect ( toImmutableList ( ) ) ; }
Update the servers this health checker client talks to .