@Override
  public void toData(DataOutput out,
      SerializationContext context) throws IOException {
    super.toData(out, context);
    DataSerializer.writeByte(keys, out);
    if (keys == KEY_LIST) {
      DataSerializer.writeHashMap(bucketKeys, out);
    } else if (keys == ALL_KEYS) {
      DataSerializer.writeHashSet(bucketIds, out);
    }
    DataSerializer.writeString(regex, out);
    DataSerializer.writePrimitiveBoolean(allowTombstones, out);
  }
Sends a PartitionedRegion message to fetch all the entries for a bucketId

@param recipient the member that the fetch keys message is sent to
@param r the PartitionedRegion that contains the bucket
@param bucketIds the identity of the buckets that contain the entries to be returned
@param regex the regular expression to be evaluated for selecting keys
@return the processor used to read the returned entries
@throws ForceReattemptException if the peer is no longer available
geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/FetchBulkEntriesMessage.java