code: public static ExpiryPolicy<Object, Object> timeToIdleExpiration(Duration timeToIdle) {
      Objects.requireNonNull(timeToIdle, "TTI duration cannot be null");
      if (timeToIdle.isNegative()) {
        throw new IllegalArgumentException("TTI duration cannot be negative");
      }
      return new TimeToIdleExpiryPolicy(timeToIdle);
    }
docs: Get a time-to-idle (TTI) {@link ExpiryPolicy} instance for the given {@link Duration}.
  
  @param timeToIdle the TTI duration
  @return a TTI expiry