private void removeWithViewLock(ID dm, boolean crashed, String reason) {
    final boolean wasShunned = isShunned(dm);

    // Delete resources
    destroyMember(dm, reason);

    if (wasShunned) {
      return; // Explicit deletion, no upcall.
    }

    if (!isMemberShuttingDown(dm)) {
      // if we've received a shutdown message then DistributionManager will already have
      // notified listeners
      listener.memberDeparted(dm, crashed, reason);
    }
  }
Remove a member. {@link #latestViewWriteLock} must be held before this method is called. If
member is not already shunned, the uplevel event handler is invoked.
geode-membership/src/main/java/org/apache/geode/distributed/internal/membership/gms/GMSMembership.java