Use YangInstanceIdentifier.EMPTY
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / messages / CanCommitTransactionReply.java
index fa4fca508916725db298b4bb7bc20e1863005b3e..6b88b96ca6ac7f2363647fe8189aa5537bdb2ef7 100644 (file)
@@ -20,9 +20,11 @@ public class CanCommitTransactionReply extends VersionedExternalizableMessage {
     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();
 
@@ -52,13 +54,10 @@ public class CanCommitTransactionReply extends VersionedExternalizableMessage {
         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