@Override
  public ExpirationAttributes setRegionTimeToLive(ExpirationAttributes timeToLive) {
    ExpirationAttributes attr = super.setRegionTimeToLive(timeToLive);
    // Set to Bucket regions as well
    if (getDataStore() != null) { // not for accessors
      for (Object o : getDataStore().getAllLocalBuckets()) {
        Map.Entry entry = (Map.Entry) o;
        Region bucketRegion = (Region) entry.getValue();
        bucketRegion.getAttributesMutator().setRegionTimeToLive(timeToLive);
      }
    }
    return attr;
  }
Changes the timeToLive expiration attributes for the partitioned region as a whole

@param timeToLive the expiration attributes for the region timeToLive
@return the previous value of region timeToLive
@throws IllegalArgumentException if timeToLive is null or if the ExpirationAction is
        LOCAL_INVALIDATE and the region is {@link DataPolicy#withReplication replicated}
@throws IllegalStateException if statistics are disabled for this region.
geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegion.java