public void addToBucketIndexes(Region r, Index index) {
    synchronized (bucketIndexes) {
      setArbitraryBucketIndex(index);
      List<Index> indexes = bucketIndexes.get(r);
      if (indexes == null) {
        indexes = new ArrayList<>();
      }
      indexes.add(index);
      bucketIndexes.put(r, indexes);
    }
  }
Adds an index on a bucket to the list of already indexed buckets in the partitioned region.

@param index bucket index to be added to the list.
geode-core/src/main/java/org/apache/geode/cache/query/internal/index/PartitionedIndex.java