BUG-5280: remove support for talking to pre-Boron clients
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / messages / ReadyTransactionReply.java
index b25a5ddf296cb729265bb5f745977926c7bb313c..5ddc77f8f624c15f2e75dcebf3adbc693cebfde4 100644 (file)
@@ -12,14 +12,10 @@ import java.io.IOException;
 import java.io.ObjectInput;
 import java.io.ObjectOutput;
 import org.opendaylight.controller.cluster.datastore.DataStoreVersions;
-import org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages;
 
 public class ReadyTransactionReply extends VersionedExternalizableMessage {
     private static final long serialVersionUID = 1L;
 
-    public static final Class<ShardTransactionMessages.ReadyTransactionReply> SERIALIZABLE_CLASS =
-            ShardTransactionMessages.ReadyTransactionReply.class;
-
     private String cohortPath;
 
     public ReadyTransactionReply() {
@@ -50,27 +46,11 @@ public class ReadyTransactionReply extends VersionedExternalizableMessage {
         out.writeUTF(cohortPath);
     }
 
-    @Override
-    public Object toSerializable() {
-        if(getVersion() >= DataStoreVersions.LITHIUM_VERSION) {
-            return this;
-        } else {
-            return ShardTransactionMessages.ReadyTransactionReply.newBuilder().setActorPath(cohortPath).build();
-        }
-    }
-
     public static ReadyTransactionReply fromSerializable(Object serializable) {
-        if(serializable instanceof ReadyTransactionReply) {
-            return (ReadyTransactionReply)serializable;
-        } else {
-            ShardTransactionMessages.ReadyTransactionReply o =
-                    (ShardTransactionMessages.ReadyTransactionReply) serializable;
-            return new ReadyTransactionReply(o.getActorPath(), DataStoreVersions.HELIUM_2_VERSION);
-        }
+        return (ReadyTransactionReply)serializable;
     }
 
     public static boolean isSerializedType(Object message) {
-        return message instanceof ReadyTransactionReply ||
-               message instanceof ShardTransactionMessages.ReadyTransactionReply;
+        return message instanceof ReadyTransactionReply;
     }
 }