src/java/org/apache/cassandra/gms/Gossiper.java
/**
     * Returns true if the chosen target was also a seed. False otherwise
     *
     *  @param prod produces a message to send
     *  @param epSet a set of endpoint from which a random endpoint is chosen.
     *  @return true if the chosen endpoint is also a seed.
     */
Returns true if the chosen target was also a seed. False otherwise
@param prod produces a message to send
@param epSet a set of endpoint from which a random endpoint is chosen.
@return true if the chosen endpoint is also a seed.
Returns true if the chosen target was also a seed . False otherwise @param prod produces a message to send @param epSet a set of endpoint from which a random endpoint is chosen . @return true if the chosen endpoint is also a seed .
private boolean sendGossip(MessageProducer prod, Set<InetAddress> epSet)
    {
        int size = epSet.size();
        if (size < 1)
            return false;
        /* Generate a random number from 0 -> size */
        List<InetAddress> liveEndpoints = new ArrayList<InetAddress>(epSet);
        int index = (size == 1) ? 0 : random.nextInt(size);
        InetAddress to = liveEndpoints.get(index);
        if (logger.isTraceEnabled())
            logger.trace("Sending a GossipDigestSynMessage to {} ...", to);
        try
        {
            MessagingService.instance().sendOneWay(prod.getMessage(getVersion(to)), to);
        }
        catch (IOException ex)
        {
            throw new IOError(ex);
        }        
        return seeds.contains(to);
    }
private boolean sendGossip ( MessageProducer prod , Set < InetAddress > epSet ) { int size = epSet . size ( ) ; if ( size < 1 ) return false ; /* Generate a random number from 0 -> size */ List < InetAddress > liveEndpoints = new ArrayList < InetAddress > ( epSet ) ; int index = ( size == 1 ) ? 0 : random . nextInt ( size ) ; InetAddress to = liveEndpoints . get ( index ) ; if ( logger . isTraceEnabled ( ) ) logger . trace ( "Sending a GossipDigestSynMessage to {} ..." , to ) ; try { MessagingService . instance ( ) . sendOneWay ( prod . getMessage ( getVersion ( to ) ) , to ) ; } catch ( IOException ex ) { throw new IOError ( ex ) ; } return seeds . contains ( to ) ; }
Returns true if the chosen target was also a seed.
Returns true if the chosen target was also a seed .