boolean isExpiredWithRegardTo(Object key, int ttl, int idleTime) {
    if (!getAttributes().getStatisticsEnabled()) {
      return false;
    }

    long expTime;
    try {
      expTime = new NetSearchExpirationCalculator(this, key, ttl, idleTime).getExpirationTime();
    } catch (EntryNotFoundException ignore) {
      return true;
    }

    return expTime != 0 && expTime <= cacheTimeMillis();
  }
Determines whether the receiver is unexpired with regard to the given timeToLive and idleTime
attributes, which may different from this entry's actual attributes. Used for validation of
objects during netSearch(), which must validate remote entries against local timeout
attributes.
geode-core/src/main/java/org/apache/geode/internal/cache/LocalRegion.java