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%2FCreateTransactionChainReply.java;h=4a497622fc1934978b172b60556a00409beb382e;hp=49dd9b63d2d6d96f991f63c4e82a380870adfdce;hb=4c22825994c2519fb1c9d63f0050ebf35c4f8439;hpb=9d50e2ca76cf1a5eb0636d4a5a704b49ec4a8a25 diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/CreateTransactionChainReply.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/CreateTransactionChainReply.java index 49dd9b63d2..4a497622fc 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/CreateTransactionChainReply.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/CreateTransactionChainReply.java @@ -9,8 +9,11 @@ package org.opendaylight.controller.cluster.datastore.messages; import akka.actor.ActorPath; +import akka.actor.ActorSystem; +import org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionChainMessages; -public class CreateTransactionChainReply { +public class CreateTransactionChainReply implements SerializableMessage { + public static final Class SERIALIZABLE_CLASS = ShardTransactionChainMessages.CreateTransactionChainReply.class; private final ActorPath transactionChainPath; public CreateTransactionChainReply(ActorPath transactionChainPath) { @@ -20,4 +23,17 @@ public class CreateTransactionChainReply { public ActorPath getTransactionChainPath() { return transactionChainPath; } + + @Override + public ShardTransactionChainMessages.CreateTransactionChainReply toSerializable() { + return ShardTransactionChainMessages.CreateTransactionChainReply.newBuilder() + .setTransactionChainPath(transactionChainPath.toString()).build(); + } + + public static CreateTransactionChainReply fromSerializable(ActorSystem actorSystem,Object serializable){ + ShardTransactionChainMessages.CreateTransactionChainReply o = (ShardTransactionChainMessages.CreateTransactionChainReply) serializable; + return new CreateTransactionChainReply( + actorSystem.actorFor(o.getTransactionChainPath()).path()); + } + }