public void close() {
    try {
      synchronized (this) {
        membershipClosed = true;
        operationMonitor.close();
      }
      getDistributionManagerWithNoCheck().removeMembershipListener(membershipListener);
    } catch (CancelException e) {
      // if distribution has stopped, above is a no-op.
    } catch (IllegalArgumentException ignore) {
      // this is thrown if the listener is no longer registered
    }
  }
Free up resources used by this advisor once it is no longer being used.

@since GemFire 3.5
geode-core/src/main/java/org/apache/geode/distributed/internal/DistributionAdvisor.java