public Set handleRemoteGetKeys(Integer bucketId, final @NotNull InterestType interestType,
      Object interestArg,
      boolean allowTombstones) throws PRLocallyDestroyedException, ForceReattemptException {
    if (logger.isDebugEnabled()) {
      logger.debug("handleRemoteGetKeys: bucketId: {}{}{} with tombstones {}",
          partitionedRegion.getPRId(), PartitionedRegion.BUCKET_ID_SEPARATOR, bucketId,
          allowTombstones);
    }
    Set ret = Collections.EMPTY_SET;
    final BucketRegion r = getInitializedBucketForId(null, bucketId);
    try {
      if (r != null) {
        invokeBucketReadHook();
        if (!r.isEmpty() || (allowTombstones && r.getTombstoneCount() > 0)) {
          ret = r.getKeysWithInterest(interestType, interestArg, allowTombstones);
        }
        checkIfBucketMoved(r);
      }
    } catch (RegionDestroyedException rde) {
      if (partitionedRegion.isLocallyDestroyed || partitionedRegion.isClosed) {
        throw new PRLocallyDestroyedException(rde);
      } else {
        getPartitionedRegion().checkReadiness();
        if (r.isBucketDestroyed()) {
          // bucket moved by rebalance
          throw new ForceReattemptException("Bucket removed during remoteGetKeys", rde);
        } else {
          throw new RegionDestroyedException(
              String.format("Unable to fetch keys on %s",
                  partitionedRegion),
              partitionedRegion.getFullPath(), rde);
        }
      }
    }
    return ret;
  }
Handle a remote request for keys for the provided bucketId

@param allowTombstones whether to return destroyed entries
@return The <code>Set</code> of keys for bucketId or {@link Collections#EMPTY_SET}if no keys
        are present
@throws PRLocallyDestroyedException if the PartitionRegion is locally destroyed
geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionDataStore.java