@ Override @ Synchronized public Set < Host > getClusterMembers ( ) { if ( ! cache . isPresent ( ) ) { initializeCache ( ) ; } List < ChildData > data = cache . get ( ) . getCurrentData ( ) ; return data . stream ( ) . map ( d -> Host . fromBytes ( d . getData ( ) ) ) . collect ( Collectors . toSet ( ) ) ; }
Get the current cluster members .