Advertisement
Guest User

Untitled

a guest
Apr 17th, 2015
221
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.49 KB | None | 0 0
  1. private static Response processSingleCall(ReplicableCommand command, long timeout,
  2. Address destination, ResponseMode mode,
  3. Marshaller marshaller, CommandAwareRpcDispatcher card, boolean oob,
  4. JGroupsTransport transport) throws Exception {
  5. if (trace) log.tracef("Replication task sending %s to single recipient %s with response mode %s", command, destination, mode);
  6. boolean rsvp = isRsvpCommand(command);
  7. boolean noFlowControl = isTopologyCommand(command);
  8. ...
  9. }
  10.  
  11.  
  12. protected static Message constructMessage(Buffer buf, Address recipient, boolean oob, ResponseMode mode, boolean rsvp,
  13. boolean totalOrder, boolean noFlowControl) {
  14. Message msg = new Message();
  15. msg.setBuffer(buf);
  16. if (oob) msg.setFlag(Message.Flag.OOB);
  17. //some issues with the new bundler. put back the DONT_BUNDLE flag.
  18. if (oob || mode != ResponseMode.GET_NONE) msg.setFlag(Message.Flag.DONT_BUNDLE);
  19. if (rsvp) msg.setFlag(Message.Flag.RSVP);
  20. if (noFlowControl) msg.setFlag(Message.Flag.NO_FC);
  21.  
  22. //In total order protocol, the sequencer is in the protocol stack so we need to bypass the protocol
  23. if(!totalOrder) {
  24. msg.setFlag(Message.Flag.NO_TOTAL_ORDER);
  25. } else {
  26. msg.clearFlag(Message.Flag.OOB);
  27. }
  28. if (recipient != null) msg.setDest(recipient);
  29. return msg;
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement