Make The client model serializable
I am working on a mongodb connector for the Apache Flink project - https://flink.apache.org/
Internally, Flink is using java serialization to save the records it is working on in a state which in turn used to recover from failures etc, as well as for passing records between different tasks in the pipeline.
I have noticed the mongodb client model classes are not Serializable for instance, classes such as WriteModel https://github.com/mongodb/mongo-java-driver/blob/master/driver-core/src/main/com/mongodb/client/model/WriteModel.java and its subclasses or the different Options like ReplaceOptions https://github.com/mongodb/mongo-java-driver/blob/master/driver-core/src/main/com/mongodb/client/model/ReplaceOptions.java
is there a reason for these classes to not be declared Serializable? Is there a way to contribute to the Java driver project by opening a PR that addresses this?
![](https://secure.gravatar.com/avatar/595f20ac619c15a39564ffa7f2345ec8?size=40&default=https%3A%2F%2Fassets.uvcdn.com%2Fpkg%2Fadmin%2Ficons%2Fuser_70-6bcf9e08938533adb9bac95c3e487cb2a6d4a32f890ca6fdc82e3072e0ea0368.png)