protected boolean isExpirationPossible() throws EntryNotFoundException {
    long expTime = getExpirationTime();
    if (expTime > 0L) {
      long now = getNow();
      if (hasExpired(now, expTime)) {
        if (isIdleExpiredOnOthers()) {
          return true;
        } else {
          // our last access time was reset so recheck
          expTime = getExpirationTime();
          return expTime > 0L && hasExpired(now, expTime);
        }
      }
    }
    return false;
  }
Return true if current task could have expired. Return false if expiration is impossible.
geode-core/src/main/java/org/apache/geode/internal/cache/ExpiryTask.java