protected void sendJoinRejectionMessage(Address dest, String error_msg) { if (dest == null) return; JoinRsp joinRes = new JoinRsp(error_msg); // specify the error message on the JoinRsp Message msg = new Message(dest).putHeader(GMS_ID, new GmsHeader(GmsHeader.JOIN_RSP)).setBuffer( GMS.marshal(joinRes)); down_prot.down(msg); }
protected void sendJoinRejectionMessage(Address dest, String error_msg) { if(dest == null) return; JoinRsp joinRes=new JoinRsp(error_msg); // specify the error message on the JoinRsp Message msg = new Message(dest).putHeader(GMS_ID, new GMS.GmsHeader(GMS.GmsHeader.JOIN_RSP)) .setBuffer(GMS.marshal(joinRes)); if(this.authenticate_coord) msg.putHeader(this.id, new AuthHeader(this.auth_token)); down_prot.down(msg); }
Tuple<View,Digest> tuple=gms.getViewAndDigest(); if(tuple != null) gms.sendJoinResponse(new JoinRsp(tuple.getVal1(), tuple.getVal2()), mbr); else log.warn("%s: did not find a digest matching view %s; dropping JOIN-RSP", gms.local_addr, gms.view); join_rsp=new JoinRsp(new_view, join_digest); else log.warn("%s: digest does not match view (missing seqnos for %s); dropping JOIN-RSP",
/** * Used to create a failed JOIN_RSP message to pass back down the stack * @param joiner The Address of the requesting member * @param message The failure message to send back to the joiner * @return An Event containing a GmsHeader with a JoinRsp object */ private Event createFailureEvent(Address joiner, String message){ Message msg = new Message(joiner, null, null); if(log.isDebugEnabled()){ log.debug("Creating JoinRsp with failure message - " + message); } JoinRsp joinRes = new JoinRsp(message); //need to specify the error message on the JoinRsp object once it's been changed GMS.GmsHeader gmsHeader = new GMS.GmsHeader(GMS.GmsHeader.JOIN_RSP, joinRes); msg.putHeader(GMS.name, gmsHeader); if(log.isDebugEnabled()){ log.debug("GMSHeader created for failure JOIN_RSP"); } return new Event(Event.MSG, msg); }
protected void sendJoinRejectionMessage(Address dest, String error_msg) { if (dest == null) return; JoinRsp joinRes = new JoinRsp(error_msg); // specify the error message on the JoinRsp Message msg = new Message(dest).putHeader(GMS_ID, new GmsHeader(GmsHeader.JOIN_RSP)).setBuffer( GMS.marshal(joinRes)); down_prot.down(msg); }
if(log.isWarnEnabled()) log.warn(mbr + " already present; returning existing view " + gms.view); JoinRsp join_rsp=new JoinRsp(new View(gms.view_id, gms.members.getMembers()), gms.getDigest()); sendJoinResponse(join_rsp, mbr); it.remove(); join_digest.add((Address)i.next(), 0, 0); // ... and add the new members. their first seqno will be 1 join_rsp=new JoinRsp(new_view, join_digest != null? join_digest.copy() : null);
protected void sendJoinRejectionMessage(Address dest, String error_msg) { if(dest == null) return; JoinRsp joinRes=new JoinRsp(error_msg); // specify the error message on the JoinRsp Message msg = new Message(dest).putHeader(GMS_ID, new GMS.GmsHeader(GMS.GmsHeader.JOIN_RSP)) .setBuffer(GMS.marshal(joinRes)); if(this.authenticate_coord) msg.putHeader(this.id, new AuthHeader(this.auth_token)); down_prot.down(msg); }
Tuple<View,Digest> tuple=gms.getViewAndDigest(); if(tuple != null) gms.sendJoinResponse(new JoinRsp(tuple.getVal1(), tuple.getVal2()), mbr); else log.warn("%s: did not find a digest matching view %s; dropping JOIN-RSP", gms.local_addr, gms.view); join_rsp=new JoinRsp(new_view, join_digest); else log.warn("%s: digest does not match view (missing seqnos for %s); dropping JOIN-RSP",