private void dispatchMessage(DistributionMessage msg){
  InternalDistributedMember m=msg.getSender();
  boolean shunned=false;
  if (isShunnedOrNew(m)) {
    latestViewWriteLock.lock();
    try {
      if (isShunned(m)) {
        if (msg instanceof StartupMessage) {
          endShun(m);
        }
 else {
          shunned=true;
        }
      }
      if (!shunned) {
        if (isNew(m)) {
          shunned=!addSurpriseMember(m);
        }
      }
    }
  finally {
      latestViewWriteLock.unlock();
    }
  }
  if (shunned) {
    warnShun(m);
    if (logger.isTraceEnabled(LogMarker.DISTRIBUTION_VIEWS)) {
      logger.trace(LogMarker.DISTRIBUTION_VIEWS,"Membership: Ignoring message from shunned member <{}>:{}",m,msg);
    }
    throw new MemberShunnedException(m);
  }
  listener.messageReceived(msg);
}

private void dispatchMessage ( DistributionMessage msg ) { InternalDistributedMember m = msg . getSender ( ) ; boolean shunned = false ; if ( isShunnedOrNew ( m ) ) { latestViewWriteLock . lock ( ) ; try { if ( isShunned ( m ) ) { if ( msg instanceof StartupMessage ) { endShun ( m ) ; } else { shunned = true ; } } if ( ! shunned ) { if ( isNew ( m ) ) { shunned = ! addSurpriseMember ( m ) ; } } } finally { latestViewWriteLock . unlock ( ) ; } } if ( shunned ) { warnShun ( m ) ; if ( logger . isTraceEnabled ( LogMarker . DISTRIBUTION_VIEWS ) ) { logger . trace ( LogMarker . DISTRIBUTION_VIEWS , "Membership: Ignoring message from shunned member <{}>:{}" , m , msg ) ; } throw new MemberShunnedException ( m ) ; } listener . messageReceived ( msg ) ; }
logic for processing a distribution message . < p > it is possible to receive messages not consistent with our view . we handle this here , and generate an uplevel event if necessary
