X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-distributed-datastore%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fdatastore%2Fmessages%2FReadyTransactionReply.java;h=5ddc77f8f624c15f2e75dcebf3adbc693cebfde4;hb=50a2f5eb1c94650bc1be1e49d3a5382a1a74a9b3;hp=b25a5ddf296cb729265bb5f745977926c7bb313c;hpb=9f1061c46af5220ad95d8d0b94411ba2fd832a50;p=controller.git 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; } }