private void doListNode ( final Message < JsonObject > message ) { context . execute ( new Action < Collection < String > > ( ) { @ Override public Collection < String > perform ( ) { List < String > nodes = new ArrayList <> ( ) ; for ( String group : groups . keySet ( ) ) { nodes . addAll ( groups . get ( group ) ) ; } return nodes ; } } , new Handler < AsyncResult < Collection < String > > > ( ) { @ Override public void handle ( AsyncResult < Collection < String > > result ) { if ( result . failed ( ) ) { message . reply ( new JsonObject ( ) . putString ( "status" , "error" ) . putString ( "message" , result . cause ( ) . getMessage ( ) ) ) ; } else { message . reply ( new JsonObject ( ) . putString ( "status" , "ok" ) . putArray ( "result" , new JsonArray ( result . result ( ) . toArray ( new String [ result . result ( ) . size ( ) ] ) ) ) ) ; } } } ) ; }
Lists nodes in the cluster .