public void setRegionTimeToLive(ExpirationAttributes timeToLive) {
    if (timeToLive == null) {
      throw new IllegalArgumentException(
          "timeToLive must not be null");
    }
    regionAttributes.regionTimeToLive = timeToLive.getTimeout();
    regionAttributes.regionTimeToLiveExpirationAction = timeToLive.getAction();
    regionAttributes.setHasRegionTimeToLive(true);
  }
Sets the timeToLive expiration attributes for the region itself for the next
{@code RegionAttributes} created. Default is 0 i.e. no expiration of this type.

@param timeToLive the ExpirationAttributes for this region timeToLive
@throws IllegalArgumentException if timeToLive is null
geode-core/src/main/java/org/apache/geode/cache/AttributesFactory.java