- public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
- in.readShort(); // version
-
- SerializationUtils.deserializePathAndNode(in, this, APPLIER);
- }
-
- @Override
- public void writeExternal(ObjectOutput out) throws IOException {
- out.writeShort(DataStoreVersions.CURRENT_VERSION);
- SerializationUtils.serializePathAndNode(getPath(), data, out);
+ public void readExternal(final ObjectInput in) throws IOException {
+ SerializationUtils.readNodeAndPath(in, this, (instance, path, node) -> {
+ instance.setPath(path);
+ instance.data = node;
+ });