public synchronized void waitForChange() throws InterruptedException {
    Instant now = now();
    Instant timeoutTime = now.plus(pollDuration);
    Instant warningTime = now.plus(warningDelay);

    while (!membershipChanged && !cancelCondition.getAsBoolean() && now().isBefore(timeoutTime)) {
      warnOnceAfter(warningTime);
      wait(POLL_INTERVAL_MILLIS);
    }

    membershipChanged = false;
  }
Wait for membership change and log warning after waiting at least the warning delay.
geode-core/src/main/java/org/apache/geode/internal/cache/persistence/MembershipChangeListener.java