public static void waitOnFutures(List<AsyncOneResponse> results, long ms) throws TimeoutException { for (AsyncOneResponse result : results) result.get(ms, TimeUnit.MILLISECONDS); }
public <T> AsyncOneResponse<T> sendRR(MessageOut message, InetAddress to) { AsyncOneResponse<T> iar = new AsyncOneResponse<T>(); sendRR(message, to, iar); return iar; }
public <T> AsyncOneResponse<T> sendRR(MessageOut message, InetAddress to) { AsyncOneResponse<T> iar = new AsyncOneResponse<T>(); sendRR(message, to, iar); return iar; }
public static void waitOnFutures(List<AsyncOneResponse> results, long ms) throws TimeoutException { for (AsyncOneResponse result : results) result.get(ms, TimeUnit.MILLISECONDS); }
public <T> AsyncOneResponse<T> sendRR(MessageOut message, InetAddress to) { AsyncOneResponse<T> iar = new AsyncOneResponse<T>(); sendRR(message, to, iar); return iar; }
public static void waitOnFutures(List<AsyncOneResponse> results, long ms) throws TimeoutException { for (AsyncOneResponse result : results) result.get(ms, TimeUnit.MILLISECONDS); }
public <T> AsyncOneResponse<T> sendRR(MessageOut message, InetAddress to) { AsyncOneResponse<T> iar = new AsyncOneResponse<T>(); sendRR(message, to, iar); return iar; }
public static void waitOnFutures(List<AsyncOneResponse> results, long ms) throws TimeoutException { for (AsyncOneResponse result : results) result.get(ms, TimeUnit.MILLISECONDS); }
/** * Sends a notification to a node indicating we have finished replicating data. * * @param remote node to send notification to */ private void sendReplicationNotification(InetAddress remote) { // notify the remote token MessageOut msg = new MessageOut(MessagingService.Verb.REPLICATION_FINISHED); IFailureDetector failureDetector = FailureDetector.instance; if (logger.isDebugEnabled()) logger.debug("Notifying {} of replication completion\n", remote); while (failureDetector.isAlive(remote)) { AsyncOneResponse iar = MessagingService.instance().sendRR(msg, remote); try { iar.get(DatabaseDescriptor.getRpcTimeout(), TimeUnit.MILLISECONDS); return; // done } catch(TimeoutException e) { // try again } } }
/** * Sends a notification to a node indicating we have finished replicating data. * * @param remote node to send notification to */ private void sendReplicationNotification(InetAddress remote) { // notify the remote token MessageOut msg = new MessageOut(MessagingService.Verb.REPLICATION_FINISHED); IFailureDetector failureDetector = FailureDetector.instance; if (logger.isDebugEnabled()) logger.debug("Notifying {} of replication completion\n", remote); while (failureDetector.isAlive(remote)) { AsyncOneResponse iar = MessagingService.instance().sendRR(msg, remote); try { iar.get(DatabaseDescriptor.getRpcTimeout(), TimeUnit.MILLISECONDS); return; // done } catch(TimeoutException e) { // try again } } }
/** * Sends a notification to a node indicating we have finished replicating data. * * @param remote node to send notification to */ private void sendReplicationNotification(InetAddress remote) { // notify the remote token MessageOut msg = new MessageOut(MessagingService.Verb.REPLICATION_FINISHED); IFailureDetector failureDetector = FailureDetector.instance; if (logger.isDebugEnabled()) logger.debug("Notifying {} of replication completion\n", remote); while (failureDetector.isAlive(remote)) { AsyncOneResponse iar = MessagingService.instance().sendRR(msg, remote); try { iar.get(DatabaseDescriptor.getRpcTimeout(), TimeUnit.MILLISECONDS); return; // done } catch(TimeoutException e) { // try again } } }
/** * Sends a notification to a node indicating we have finished replicating data. * * @param remote node to send notification to */ private void sendReplicationNotification(InetAddress remote) { // notify the remote token MessageOut msg = new MessageOut(MessagingService.Verb.REPLICATION_FINISHED); IFailureDetector failureDetector = FailureDetector.instance; if (logger.isDebugEnabled()) logger.debug("Notifying {} of replication completion\n", remote); while (failureDetector.isAlive(remote)) { AsyncOneResponse iar = MessagingService.instance().sendRR(msg, remote); try { iar.get(DatabaseDescriptor.getRpcTimeout(), TimeUnit.MILLISECONDS); return; // done } catch(TimeoutException e) { // try again } } }