@Override
    public void toData(DataOutput dop,
        SerializationContext context) throws IOException {
      super.toData(dop, context);
      // DataSerializer.writeString(this.haRegion.getName(), dop);
      DataSerializer.writeHashMap(emptyRegionMap, dop);
      // Write interest info.
      DataSerializer.writeHashMap(interestMaps[NON_DURABLE].allKeys, dop);
      DataSerializer.writeHashMap(interestMaps[NON_DURABLE].allKeysInv, dop);
      DataSerializer.writeHashMap(interestMaps[NON_DURABLE].keysOfInterest, dop);
      DataSerializer.writeHashMap(interestMaps[NON_DURABLE].keysOfInterestInv, dop);
      DataSerializer.writeHashMap(interestMaps[NON_DURABLE].patternsOfInterest, dop);
      DataSerializer.writeHashMap(interestMaps[NON_DURABLE].patternsOfInterestInv,
          dop);
      DataSerializer.writeHashMap(interestMaps[NON_DURABLE].filtersOfInterest, dop);
      DataSerializer.writeHashMap(interestMaps[NON_DURABLE].filtersOfInterestInv,
          dop);

      DataSerializer.writeHashMap(interestMaps[DURABLE].allKeys, dop);
      DataSerializer.writeHashMap(interestMaps[DURABLE].allKeysInv, dop);
      DataSerializer.writeHashMap(interestMaps[DURABLE].keysOfInterest, dop);
      DataSerializer.writeHashMap(interestMaps[DURABLE].keysOfInterestInv, dop);
      DataSerializer.writeHashMap(interestMaps[DURABLE].patternsOfInterest, dop);
      DataSerializer.writeHashMap(interestMaps[DURABLE].patternsOfInterestInv, dop);
      DataSerializer.writeHashMap(interestMaps[DURABLE].filtersOfInterest, dop);
      DataSerializer.writeHashMap(interestMaps[DURABLE].filtersOfInterestInv, dop);

      // Write CQ info.
      DataSerializer.writeHashMap(cqs, dop);
    }
Helper method to register the filters.
geode-core/src/main/java/org/apache/geode/internal/cache/InitialImageOperation.java