public class DataExistsReply extends VersionedExternalizableMessage {
private static final long serialVersionUID = 1L;
+ @Deprecated
private static final ShardTransactionMessages.DataExistsReply SERIALIZABLE_TRUE =
ShardTransactionMessages.DataExistsReply.newBuilder().setExists(true).build();
+ @Deprecated
private static final ShardTransactionMessages.DataExistsReply SERIALIZABLE_FALSE =
ShardTransactionMessages.DataExistsReply.newBuilder().setExists(false).build();
out.writeBoolean(exists);
}
+ @Deprecated
@Override
- public Object toSerializable() {
- if(getVersion() >= DataStoreVersions.BORON_VERSION) {
- return this;
- } else {
- return exists ? SERIALIZABLE_TRUE : SERIALIZABLE_FALSE;
- }
+ protected Object newLegacySerializedInstance() {
+ return exists ? SERIALIZABLE_TRUE : SERIALIZABLE_FALSE;
}
public static DataExistsReply fromSerializable(final Object serializable) {