List < QueryResponse > broadcast ( ClusteredQueryCommand clusteredQueryCommand ) { // invoke on own node Future < QueryResponse > localResponse = localInvoke ( clusteredQueryCommand ) ; Map < Address , Response > responses = rpcManager . invokeRemotely ( null , clusteredQueryCommand , rpcOptions ) ; List < QueryResponse > queryResponses = cast ( responses ) ; try { queryResponses . add ( localResponse . get ( ) ) ; } catch ( InterruptedException e ) { throw new SearchException ( "Interrupted while searching locally" , e ) ; } catch ( ExecutionException e ) { throw new SearchException ( "Exception while searching locally" , e ) ; } return queryResponses ; }
Broadcast this ClusteredQueryCommand to all cluster nodes . The command will be also invoked on local node .