use of org.apache.activemq.artemis.core.server.cluster.qourum.QuorumVoteHandler in project activemq-artemis by apache.
the class ClusterControl method sendQuorumVote.
public Vote sendQuorumVote(SimpleString handler, Vote vote) {
try {
ActiveMQServerLogger.LOGGER.sendingQuorumVoteRequest(getSessionFactory().getConnection().getRemoteAddress(), vote.toString());
QuorumVoteReplyMessage replyMessage = (QuorumVoteReplyMessage) clusterChannel.sendBlocking(new QuorumVoteMessage(handler, vote), PacketImpl.QUORUM_VOTE_REPLY);
QuorumVoteHandler voteHandler = server.getClusterManager().getQuorumManager().getVoteHandler(replyMessage.getHandler());
replyMessage.decodeRest(voteHandler);
Vote voteResponse = replyMessage.getVote();
ActiveMQServerLogger.LOGGER.receivedQuorumVoteResponse(getSessionFactory().getConnection().getRemoteAddress(), voteResponse.toString());
return voteResponse;
} catch (ActiveMQException e) {
return null;
}
}
Aggregations