public String toString() { return String.format("[%s] view-id= %s", type2String(type), view_id); }
.putHeader(this.id, new StableHeader(StableHeader.STABLE_GOSSIP, current_view.getViewId())) .setBuffer(marshal(d)); try {
/** * Bcasts a STABLE message of the current digest to all members. Message contains highest seqnos of all members * seen by this member. Highest seqnos are retrieved from the NAKACK layer below. * @param d A <em>copy</em> of this.digest */ private void sendStableMessage(Digest d) { if(suspended) { if(log.isTraceEnabled()) log.trace("will not send STABLE message as I'm suspended"); return; } if(d != null && d.size() > 0) { if(log.isTraceEnabled()) log.trace("sending stable msg " + d.printHighestDeliveredSeqnos()); num_stable_msgs_sent++; final Message msg=new Message(); // mcast message msg.setFlag(Message.OOB); StableHeader hdr=new StableHeader(StableHeader.STABLE_GOSSIP, d); msg.putHeader(name, hdr); Runnable r=new Runnable() { public void run() { down_prot.down(new Event(Event.MSG, msg)); } }; // Run in a separate thread so we don't potentially block (http://jira.jboss.com/jira/browse/JGRP-532) timer.execute(r); // down_prot.down(new Event(Event.MSG, msg)); } }
public void run() { Message msg; StableHeader hdr; if(suspended) { if(log.isDebugEnabled()) { log.debug("STABILITY message will not be sent as suspended=" + suspended); } return; } if(stability_digest != null) { msg=new Message(); msg.setFlag(Message.OOB); hdr=new StableHeader(StableHeader.STABILITY, stability_digest); msg.putHeader(STABLE.name, hdr); if(log.isTraceEnabled()) log.trace("sending stability msg " + stability_digest.printHighestDeliveredSeqnos() + " (copy=" + stability_digest.hashCode() + ")"); num_stability_msgs_sent++; down_prot.down(new Event(Event.MSG, msg)); } } }
protected void _sendStabilityMessage(Digest stability_digest, final ViewId view_id) { if(suspended) { log.debug("STABILITY message will not be sent as suspended=%b", suspended); return; } // https://issues.jboss.org/browse/JGRP-1638: we reverted to sending the STABILITY message *unreliably*, // but clear votes *before* sending it try { Message msg=new Message().setFlag(Message.Flag.OOB, Message.Flag.INTERNAL, Message.Flag.NO_RELIABILITY) .putHeader(id, new StableHeader(StableHeader.STABILITY, view_id)) .setBuffer(marshal(stability_digest)); log.trace("%s: sending stability msg %s", local_addr, printDigest(stability_digest)); num_stability_msgs_sent++; down_prot.down(msg); } catch(Exception e) { log.warn("failed sending STABILITY message", e); } }
public String toString() { return String.format("[%s] view-id= %s", type2String(type), view_id); }
public String toString() { StringBuilder sb=new StringBuilder(); sb.append('['); sb.append(type2String(type)); sb.append("]: digest is "); sb.append(stableDigest); return sb.toString(); }
.putHeader(this.id, new StableHeader(StableHeader.STABLE_GOSSIP, current_view.getViewId())) .setBuffer(marshal(d)); try {
protected void _sendStabilityMessage(Digest stability_digest, final ViewId view_id) { if(suspended) { log.debug("STABILITY message will not be sent as suspended=%b", suspended); return; } // https://issues.jboss.org/browse/JGRP-1638: we reverted to sending the STABILITY message *unreliably*, // but clear votes *before* sending it try { Message msg=new Message().setFlag(Message.Flag.OOB, Message.Flag.INTERNAL, Message.Flag.NO_RELIABILITY) .putHeader(id, new StableHeader(StableHeader.STABILITY, view_id)) .setBuffer(marshal(stability_digest)); log.trace("%s: sending stability msg %s", local_addr, printDigest(stability_digest)); num_stability_msgs_sent++; down_prot.down(msg); } catch(Exception e) { log.warn("failed sending STABILITY message", e); } }