@Override public void run() { MessagingService.instance().sendReply(new MessageOut(MessagingService.Verb.INTERNAL_RESPONSE), id, message.from); } }, MoreExecutors.directExecutor());
public void incrementDroppedMessages(MessageIn message, long timeTaken) { if (message.payload instanceof IMutation) { updateDroppedMutationCount((IMutation) message.payload); } incrementDroppedMessages(message.verb, timeTaken, message.isCrossNode()); }
/** * 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; }
/** * Unlike commitPaxos, this does not wait for replies */ private static void sendCommit(Commit commit, Iterable<InetAddress> replicas) { MessageOut<Commit> message = new MessageOut<Commit>(MessagingService.Verb.PAXOS_COMMIT, commit, Commit.serializer); for (InetAddress target : replicas) MessagingService.instance().sendOneWay(message, target); }
/** * Track latency information for the dynamic snitch * * @param cb the callback associated with this message -- this lets us know if it's a message type we're interested in * @param address the host that replied to the message * @param latency */ public void maybeAddLatency(IAsyncCallback cb, InetAddress address, long latency) { if (cb.isLatencyForSnitch()) addLatency(address, latency); }
public <T> AsyncOneResponse<T> sendRR(MessageOut message, InetAddress to) { AsyncOneResponse<T> iar = new AsyncOneResponse<T>(); sendRR(message, to, iar); return iar; }
private static void pushSchemaMutation(InetAddress endpoint, Collection<Mutation> schema) { MessageOut<Collection<Mutation>> msg = new MessageOut<>(MessagingService.Verb.DEFINITIONS_UPDATE, schema, MigrationsSerializer.instance); MessagingService.instance().sendOneWay(msg, endpoint); }
@Override public void run() { MessagingService.instance().sendReply(new MessageOut(MessagingService.Verb.INTERNAL_RESPONSE), id, message.from); } }, MoreExecutors.directExecutor());
/** * 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; }
public void incrementDroppedMessages(MessageIn message, long timeTaken) { if (message.payload instanceof IMutation) { updateDroppedMutationCount((IMutation) message.payload); } incrementDroppedMessages(message.verb, timeTaken, message.isCrossNode()); }
/** * Track latency information for the dynamic snitch * * @param cb the callback associated with this message -- this lets us know if it's a message type we're interested in * @param address the host that replied to the message * @param latency */ public void maybeAddLatency(IAsyncCallback cb, InetAddress address, long latency) { if (cb.isLatencyForSnitch()) addLatency(address, latency); }
public <T> AsyncOneResponse<T> sendRR(MessageOut message, InetAddress to) { AsyncOneResponse<T> iar = new AsyncOneResponse<T>(); sendRR(message, to, iar); return iar; }
/** * Unlike commitPaxos, this does not wait for replies */ private static void sendCommit(Commit commit, Iterable<InetAddress> replicas) { MessageOut<Commit> message = new MessageOut<Commit>(MessagingService.Verb.PAXOS_COMMIT, commit, Commit.serializer); for (InetAddress target : replicas) MessagingService.instance().sendOneWay(message, target); }
@Override public void run() { MessagingService.instance().sendReply(new MessageOut(MessagingService.Verb.INTERNAL_RESPONSE), id, message.from); } }, MoreExecutors.sameThreadExecutor());
/** * 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; }
public void incrementDroppedMessages(MessageIn message, long timeTaken) { if (message.payload instanceof IMutation) { updateDroppedMutationCount((IMutation) message.payload); } incrementDroppedMessages(message.verb, timeTaken, message.isCrossNode()); }
/** * Track latency information for the dynamic snitch * * @param cb the callback associated with this message -- this lets us know if it's a message type we're interested in * @param address the host that replied to the message * @param latency */ public void maybeAddLatency(IAsyncCallback cb, InetAddress address, long latency) { if (cb.isLatencyForSnitch()) addLatency(address, latency); }
public <T> AsyncOneResponse<T> sendRR(MessageOut message, InetAddress to) { AsyncOneResponse<T> iar = new AsyncOneResponse<T>(); sendRR(message, to, iar); return iar; }
private static void pushSchemaMutation(InetAddress endpoint, Collection<Mutation> schema) { MessageOut<Collection<Mutation>> msg = new MessageOut<>(MessagingService.Verb.DEFINITIONS_UPDATE, schema, MigrationsSerializer.instance); MessagingService.instance().sendOneWay(msg, endpoint); }
/** * Unlike commitPaxos, this does not wait for replies */ private static void sendCommit(Commit commit, Iterable<InetAddress> replicas) { MessageOut<Commit> message = new MessageOut<Commit>(MessagingService.Verb.PAXOS_COMMIT, commit, Commit.serializer); for (InetAddress target : replicas) MessagingService.instance().sendOneWay(message, target); }