- @Override public Object toSerializable() {
- return ShardTransactionMessages.DataExistsReply.newBuilder()
- .setExists(exists).build();
+ @Override
+ public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
+ super.readExternal(in);
+ exists = in.readBoolean();
+ }
+
+ @Override
+ public void writeExternal(ObjectOutput out) throws IOException {
+ super.writeExternal(out);
+ out.writeBoolean(exists);
+ }
+
+ @Deprecated
+ @Override
+ protected Object newLegacySerializedInstance() {
+ return exists ? SERIALIZABLE_TRUE : SERIALIZABLE_FALSE;