code: public static void setExpirationTimes(long operationTTLMillis, long operationMaxIdleMillis, Record record,
                                            MapConfig mapConfig, boolean consultMapConfig) {
          long ttlMillis = pickTTLMillis(operationTTLMillis, record.getTtl(), mapConfig, consultMapConfig);
          long maxIdleMillis = pickMaxIdleMillis(operationMaxIdleMillis, record.getMaxIdle(), mapConfig, consultMapConfig);
  
          record.setTtl(ttlMillis);
          record.setMaxIdle(maxIdleMillis);
          setExpirationTime(record);
      }
docs: Updates records TTL and expiration time.
  
  @param operationTTLMillis user provided TTL during operation call like put with TTL
  @param record             record to be updated
  @param mapConfig          map config object
  @param consultMapConfig   give {@code true} if this update should consult map ttl configuration,
  otherwise give {@code false} to indicate update