@Override
    public void toData(DataOutput out,
        SerializationContext context) throws IOException {

      super.toData(out, context);
      context.getSerializer().writeObject(eventId, out);
      InternalDataSerializer.writeUnsignedVL(removeAllDataSize, out);
      if (removeAllDataSize > 0) {
        EntryVersionsList versionTags = new EntryVersionsList(removeAllDataSize);

        boolean hasTags = false;
        for (int i = 0; i < removeAllDataSize; i++) {
          if (!hasTags && removeAllData[i].versionTag != null) {
            hasTags = true;
          }
          VersionTag<?> tag = removeAllData[i].versionTag;
          versionTags.add(tag);
          removeAllData[i].versionTag = null;
          removeAllData[i].serializeTo(out, context);
          removeAllData[i].versionTag = tag;
        }

        out.writeBoolean(hasTags);
        if (hasTags) {
          InternalDataSerializer.invokeToData(versionTags, out);
        }
      }
      if (this.context != null) {
        context.getSerializer().writeObject(this.context, out);
      }
    }
create an event for a RemoveAllEntryData element

@return the event to be used in applying the element
geode-core/src/main/java/org/apache/geode/internal/cache/DistributedRemoveAllOperation.java