src/java/org/apache/cassandra/service/StorageService.java
/**
     * Sends a notification to a node indicating we have finished replicating data.
     *
     * @param local the local address
     * @param remote node to send notification to
     */
Sends a notification to a node indicating we have finished replicating data.
@param local the local address
@param remote node to send notification to
Sends a notification to a node indicating we have finished replicating data . @param local the local address @param remote node to send notification to
private void sendReplicationNotification(InetAddress local, InetAddress remote)
    {
        Message msg = new Message(local, StorageService.Verb.REPLICATION_FINISHED, new byte[0], Gossiper.instance.getVersion(remote));
        IFailureDetector failureDetector = FailureDetector.instance;
        if (logger_.isDebugEnabled())
            logger_.debug("Notifying " + remote.toString() + " of replication completion\n");
        while (failureDetector.isAlive(remote))
        {
            IAsyncResult iar = MessagingService.instance().sendRR(msg, remote);
            try
            {
                iar.get(DatabaseDescriptor.getRpcTimeout(), TimeUnit.MILLISECONDS);
                return; 
            }
            catch(TimeoutException e)
            {
            }
        }
    }
private void sendReplicationNotification ( InetAddress local , InetAddress remote ) { Message msg = new Message ( local , StorageService . Verb . REPLICATION_FINISHED , new byte [ 0 ] , Gossiper . instance . getVersion ( remote ) ) ; IFailureDetector failureDetector = FailureDetector . instance ; if ( logger_ . isDebugEnabled ( ) ) logger_ . debug ( "Notifying " + remote . toString ( ) + " of replication completion\n" ) ; while ( failureDetector . isAlive ( remote ) ) { IAsyncResult iar = MessagingService . instance ( ) . sendRR ( msg , remote ) ; try { iar . get ( DatabaseDescriptor . getRpcTimeout ( ) , TimeUnit . MILLISECONDS ) ; return ; } catch ( TimeoutException e ) { } } }
Sends a notification to a node indicating we have finished replicating data.
Sends a notification to a node indicating we have finished replicating data .
// notify the remote token // done // try again