private static final CanCommitTransactionReply NO =
new CanCommitTransactionReply(false, DataStoreVersions.CURRENT_VERSION);
+ @Deprecated
private static final ThreePhaseCommitCohortMessages.CanCommitTransactionReply YES_SERIALIZED =
ThreePhaseCommitCohortMessages.CanCommitTransactionReply.newBuilder().setCanCommit(true).build();
+ @Deprecated
private static final ThreePhaseCommitCohortMessages.CanCommitTransactionReply NO_SERIALIZED =
ThreePhaseCommitCohortMessages.CanCommitTransactionReply.newBuilder().setCanCommit(false).build();
out.writeBoolean(canCommit);
}
+ @Deprecated
@Override
- public Object toSerializable() {
- if(getVersion() >= DataStoreVersions.BORON_VERSION) {
- return this;
- } else {
- return canCommit ? YES_SERIALIZED : NO_SERIALIZED;
- }
+ protected Object newLegacySerializedInstance() {
+ return canCommit ? YES_SERIALIZED : NO_SERIALIZED;
}
@Override