public boolean sendMessage ( Serializable payload ) { if ( ! isOpen ( ) || ! multipleMembersInCluster ( ) ) { return false ; } if ( LOGGER . isDebugEnabled ( ) ) { LOGGER . debug ( "{0} SENDING {1} " , toString ( ) , payload ) ; } try { byte [ ] messageData = toByteArray ( payload ) ; Message jgMessage = new Message ( null , channel . getAddress ( ) , messageData ) ; channel . send ( jgMessage ) ; return true ; } catch ( Exception e ) { // Something went wrong here throw new SystemFailureException ( ClusteringI18n . errorSendingMessage . text ( clusterName ( ) ) , e ) ; } }
Sends a message of a given type across a cluster .