src/java/org/apache/cassandra/gms/Gossiper.java
/**
     * This method is called whenever there is a "big" change in ep state (a generation change for a known node).
     *
     * @param ep endpoint
     * @param epState EndpointState for the endpoint
     */
This method is called whenever there is a "big" change in ep state (a generation change for a known node).
@param ep endpoint
@param epState EndpointState for the endpoint
This method is called whenever there is a " big " change in ep state ( a generation change for a known node ) . @param ep endpoint @param epState EndpointState for the endpoint
private void handleMajorStateChange(InetAddress ep, EndpointState epState)
    {
        if (!isDeadState(epState))
        {
            if (endpointStateMap.get(ep) != null)
                logger.info("Node {} has restarted, now UP", ep);
            else
                logger.info("Node {} is now part of the cluster", ep);
        }
        if (logger.isTraceEnabled())
            logger.trace("Adding endpoint state for " + ep);
        endpointStateMap.put(ep, epState);
        for (IEndpointStateChangeSubscriber subscriber : subscribers)
            subscriber.onRestart(ep, epState);
        if (!isDeadState(epState))
            markAlive(ep, epState);
        else
        {
            logger.debug("Not marking " + ep + " alive due to dead state");
            markDead(ep, epState);
        }
        for (IEndpointStateChangeSubscriber subscriber : subscribers)
            subscriber.onJoin(ep, epState);
    }
private void handleMajorStateChange ( InetAddress ep , EndpointState epState ) { if ( ! isDeadState ( epState ) ) { if ( endpointStateMap . get ( ep ) != null ) logger . info ( "Node {} has restarted, now UP" , ep ) ; else logger . info ( "Node {} is now part of the cluster" , ep ) ; } if ( logger . isTraceEnabled ( ) ) logger . trace ( "Adding endpoint state for " + ep ) ; endpointStateMap . put ( ep , epState ) ; for ( IEndpointStateChangeSubscriber subscriber : subscribers ) subscriber . onRestart ( ep , epState ) ; if ( ! isDeadState ( epState ) ) markAlive ( ep , epState ) ; else { logger . debug ( "Not marking " + ep + " alive due to dead state" ) ; markDead ( ep , epState ) ; } for ( IEndpointStateChangeSubscriber subscriber : subscribers ) subscriber . onJoin ( ep , epState ) ; }
This method is called whenever there is a "big" change in ep state (a generation change for a known node).
This method is called whenever there is a " big " change in ep state ( a generation change for a known node ) .
// the node restarted: it is up to the subscriber to take whatever action is necessary