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=475ef3a3633d49566b719c2d3e138820cb08384a;hb=8ec73bf853a9b6708b455c0321a585992e02b125;hp=b25a5ddf296cb729265bb5f745977926c7bb313c;hpb=fe45ad923c8cf83d730cf4d576c310967afabdf3;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..475ef3a363 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() { @@ -51,26 +47,16 @@ public class ReadyTransactionReply extends VersionedExternalizableMessage { } @Override - public Object toSerializable() { - if(getVersion() >= DataStoreVersions.LITHIUM_VERSION) { - return this; - } else { - return ShardTransactionMessages.ReadyTransactionReply.newBuilder().setActorPath(cohortPath).build(); - } + protected Object newLegacySerializedInstance() { + // no legacy serialized type for this class; return self + return this; } 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; } }