public MembershipChangeListener create(Duration warningDelay, Duration pollDuration,
      BooleanSupplier cancelCondition, Runnable warning) {
    requireNonNull(warningDelay);
    requireNonNull(pollDuration);

    int diff = warningDelay.compareTo(pollDuration);
    if (diff >= 0) {
      throw new IllegalArgumentException("Warning delay \"" + warningDelay.getSeconds()
          + "\" seconds must be less than poll duration \"" + pollDuration.getSeconds()
          + "\" seconds.");
    }

    return new MembershipChangeListener(warningDelay, pollDuration, cancelCondition, warning);
  }
Creates instances of {@link MembershipChangeListener} with validation of arguments.

<p>
The warning delay must be less than the poll duration. If the values are identical then the
persistence advisors will fail to log warnings about missing persistent members.
geode-core/src/main/java/org/apache/geode/internal/cache/persistence/MembershipChangeListenerFactory.java