public int[] getBucketSerials() {
    int[] result;
    if (buckets == null) {
      PartitionedRegion p = getPartitionedRegion();
      int numBuckets = p.getAttributes().getPartitionAttributes().getTotalNumBuckets();
      result = new int[numBuckets];
      Arrays.fill(result, ILLEGAL_SERIAL);
      return result;
    }
    result = new int[buckets.length];

    for (int i = 0; i < result.length; i++) {
      ProxyBucketRegion pbr = buckets[i];
      Bucket b = pbr.getCreatedBucketRegion();
      if (b == null) {
        result[i] = ILLEGAL_SERIAL;
      } else {
        result[i] = b.getSerialNumber();
      }
    }
    return result;
  }
@return array of serial numbers for buckets created locally
geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/RegionAdvisor.java