* @throws ChannelException
*/
protected void broadcast(int msgtype, boolean rpc) throws ChannelException {
+ Member[] members = channel.getMembers();
// No destination.
- if (channel.getMembers().length == 0 ) return;
+ if (members.length == 0 ) return;
//send out a map membership message, only wait for the first reply
MapMessage msg = new MapMessage(this.mapContextName, msgtype,
false, null, null, null, channel.getLocalMember(false), null);
if ( rpc) {
- Response[] resp = rpcChannel.send(channel.getMembers(), msg, RpcChannel.FIRST_REPLY, (channelSendOptions),rpcTimeout);
+ Response[] resp = rpcChannel.send(members, msg,
+ RpcChannel.FIRST_REPLY, (channelSendOptions), rpcTimeout);
if (resp.length > 0) {
for (int i = 0; i < resp.length; i++) {
mapMemberAdded(resp[i].getSource());
messageReceived(resp[i].getMessage(), resp[i].getSource());
}
} else {
- log.warn("broadcast 0 replies, probably a timeout.");
+ log.warn("broadcast received 0 replies, probably a timeout.");
}
} else {
channel.send(channel.getMembers(),msg,channelSendOptions);