/** * returns the appropriate connection based on message type. * returns null if a connection could not be established. */ OutboundTcpConnection getConnection(MessageOut msg) { Stage stage = msg.getStage(); return stage == Stage.REQUEST_RESPONSE || stage == Stage.INTERNAL_RESPONSE || stage == Stage.GOSSIP ? ackCon : cmdCon; }
public String toString() { StringBuilder sbuf = new StringBuilder(); sbuf.append("TYPE:").append(getStage()).append(" VERB:").append(verb); return sbuf.toString(); }
public String toString() { StringBuilder sbuf = new StringBuilder(); sbuf.append("TYPE:").append(getStage()).append(" VERB:").append(verb); return sbuf.toString(); }
public String toString() { StringBuilder sbuf = new StringBuilder(); sbuf.append("TYPE:").append(getStage()).append(" VERB:").append(verb); return sbuf.toString(); }
public String toString() { StringBuilder sbuf = new StringBuilder(); sbuf.append("TYPE:").append(getStage()).append(" VERB:").append(verb); return sbuf.toString(); }
/** * returns the appropriate connection based on message type. * returns null if a connection could not be established. */ OutboundTcpConnection getConnection(MessageOut msg) { if (Stage.GOSSIP == msg.getStage()) return gossipMessages; return msg.payloadSize(smallMessages.getTargetVersion()) > LARGE_MESSAGE_THRESHOLD ? largeMessages : smallMessages; }
/** * returns the appropriate connection based on message type. * returns null if a connection could not be established. */ OutboundTcpConnection getConnection(MessageOut msg) { if (Stage.GOSSIP == msg.getStage()) return gossipMessages; return msg.payloadSize(smallMessages.getTargetVersion()) > LARGE_MESSAGE_THRESHOLD ? largeMessages : smallMessages; }
/** * returns the appropriate connection based on message type. * returns null if a connection could not be established. */ OutboundTcpConnection getConnection(MessageOut msg) { if (Stage.GOSSIP == msg.getStage()) return gossipMessages; return msg.payloadSize(smallMessages.getTargetVersion()) > LARGE_MESSAGE_THRESHOLD ? largeMessages : smallMessages; }