private static void reply(int id, InetAddress to) { MessagingService.instance().sendReply(HintResponse.message, id, to); } }
public void rejectedExecution(Runnable r, ThreadPoolExecutor executor) { MessagingService.instance().incrementDroppedMessages(MessagingService.Verb._TRACE); } };
/** * 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); }
public void doVerb(MessageIn msg, int id) { StorageService.instance.confirmReplication(msg.from); MessageOut response = new MessageOut(MessagingService.Verb.INTERNAL_RESPONSE); if (logger.isDebugEnabled()) logger.debug("Replying to {}@{}", id, msg.from); MessagingService.instance().sendReply(response, id, msg.from); } }
@Override public void run() { MessagingService.instance().sendReply(new MessageOut(MessagingService.Verb.INTERNAL_RESPONSE), id, message.from); } }, MoreExecutors.directExecutor());
public void run() { MessagingService.instance().sendReply(WriteResponse.createMessage(), id, message.from); } }, queryStartNanoTime);
@Override public void run() { MessagingService.instance().sendReply(new MessageOut(MessagingService.Verb.INTERNAL_RESPONSE), id, message.from); } }, MoreExecutors.directExecutor());
public static boolean shouldPullSchemaFrom(InetAddress endpoint) { /* * Don't request schema from nodes with a differnt or unknonw major version (may have incompatible schema) * Don't request schema from fat clients */ return MessagingService.instance().knowsVersion(endpoint) && is30Compatible(MessagingService.instance().getRawVersion(endpoint)) && !Gossiper.instance.isGossipOnlyMember(endpoint); }
private void logErrorAndSendFailureResponse(String errorMessage, InetAddress to, int id) { logger.error(errorMessage); MessageOut reply = new MessageOut(MessagingService.Verb.INTERNAL_RESPONSE) .withParameter(MessagingService.FAILURE_RESPONSE_PARAM, MessagingService.ONE_BYTE); MessagingService.instance().sendReply(reply, id, to); } }
public void doVerb(MessageIn message, int id) { logger.trace("Received migration request from {}.", message.from); MessageOut<Collection<Mutation>> response = new MessageOut<>(MessagingService.Verb.INTERNAL_RESPONSE, SchemaKeyspace.convertSchemaToMutations(), MigrationManager.MigrationsSerializer.instance); MessagingService.instance().sendReply(response, id, message.from); } }
public void doVerb(MessageIn message, int id) { logger.trace("Received migration request from {}.", message.from); MessageOut<Collection<Mutation>> response = new MessageOut<>(MessagingService.Verb.INTERNAL_RESPONSE, SchemaKeyspace.convertSchemaToMutations(), MigrationManager.MigrationsSerializer.instance); MessagingService.instance().sendReply(response, id, message.from); } }
protected void startSync(List<Range<Token>> differences) { InetAddress local = FBUtilities.getBroadcastAddress(); SyncRequest request = new SyncRequest(desc, local, r1.endpoint, r2.endpoint, differences); String message = String.format("Forwarding streaming repair of %d ranges to %s (to be streamed with %s)", request.ranges.size(), request.src, request.dst); logger.info("[repair #{}] {}", desc.sessionId, message); Tracing.traceRepair(message); MessagingService.instance().sendOneWay(request.createMessage(), request.src); }
protected void startSync(List<Range<Token>> differences) { InetAddress local = FBUtilities.getBroadcastAddress(); SyncRequest request = new SyncRequest(desc, local, r1.endpoint, r2.endpoint, differences); String message = String.format("Forwarding streaming repair of %d ranges to %s (to be streamed with %s)", request.ranges.size(), request.src, request.dst); logger.info("[repair #{}] {}", desc.sessionId, message); Tracing.traceRepair(message); MessagingService.instance().sendOneWay(request.createMessage(), request.src); }
private void reply(int id, InetAddress replyTo) { Tracing.trace("Enqueuing response to {}", replyTo); MessagingService.instance().sendReply(WriteResponse.createMessage(), id, replyTo); }
static HintsDispatcher create(File file, RateLimiter rateLimiter, InetAddress address, UUID hostId, BooleanSupplier abortRequested) { int messagingVersion = MessagingService.instance().getVersion(address); return new HintsDispatcher(HintsReader.open(file, rateLimiter), hostId, address, messagingVersion, abortRequested); }
private void reply(int id, InetAddress replyTo) { Tracing.trace("Enqueuing response to {}", replyTo); MessagingService.instance().sendReply(WriteResponse.createMessage(), id, replyTo); }
public void doVerb(MessageIn<Mutation> message, int id) { message.payload.apply(); MessagingService.instance().sendReply(WriteResponse.createMessage(), id, message.from); } }
private Callback sendEncodedHint(ByteBuffer hint) { Callback callback = new Callback(); EncodedHintMessage message = new EncodedHintMessage(hostId, hint, messagingVersion); MessagingService.instance().sendRRWithFailure(message.createMessageOut(), address, callback); return callback; }
private Callback sendHint(Hint hint) { Callback callback = new Callback(); HintMessage message = new HintMessage(hostId, hint); MessagingService.instance().sendRRWithFailure(message.createMessageOut(), address, callback); return callback; }
private static PrepareCallback preparePaxos(Commit toPrepare, List<InetAddress> endpoints, int requiredParticipants, ConsistencyLevel consistencyForPaxos, long queryStartNanoTime) throws WriteTimeoutException { PrepareCallback callback = new PrepareCallback(toPrepare.update.partitionKey(), toPrepare.update.metadata(), requiredParticipants, consistencyForPaxos, queryStartNanoTime); MessageOut<Commit> message = new MessageOut<Commit>(MessagingService.Verb.PAXOS_PREPARE, toPrepare, Commit.serializer); for (InetAddress target : endpoints) MessagingService.instance().sendRR(message, target, callback); callback.await(); return callback; }