private void sendJGroupsMessage ( UpdateOpteration operation , String path , String auth ) throws Exception { if ( ! this . isAuth ( auth ) ) { throw new Exception ( "Unauthorized!" ) ; } log . trace ( "Sending jGroups message with operation {} and path {}" , operation , path ) ; ApiEndpointAccessRequest messageBody = new ApiEndpointAccessRequest ( ) ; messageBody . setEndpoint ( path ) ; messageBody . setOperation ( operation ) ; Message < ApiEndpointAccessRequest > msg = new Message < ApiEndpointAccessRequest > ( ProtocolMessage . API_ENDPOINT_ACCESS , messageBody ) ; log . trace ( "Sending jgroups message: " + msg ) ; sender . sendMessage ( msg , null ) ; }
Sends jgroups message to make sure that this operation is executed on all nodes in the cluster .