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%2FCreateTransactionReply.java;h=5bc0c74a2f9bb425664c66841ad79f74bbdb0b4c;hb=c1336f9b497bc6867536a24f629c3f0b002ccb2f;hp=43ce2ec19b40b2f489cfc5f7f9b9046dfc78165e;hpb=24c074a4b32ac97980a652b78824b7c2f97ffb78;p=controller.git diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/CreateTransactionReply.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/CreateTransactionReply.java index 43ce2ec19b..5bc0c74a2f 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/CreateTransactionReply.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/CreateTransactionReply.java @@ -12,41 +12,43 @@ import com.google.common.base.Preconditions; import java.io.IOException; import java.io.ObjectInput; import java.io.ObjectOutput; +import org.opendaylight.controller.cluster.access.concepts.TransactionIdentifier; public class CreateTransactionReply extends VersionedExternalizableMessage { private static final long serialVersionUID = 1L; private String transactionPath; - private String transactionId; + private TransactionIdentifier transactionId; public CreateTransactionReply() { } - public CreateTransactionReply(final String transactionPath, final String transactionId, final short version) { + public CreateTransactionReply(final String transactionPath, final TransactionIdentifier transactionId, + final short version) { super(version); - this.transactionPath = transactionPath; - this.transactionId = transactionId; + this.transactionPath = Preconditions.checkNotNull(transactionPath); + this.transactionId = Preconditions.checkNotNull(transactionId); } public String getTransactionPath() { return transactionPath; } - public String getTransactionId() { + public TransactionIdentifier getTransactionId() { return transactionId; } @Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { super.readExternal(in); - transactionId = in.readUTF(); + transactionId = TransactionIdentifier.readFrom(in); transactionPath = in.readUTF(); } @Override public void writeExternal(ObjectOutput out) throws IOException { super.writeExternal(out); - out.writeUTF(transactionId); + transactionId.writeTo(out); out.writeUTF(transactionPath); }