@Override
    public void toData(DataOutput out,
        SerializationContext context) throws IOException {
      super.toData(out, context);
      if (profiles == null) {
        out.writeInt(-1);
      } else {
        int length = profiles.length;
        out.writeInt(length);
        for (final Profile profile : profiles) {
          DataSerializer.writeObject(profile, out);
        }
      }
    }
Used to return multiple profiles

@since GemFire 5.7
geode-core/src/main/java/org/apache/geode/internal/cache/UpdateAttributesProcessor.java