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%2FCanCommitTransactionReply.java;h=bbcd4de03facf583db5e9def54d9512bde2ebb1b;hb=516a4b2ea78179c9bd6ebb584862e8fc686ebf08;hp=d143c14b3bd491147d5dabc42301878601f4a99f;hpb=f78020d87663c8d9db1e4e33939f7b8b703703f8;p=controller.git diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/CanCommitTransactionReply.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/CanCommitTransactionReply.java index d143c14b3b..bbcd4de03f 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/CanCommitTransactionReply.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/CanCommitTransactionReply.java @@ -8,7 +8,10 @@ package org.opendaylight.controller.cluster.datastore.messages; -public class CanCommitTransactionReply { +import org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages; + +public class CanCommitTransactionReply implements SerializableMessage { + public static Class SERIALIZABLE_CLASS = ThreePhaseCommitCohortMessages.CanCommitTransactionReply.class; private final Boolean canCommit; public CanCommitTransactionReply(Boolean canCommit) { @@ -18,4 +21,14 @@ public class CanCommitTransactionReply { public Boolean getCanCommit() { return canCommit; } + + @Override + public Object toSerializable() { + return ThreePhaseCommitCohortMessages.CanCommitTransactionReply.newBuilder().setCanCommit(canCommit).build(); + } + + + public static CanCommitTransactionReply fromSerializable(Object message) { + return new CanCommitTransactionReply(((ThreePhaseCommitCohortMessages.CanCommitTransactionReply)message).getCanCommit()); + } }