示例#1
0
 void markAlive(InetAddress addr, EndpointState localState) {
   if (logger_.isTraceEnabled()) logger_.trace("marking as alive {}", addr);
   if (!localState.isAlive()) {
     isAlive(addr, localState, true);
     logger_.info("InetAddress {} is now UP", addr);
   }
 }
示例#2
0
 /**
  * This method is part of IFailureDetectionEventListener interface. This is invoked by the Failure
  * Detector when it convicts an end point.
  *
  * <p>param @ endpoint end point that is convicted.
  */
 public void convict(InetAddress endpoint) {
   EndpointState epState = endpointStateMap_.get(endpoint);
   if (epState.isAlive()) {
     logger_.info("InetAddress {} is now dead.", endpoint);
     isAlive(endpoint, epState, false);
   }
 }
示例#3
0
 /**
  * This method is called whenever there is a "big" change in ep state (either a previously unknown
  * node or a generation change for a known node). If the node is new, it will be initially marked
  * as dead. It will be marked alive as soon as another piece of gossip arrives. On the other hand
  * if the node is already known (generation change), we will immediately mark it alive.
  *
  * @param ep endpoint
  * @param epState EndpointState for the endpoint
  * @param isKnownNode is this node familiar to us already (present in endpointStateMap)
  */
 private void handleMajorStateChange(InetAddress ep, EndpointState epState, boolean isKnownNode) {
   endpointStateMap_.put(ep, epState);
   isAlive(ep, epState, isKnownNode);
   for (IEndpointStateChangeSubscriber subscriber : subscribers_) subscriber.onJoin(ep, epState);
 }