public List<BucketRegion> getSortedBuckets() {
    if (!bucketSorterStarted.get()) {
      bucketSorterStarted.set(true);
      bucketSorter.scheduleAtFixedRate(new BucketSorterRunnable(), 0,
          HeapEvictor.BUCKET_SORTING_INTERVAL, TimeUnit.MILLISECONDS);
      if (logger.isDebugEnabled()) {
        logger.debug(
            "Started BucketSorter to sort the buckets according to number of entries in each bucket for every {} milliseconds",
            HeapEvictor.BUCKET_SORTING_INTERVAL);
      }
    }
    if (!bucketSortedOnce.get()) {
      while (bucketSortedOnce.get() == false) {
      }
    }
    return new ArrayList<>(sortedBuckets);
  }
Changes the CustomExpiry for idleTimeout for values in the region

@param custom the new CustomExpiry
@return the old CustomExpiry
geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegion.java