X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-distributed-datastore%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fdatastore%2Fmessages%2FReadyTransactionReply.java;h=5ddc77f8f624c15f2e75dcebf3adbc693cebfde4;hp=b25a5ddf296cb729265bb5f745977926c7bb313c;hb=24c074a4b32ac97980a652b78824b7c2f97ffb78;hpb=2727bea09c83646b6cbd2ef9672d0b7f6cf3b22f diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/ReadyTransactionReply.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/ReadyTransactionReply.java index b25a5ddf29..5ddc77f8f6 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/ReadyTransactionReply.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/ReadyTransactionReply.java @@ -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 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; } }