From 24c074a4b32ac97980a652b78824b7c2f97ffb78 Mon Sep 17 00:00:00 2001 From: Robert Varga Date: Thu, 19 May 2016 17:31:22 +0200 Subject: [PATCH 1/1] BUG-5280: remove support for talking to pre-Boron clients Both transaction chains and transaction identifiers are being changed to structured data. Unfortunately there is no way to reliably map string identifiers from versions prior to Boron in a consistent manner. Pre-Boron messages do not have a concept of a frontend identifier nor its generation. Implementations are assigning them in a non-deterministic order and rely on timestamps to disambiguate between generations. Since Shard-internal state keeping and replication logic will require these concepts, this patch marks a clean break in compatibility. This compatibility is only needed in mixed-version clusters, which have not been validated to work and even if the data store works, it cannot cope with model mismatches expected from differing versions. Change-Id: I168fa0a98be10aebd680ce3323c458aad7f15865 Signed-off-by: Robert Varga --- .../ThreePhaseCommitCohortMessages.java | 3404 -------------- .../ShardTransactionChainMessages.java | 900 ---- .../transaction/ShardTransactionMessages.java | 3951 ----------------- .../ThreePhaseCommitCohortMessagesTest.java | 68 - .../ShardTransactionChainMessagesTest.java | 43 - .../ShardTransactionMessagesTest.java | 85 - .../datastore/messages/AbortTransaction.java | 19 +- .../messages/AbortTransactionReply.java | 14 +- .../messages/BatchedModificationsReply.java | 6 - .../messages/CanCommitTransaction.java | 21 +- .../messages/CanCommitTransactionReply.java | 28 +- .../datastore/messages/CloseTransaction.java | 14 +- .../messages/CloseTransactionChain.java | 23 +- .../messages/CloseTransactionReply.java | 6 - .../datastore/messages/CommitTransaction.java | 22 +- .../messages/CommitTransactionReply.java | 14 +- .../datastore/messages/CreateTransaction.java | 22 +- .../messages/CreateTransactionReply.java | 22 +- .../datastore/messages/DataExists.java | 22 +- .../datastore/messages/DataExistsReply.java | 26 +- .../cluster/datastore/messages/ReadData.java | 22 +- .../datastore/messages/ReadDataReply.java | 6 - .../messages/ReadyTransactionReply.java | 6 - .../VersionedExternalizableMessage.java | 12 +- .../MutableCompositeModification.java | 46 +- .../datastore/ShardTransactionTest.java | 31 - .../ThreePhaseCommitCohortProxyTest.java | 18 - .../datastore/compat/PreBoronShardTest.java | 129 - .../compat/PreBoronTransactionProxyTest.java | 166 - .../messages/AbortTransactionReplyTest.java | 12 - .../messages/AbortTransactionTest.java | 17 - .../CanCommitTransactionReplyTest.java | 12 - .../messages/CanCommitTransactionTest.java | 18 - .../messages/CloseTransactionChainTest.java | 17 - .../messages/CommitTransactionReplyTest.java | 12 - .../messages/CommitTransactionTest.java | 17 - .../messages/CreateTransactionReplyTest.java | 19 - .../messages/CreateTransactionTest.java | 20 - .../messages/DataExistsReplyTest.java | 16 - .../datastore/messages/DataExistsTest.java | 18 - .../datastore/messages/ReadDataTest.java | 18 - 41 files changed, 50 insertions(+), 9292 deletions(-) delete mode 100644 opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/protobuff/messages/cohort3pc/ThreePhaseCommitCohortMessages.java delete mode 100644 opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/protobuff/messages/transaction/ShardTransactionChainMessages.java delete mode 100644 opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/protobuff/messages/transaction/ShardTransactionMessages.java delete mode 100644 opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/protobuff/messages/cohort3pc/ThreePhaseCommitCohortMessagesTest.java delete mode 100644 opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/protobuff/messages/transaction/ShardTransactionChainMessagesTest.java delete mode 100644 opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/protobuff/messages/transaction/ShardTransactionMessagesTest.java delete mode 100644 opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/compat/PreBoronShardTest.java delete mode 100644 opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/compat/PreBoronTransactionProxyTest.java diff --git a/opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/protobuff/messages/cohort3pc/ThreePhaseCommitCohortMessages.java b/opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/protobuff/messages/cohort3pc/ThreePhaseCommitCohortMessages.java deleted file mode 100644 index 2f6726a6be..0000000000 --- a/opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/protobuff/messages/cohort3pc/ThreePhaseCommitCohortMessages.java +++ /dev/null @@ -1,3404 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: Cohort.proto - -package org.opendaylight.controller.protobuff.messages.cohort3pc; - -@Deprecated -public final class ThreePhaseCommitCohortMessages { - private ThreePhaseCommitCohortMessages() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - } - public interface CanCommitTransactionOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // optional string transactionId = 1; - /** - * optional string transactionId = 1; - */ - boolean hasTransactionId(); - /** - * optional string transactionId = 1; - */ - java.lang.String getTransactionId(); - /** - * optional string transactionId = 1; - */ - com.google.protobuf.ByteString - getTransactionIdBytes(); - } - /** - * Protobuf type {@code org.opendaylight.controller.mdsal.CanCommitTransaction} - */ - public static final class CanCommitTransaction extends - com.google.protobuf.GeneratedMessage - implements CanCommitTransactionOrBuilder { - // Use CanCommitTransaction.newBuilder() to construct. - private CanCommitTransaction(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private CanCommitTransaction(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final CanCommitTransaction defaultInstance; - public static CanCommitTransaction getDefaultInstance() { - return defaultInstance; - } - - @Override - public CanCommitTransaction getDefaultInstanceForType() { - return defaultInstance; - } - - private final com.google.protobuf.UnknownFieldSet unknownFields; - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private CanCommitTransaction( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - done = true; - } - break; - } - case 10: { - bitField0_ |= 0x00000001; - transactionId_ = input.readBytes(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.internal_static_org_opendaylight_controller_mdsal_CanCommitTransaction_descriptor; - } - - @Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.internal_static_org_opendaylight_controller_mdsal_CanCommitTransaction_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransaction.class, org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransaction.Builder.class); - } - - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @Override - public CanCommitTransaction parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CanCommitTransaction(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - private int bitField0_; - // optional string transactionId = 1; - public static final int TRANSACTIONID_FIELD_NUMBER = 1; - private java.lang.Object transactionId_; - /** - * optional string transactionId = 1; - */ - @Override - public boolean hasTransactionId() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional string transactionId = 1; - */ - @Override - public java.lang.String getTransactionId() { - java.lang.Object ref = transactionId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - transactionId_ = s; - } - return s; - } - } - /** - * optional string transactionId = 1; - */ - @Override - public com.google.protobuf.ByteString - getTransactionIdBytes() { - java.lang.Object ref = transactionId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - transactionId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private void initFields() { - transactionId_ = ""; - } - private byte memoizedIsInitialized = -1; - @Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) { - return isInitialized == 1; - } - - memoizedIsInitialized = 1; - return true; - } - - @Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, getTransactionIdBytes()); - } - getUnknownFields().writeTo(output); - } - - private int memoizedSerializedSize = -1; - @Override - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) { - return size; - } - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, getTransactionIdBytes()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSerializedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - - public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransaction parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransaction parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransaction parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransaction parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransaction parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransaction parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransaction parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransaction parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransaction parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransaction parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public static Builder newBuilder() { return Builder.create(); } - @Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransaction prototype) { - return newBuilder().mergeFrom(prototype); - } - @Override - public Builder toBuilder() { return newBuilder(this); } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code org.opendaylight.controller.mdsal.CanCommitTransaction} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransactionOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.internal_static_org_opendaylight_controller_mdsal_CanCommitTransaction_descriptor; - } - - @Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.internal_static_org_opendaylight_controller_mdsal_CanCommitTransaction_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransaction.class, org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransaction.Builder.class); - } - - // Construct using org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransaction.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - private static Builder create() { - return new Builder(); - } - - @Override - public Builder clear() { - super.clear(); - transactionId_ = ""; - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @Override - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - @Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.internal_static_org_opendaylight_controller_mdsal_CanCommitTransaction_descriptor; - } - - @Override - public org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransaction getDefaultInstanceForType() { - return org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransaction.getDefaultInstance(); - } - - @Override - public org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransaction build() { - org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransaction result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @Override - public org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransaction buildPartial() { - org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransaction result = new org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransaction(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.transactionId_ = transactionId_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - @Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransaction) { - return mergeFrom((org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransaction)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransaction other) { - if (other == org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransaction.getDefaultInstance()) { - return this; - } - if (other.hasTransactionId()) { - bitField0_ |= 0x00000001; - transactionId_ = other.transactionId_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - return this; - } - - @Override - public final boolean isInitialized() { - return true; - } - - @Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransaction parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransaction) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - // optional string transactionId = 1; - private java.lang.Object transactionId_ = ""; - /** - * optional string transactionId = 1; - */ - @Override - public boolean hasTransactionId() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional string transactionId = 1; - */ - @Override - public java.lang.String getTransactionId() { - java.lang.Object ref = transactionId_; - if (!(ref instanceof java.lang.String)) { - java.lang.String s = ((com.google.protobuf.ByteString) ref) - .toStringUtf8(); - transactionId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string transactionId = 1; - */ - @Override - public com.google.protobuf.ByteString - getTransactionIdBytes() { - java.lang.Object ref = transactionId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - transactionId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string transactionId = 1; - */ - public Builder setTransactionId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - transactionId_ = value; - onChanged(); - return this; - } - /** - * optional string transactionId = 1; - */ - public Builder clearTransactionId() { - bitField0_ = (bitField0_ & ~0x00000001); - transactionId_ = getDefaultInstance().getTransactionId(); - onChanged(); - return this; - } - /** - * optional string transactionId = 1; - */ - public Builder setTransactionIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - transactionId_ = value; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:org.opendaylight.controller.mdsal.CanCommitTransaction) - } - - static { - defaultInstance = new CanCommitTransaction(true); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:org.opendaylight.controller.mdsal.CanCommitTransaction) - } - - public interface CanCommitTransactionReplyOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // required bool canCommit = 1; - /** - * required bool canCommit = 1; - */ - boolean hasCanCommit(); - /** - * required bool canCommit = 1; - */ - boolean getCanCommit(); - } - /** - * Protobuf type {@code org.opendaylight.controller.mdsal.CanCommitTransactionReply} - */ - public static final class CanCommitTransactionReply extends - com.google.protobuf.GeneratedMessage - implements CanCommitTransactionReplyOrBuilder { - // Use CanCommitTransactionReply.newBuilder() to construct. - private CanCommitTransactionReply(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private CanCommitTransactionReply(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final CanCommitTransactionReply defaultInstance; - public static CanCommitTransactionReply getDefaultInstance() { - return defaultInstance; - } - - @Override - public CanCommitTransactionReply getDefaultInstanceForType() { - return defaultInstance; - } - - private final com.google.protobuf.UnknownFieldSet unknownFields; - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private CanCommitTransactionReply( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - done = true; - } - break; - } - case 8: { - bitField0_ |= 0x00000001; - canCommit_ = input.readBool(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.internal_static_org_opendaylight_controller_mdsal_CanCommitTransactionReply_descriptor; - } - - @Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.internal_static_org_opendaylight_controller_mdsal_CanCommitTransactionReply_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransactionReply.class, org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransactionReply.Builder.class); - } - - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @Override - public CanCommitTransactionReply parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CanCommitTransactionReply(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - private int bitField0_; - // required bool canCommit = 1; - public static final int CANCOMMIT_FIELD_NUMBER = 1; - private boolean canCommit_; - /** - * required bool canCommit = 1; - */ - @Override - public boolean hasCanCommit() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * required bool canCommit = 1; - */ - @Override - public boolean getCanCommit() { - return canCommit_; - } - - private void initFields() { - canCommit_ = false; - } - private byte memoizedIsInitialized = -1; - @Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) { - return isInitialized == 1; - } - - if (!hasCanCommit()) { - memoizedIsInitialized = 0; - return false; - } - memoizedIsInitialized = 1; - return true; - } - - @Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBool(1, canCommit_); - } - getUnknownFields().writeTo(output); - } - - private int memoizedSerializedSize = -1; - @Override - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) { - return size; - } - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(1, canCommit_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSerializedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - - public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransactionReply parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransactionReply parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransactionReply parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransactionReply parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransactionReply parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransactionReply parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransactionReply parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransactionReply parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransactionReply parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransactionReply parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public static Builder newBuilder() { return Builder.create(); } - @Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransactionReply prototype) { - return newBuilder().mergeFrom(prototype); - } - @Override - public Builder toBuilder() { return newBuilder(this); } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code org.opendaylight.controller.mdsal.CanCommitTransactionReply} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransactionReplyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.internal_static_org_opendaylight_controller_mdsal_CanCommitTransactionReply_descriptor; - } - - @Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.internal_static_org_opendaylight_controller_mdsal_CanCommitTransactionReply_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransactionReply.class, org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransactionReply.Builder.class); - } - - // Construct using org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransactionReply.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - private static Builder create() { - return new Builder(); - } - - @Override - public Builder clear() { - super.clear(); - canCommit_ = false; - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @Override - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - @Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.internal_static_org_opendaylight_controller_mdsal_CanCommitTransactionReply_descriptor; - } - - @Override - public org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransactionReply getDefaultInstanceForType() { - return org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransactionReply.getDefaultInstance(); - } - - @Override - public org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransactionReply build() { - org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransactionReply result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @Override - public org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransactionReply buildPartial() { - org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransactionReply result = new org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransactionReply(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.canCommit_ = canCommit_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - @Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransactionReply) { - return mergeFrom((org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransactionReply)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransactionReply other) { - if (other == org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransactionReply.getDefaultInstance()) { - return this; - } - if (other.hasCanCommit()) { - setCanCommit(other.getCanCommit()); - } - this.mergeUnknownFields(other.getUnknownFields()); - return this; - } - - @Override - public final boolean isInitialized() { - if (!hasCanCommit()) { - - return false; - } - return true; - } - - @Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransactionReply parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CanCommitTransactionReply) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - // required bool canCommit = 1; - private boolean canCommit_ ; - /** - * required bool canCommit = 1; - */ - @Override - public boolean hasCanCommit() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * required bool canCommit = 1; - */ - @Override - public boolean getCanCommit() { - return canCommit_; - } - /** - * required bool canCommit = 1; - */ - public Builder setCanCommit(boolean value) { - bitField0_ |= 0x00000001; - canCommit_ = value; - onChanged(); - return this; - } - /** - * required bool canCommit = 1; - */ - public Builder clearCanCommit() { - bitField0_ = (bitField0_ & ~0x00000001); - canCommit_ = false; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:org.opendaylight.controller.mdsal.CanCommitTransactionReply) - } - - static { - defaultInstance = new CanCommitTransactionReply(true); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:org.opendaylight.controller.mdsal.CanCommitTransactionReply) - } - - public interface AbortTransactionOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // optional string transactionId = 1; - /** - * optional string transactionId = 1; - */ - boolean hasTransactionId(); - /** - * optional string transactionId = 1; - */ - java.lang.String getTransactionId(); - /** - * optional string transactionId = 1; - */ - com.google.protobuf.ByteString - getTransactionIdBytes(); - } - /** - * Protobuf type {@code org.opendaylight.controller.mdsal.AbortTransaction} - */ - public static final class AbortTransaction extends - com.google.protobuf.GeneratedMessage - implements AbortTransactionOrBuilder { - // Use AbortTransaction.newBuilder() to construct. - private AbortTransaction(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private AbortTransaction(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final AbortTransaction defaultInstance; - public static AbortTransaction getDefaultInstance() { - return defaultInstance; - } - - @Override - public AbortTransaction getDefaultInstanceForType() { - return defaultInstance; - } - - private final com.google.protobuf.UnknownFieldSet unknownFields; - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private AbortTransaction( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - done = true; - } - break; - } - case 10: { - bitField0_ |= 0x00000001; - transactionId_ = input.readBytes(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.internal_static_org_opendaylight_controller_mdsal_AbortTransaction_descriptor; - } - - @Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.internal_static_org_opendaylight_controller_mdsal_AbortTransaction_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransaction.class, org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransaction.Builder.class); - } - - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @Override - public AbortTransaction parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new AbortTransaction(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - private int bitField0_; - // optional string transactionId = 1; - public static final int TRANSACTIONID_FIELD_NUMBER = 1; - private java.lang.Object transactionId_; - /** - * optional string transactionId = 1; - */ - @Override - public boolean hasTransactionId() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional string transactionId = 1; - */ - @Override - public java.lang.String getTransactionId() { - java.lang.Object ref = transactionId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - transactionId_ = s; - } - return s; - } - } - /** - * optional string transactionId = 1; - */ - @Override - public com.google.protobuf.ByteString - getTransactionIdBytes() { - java.lang.Object ref = transactionId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - transactionId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private void initFields() { - transactionId_ = ""; - } - private byte memoizedIsInitialized = -1; - @Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) { - return isInitialized == 1; - } - - memoizedIsInitialized = 1; - return true; - } - - @Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, getTransactionIdBytes()); - } - getUnknownFields().writeTo(output); - } - - private int memoizedSerializedSize = -1; - @Override - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) { - return size; - } - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, getTransactionIdBytes()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSerializedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - - public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransaction parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransaction parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransaction parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransaction parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransaction parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransaction parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransaction parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransaction parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransaction parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransaction parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public static Builder newBuilder() { return Builder.create(); } - @Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransaction prototype) { - return newBuilder().mergeFrom(prototype); - } - @Override - public Builder toBuilder() { return newBuilder(this); } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code org.opendaylight.controller.mdsal.AbortTransaction} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransactionOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.internal_static_org_opendaylight_controller_mdsal_AbortTransaction_descriptor; - } - - @Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.internal_static_org_opendaylight_controller_mdsal_AbortTransaction_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransaction.class, org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransaction.Builder.class); - } - - // Construct using org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransaction.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - private static Builder create() { - return new Builder(); - } - - @Override - public Builder clear() { - super.clear(); - transactionId_ = ""; - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @Override - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - @Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.internal_static_org_opendaylight_controller_mdsal_AbortTransaction_descriptor; - } - - @Override - public org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransaction getDefaultInstanceForType() { - return org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransaction.getDefaultInstance(); - } - - @Override - public org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransaction build() { - org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransaction result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @Override - public org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransaction buildPartial() { - org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransaction result = new org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransaction(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.transactionId_ = transactionId_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - @Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransaction) { - return mergeFrom((org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransaction)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransaction other) { - if (other == org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransaction.getDefaultInstance()) { - return this; - } - if (other.hasTransactionId()) { - bitField0_ |= 0x00000001; - transactionId_ = other.transactionId_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - return this; - } - - @Override - public final boolean isInitialized() { - return true; - } - - @Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransaction parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransaction) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - // optional string transactionId = 1; - private java.lang.Object transactionId_ = ""; - /** - * optional string transactionId = 1; - */ - @Override - public boolean hasTransactionId() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional string transactionId = 1; - */ - @Override - public java.lang.String getTransactionId() { - java.lang.Object ref = transactionId_; - if (!(ref instanceof java.lang.String)) { - java.lang.String s = ((com.google.protobuf.ByteString) ref) - .toStringUtf8(); - transactionId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string transactionId = 1; - */ - @Override - public com.google.protobuf.ByteString - getTransactionIdBytes() { - java.lang.Object ref = transactionId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - transactionId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string transactionId = 1; - */ - public Builder setTransactionId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - transactionId_ = value; - onChanged(); - return this; - } - /** - * optional string transactionId = 1; - */ - public Builder clearTransactionId() { - bitField0_ = (bitField0_ & ~0x00000001); - transactionId_ = getDefaultInstance().getTransactionId(); - onChanged(); - return this; - } - /** - * optional string transactionId = 1; - */ - public Builder setTransactionIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - transactionId_ = value; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:org.opendaylight.controller.mdsal.AbortTransaction) - } - - static { - defaultInstance = new AbortTransaction(true); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:org.opendaylight.controller.mdsal.AbortTransaction) - } - - public interface AbortTransactionReplyOrBuilder - extends com.google.protobuf.MessageOrBuilder { - } - /** - * Protobuf type {@code org.opendaylight.controller.mdsal.AbortTransactionReply} - */ - public static final class AbortTransactionReply extends - com.google.protobuf.GeneratedMessage - implements AbortTransactionReplyOrBuilder { - // Use AbortTransactionReply.newBuilder() to construct. - private AbortTransactionReply(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private AbortTransactionReply(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final AbortTransactionReply defaultInstance; - public static AbortTransactionReply getDefaultInstance() { - return defaultInstance; - } - - @Override - public AbortTransactionReply getDefaultInstanceForType() { - return defaultInstance; - } - - private final com.google.protobuf.UnknownFieldSet unknownFields; - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private AbortTransactionReply( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.internal_static_org_opendaylight_controller_mdsal_AbortTransactionReply_descriptor; - } - - @Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.internal_static_org_opendaylight_controller_mdsal_AbortTransactionReply_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransactionReply.class, org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransactionReply.Builder.class); - } - - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @Override - public AbortTransactionReply parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new AbortTransactionReply(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - private void initFields() { - } - private byte memoizedIsInitialized = -1; - @Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) { - return isInitialized == 1; - } - - memoizedIsInitialized = 1; - return true; - } - - @Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - getUnknownFields().writeTo(output); - } - - private int memoizedSerializedSize = -1; - @Override - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) { - return size; - } - - size = 0; - size += getUnknownFields().getSerializedSize(); - memoizedSerializedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - - public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransactionReply parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransactionReply parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransactionReply parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransactionReply parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransactionReply parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransactionReply parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransactionReply parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransactionReply parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransactionReply parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransactionReply parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public static Builder newBuilder() { return Builder.create(); } - @Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransactionReply prototype) { - return newBuilder().mergeFrom(prototype); - } - @Override - public Builder toBuilder() { return newBuilder(this); } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code org.opendaylight.controller.mdsal.AbortTransactionReply} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransactionReplyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.internal_static_org_opendaylight_controller_mdsal_AbortTransactionReply_descriptor; - } - - @Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.internal_static_org_opendaylight_controller_mdsal_AbortTransactionReply_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransactionReply.class, org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransactionReply.Builder.class); - } - - // Construct using org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransactionReply.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - private static Builder create() { - return new Builder(); - } - - @Override - public Builder clear() { - super.clear(); - return this; - } - - @Override - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - @Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.internal_static_org_opendaylight_controller_mdsal_AbortTransactionReply_descriptor; - } - - @Override - public org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransactionReply getDefaultInstanceForType() { - return org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransactionReply.getDefaultInstance(); - } - - @Override - public org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransactionReply build() { - org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransactionReply result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @Override - public org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransactionReply buildPartial() { - org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransactionReply result = new org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransactionReply(this); - onBuilt(); - return result; - } - - @Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransactionReply) { - return mergeFrom((org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransactionReply)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransactionReply other) { - if (other == org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransactionReply.getDefaultInstance()) { - return this; - } - this.mergeUnknownFields(other.getUnknownFields()); - return this; - } - - @Override - public final boolean isInitialized() { - return true; - } - - @Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransactionReply parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.AbortTransactionReply) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - // @@protoc_insertion_point(builder_scope:org.opendaylight.controller.mdsal.AbortTransactionReply) - } - - static { - defaultInstance = new AbortTransactionReply(true); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:org.opendaylight.controller.mdsal.AbortTransactionReply) - } - - public interface CommitTransactionOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // optional string transactionId = 1; - /** - * optional string transactionId = 1; - */ - boolean hasTransactionId(); - /** - * optional string transactionId = 1; - */ - java.lang.String getTransactionId(); - /** - * optional string transactionId = 1; - */ - com.google.protobuf.ByteString - getTransactionIdBytes(); - } - /** - * Protobuf type {@code org.opendaylight.controller.mdsal.CommitTransaction} - */ - public static final class CommitTransaction extends - com.google.protobuf.GeneratedMessage - implements CommitTransactionOrBuilder { - // Use CommitTransaction.newBuilder() to construct. - private CommitTransaction(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private CommitTransaction(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final CommitTransaction defaultInstance; - public static CommitTransaction getDefaultInstance() { - return defaultInstance; - } - - @Override - public CommitTransaction getDefaultInstanceForType() { - return defaultInstance; - } - - private final com.google.protobuf.UnknownFieldSet unknownFields; - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private CommitTransaction( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - done = true; - } - break; - } - case 10: { - bitField0_ |= 0x00000001; - transactionId_ = input.readBytes(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.internal_static_org_opendaylight_controller_mdsal_CommitTransaction_descriptor; - } - - @Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.internal_static_org_opendaylight_controller_mdsal_CommitTransaction_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransaction.class, org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransaction.Builder.class); - } - - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @Override - public CommitTransaction parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CommitTransaction(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - private int bitField0_; - // optional string transactionId = 1; - public static final int TRANSACTIONID_FIELD_NUMBER = 1; - private java.lang.Object transactionId_; - /** - * optional string transactionId = 1; - */ - @Override - public boolean hasTransactionId() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional string transactionId = 1; - */ - @Override - public java.lang.String getTransactionId() { - java.lang.Object ref = transactionId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - transactionId_ = s; - } - return s; - } - } - /** - * optional string transactionId = 1; - */ - @Override - public com.google.protobuf.ByteString - getTransactionIdBytes() { - java.lang.Object ref = transactionId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - transactionId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private void initFields() { - transactionId_ = ""; - } - private byte memoizedIsInitialized = -1; - @Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) { - return isInitialized == 1; - } - - memoizedIsInitialized = 1; - return true; - } - - @Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, getTransactionIdBytes()); - } - getUnknownFields().writeTo(output); - } - - private int memoizedSerializedSize = -1; - @Override - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) { - return size; - } - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, getTransactionIdBytes()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSerializedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - - public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransaction parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransaction parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransaction parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransaction parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransaction parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransaction parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransaction parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransaction parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransaction parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransaction parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public static Builder newBuilder() { return Builder.create(); } - @Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransaction prototype) { - return newBuilder().mergeFrom(prototype); - } - @Override - public Builder toBuilder() { return newBuilder(this); } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code org.opendaylight.controller.mdsal.CommitTransaction} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransactionOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.internal_static_org_opendaylight_controller_mdsal_CommitTransaction_descriptor; - } - - @Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.internal_static_org_opendaylight_controller_mdsal_CommitTransaction_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransaction.class, org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransaction.Builder.class); - } - - // Construct using org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransaction.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - private static Builder create() { - return new Builder(); - } - - @Override - public Builder clear() { - super.clear(); - transactionId_ = ""; - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @Override - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - @Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.internal_static_org_opendaylight_controller_mdsal_CommitTransaction_descriptor; - } - - @Override - public org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransaction getDefaultInstanceForType() { - return org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransaction.getDefaultInstance(); - } - - @Override - public org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransaction build() { - org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransaction result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @Override - public org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransaction buildPartial() { - org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransaction result = new org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransaction(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.transactionId_ = transactionId_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - @Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransaction) { - return mergeFrom((org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransaction)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransaction other) { - if (other == org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransaction.getDefaultInstance()) { - return this; - } - if (other.hasTransactionId()) { - bitField0_ |= 0x00000001; - transactionId_ = other.transactionId_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - return this; - } - - @Override - public final boolean isInitialized() { - return true; - } - - @Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransaction parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransaction) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - // optional string transactionId = 1; - private java.lang.Object transactionId_ = ""; - /** - * optional string transactionId = 1; - */ - @Override - public boolean hasTransactionId() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional string transactionId = 1; - */ - @Override - public java.lang.String getTransactionId() { - java.lang.Object ref = transactionId_; - if (!(ref instanceof java.lang.String)) { - java.lang.String s = ((com.google.protobuf.ByteString) ref) - .toStringUtf8(); - transactionId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string transactionId = 1; - */ - @Override - public com.google.protobuf.ByteString - getTransactionIdBytes() { - java.lang.Object ref = transactionId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - transactionId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string transactionId = 1; - */ - public Builder setTransactionId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - transactionId_ = value; - onChanged(); - return this; - } - /** - * optional string transactionId = 1; - */ - public Builder clearTransactionId() { - bitField0_ = (bitField0_ & ~0x00000001); - transactionId_ = getDefaultInstance().getTransactionId(); - onChanged(); - return this; - } - /** - * optional string transactionId = 1; - */ - public Builder setTransactionIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - transactionId_ = value; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:org.opendaylight.controller.mdsal.CommitTransaction) - } - - static { - defaultInstance = new CommitTransaction(true); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:org.opendaylight.controller.mdsal.CommitTransaction) - } - - public interface CommitTransactionReplyOrBuilder - extends com.google.protobuf.MessageOrBuilder { - } - /** - * Protobuf type {@code org.opendaylight.controller.mdsal.CommitTransactionReply} - */ - public static final class CommitTransactionReply extends - com.google.protobuf.GeneratedMessage - implements CommitTransactionReplyOrBuilder { - // Use CommitTransactionReply.newBuilder() to construct. - private CommitTransactionReply(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private CommitTransactionReply(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final CommitTransactionReply defaultInstance; - public static CommitTransactionReply getDefaultInstance() { - return defaultInstance; - } - - @Override - public CommitTransactionReply getDefaultInstanceForType() { - return defaultInstance; - } - - private final com.google.protobuf.UnknownFieldSet unknownFields; - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private CommitTransactionReply( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.internal_static_org_opendaylight_controller_mdsal_CommitTransactionReply_descriptor; - } - - @Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.internal_static_org_opendaylight_controller_mdsal_CommitTransactionReply_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransactionReply.class, org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransactionReply.Builder.class); - } - - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @Override - public CommitTransactionReply parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CommitTransactionReply(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - private void initFields() { - } - private byte memoizedIsInitialized = -1; - @Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) { - return isInitialized == 1; - } - - memoizedIsInitialized = 1; - return true; - } - - @Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - getUnknownFields().writeTo(output); - } - - private int memoizedSerializedSize = -1; - @Override - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) { - return size; - } - - size = 0; - size += getUnknownFields().getSerializedSize(); - memoizedSerializedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - - public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransactionReply parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransactionReply parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransactionReply parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransactionReply parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransactionReply parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransactionReply parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransactionReply parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransactionReply parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransactionReply parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransactionReply parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public static Builder newBuilder() { return Builder.create(); } - @Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransactionReply prototype) { - return newBuilder().mergeFrom(prototype); - } - @Override - public Builder toBuilder() { return newBuilder(this); } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code org.opendaylight.controller.mdsal.CommitTransactionReply} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransactionReplyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.internal_static_org_opendaylight_controller_mdsal_CommitTransactionReply_descriptor; - } - - @Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.internal_static_org_opendaylight_controller_mdsal_CommitTransactionReply_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransactionReply.class, org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransactionReply.Builder.class); - } - - // Construct using org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransactionReply.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - private static Builder create() { - return new Builder(); - } - - @Override - public Builder clear() { - super.clear(); - return this; - } - - @Override - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - @Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.internal_static_org_opendaylight_controller_mdsal_CommitTransactionReply_descriptor; - } - - @Override - public org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransactionReply getDefaultInstanceForType() { - return org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransactionReply.getDefaultInstance(); - } - - @Override - public org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransactionReply build() { - org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransactionReply result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @Override - public org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransactionReply buildPartial() { - org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransactionReply result = new org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransactionReply(this); - onBuilt(); - return result; - } - - @Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransactionReply) { - return mergeFrom((org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransactionReply)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransactionReply other) { - if (other == org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransactionReply.getDefaultInstance()) { - return this; - } - this.mergeUnknownFields(other.getUnknownFields()); - return this; - } - - @Override - public final boolean isInitialized() { - return true; - } - - @Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransactionReply parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.CommitTransactionReply) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - // @@protoc_insertion_point(builder_scope:org.opendaylight.controller.mdsal.CommitTransactionReply) - } - - static { - defaultInstance = new CommitTransactionReply(true); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:org.opendaylight.controller.mdsal.CommitTransactionReply) - } - - public interface PreCommitTransactionOrBuilder - extends com.google.protobuf.MessageOrBuilder { - } - /** - * Protobuf type {@code org.opendaylight.controller.mdsal.PreCommitTransaction} - */ - public static final class PreCommitTransaction extends - com.google.protobuf.GeneratedMessage - implements PreCommitTransactionOrBuilder { - // Use PreCommitTransaction.newBuilder() to construct. - private PreCommitTransaction(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private PreCommitTransaction(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final PreCommitTransaction defaultInstance; - public static PreCommitTransaction getDefaultInstance() { - return defaultInstance; - } - - @Override - public PreCommitTransaction getDefaultInstanceForType() { - return defaultInstance; - } - - private final com.google.protobuf.UnknownFieldSet unknownFields; - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private PreCommitTransaction( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.internal_static_org_opendaylight_controller_mdsal_PreCommitTransaction_descriptor; - } - - @Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.internal_static_org_opendaylight_controller_mdsal_PreCommitTransaction_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransaction.class, org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransaction.Builder.class); - } - - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @Override - public PreCommitTransaction parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new PreCommitTransaction(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - private void initFields() { - } - private byte memoizedIsInitialized = -1; - @Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) { - return isInitialized == 1; - } - - memoizedIsInitialized = 1; - return true; - } - - @Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - getUnknownFields().writeTo(output); - } - - private int memoizedSerializedSize = -1; - @Override - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) { - return size; - } - - size = 0; - size += getUnknownFields().getSerializedSize(); - memoizedSerializedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - - public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransaction parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransaction parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransaction parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransaction parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransaction parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransaction parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransaction parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransaction parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransaction parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransaction parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public static Builder newBuilder() { return Builder.create(); } - @Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransaction prototype) { - return newBuilder().mergeFrom(prototype); - } - @Override - public Builder toBuilder() { return newBuilder(this); } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code org.opendaylight.controller.mdsal.PreCommitTransaction} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransactionOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.internal_static_org_opendaylight_controller_mdsal_PreCommitTransaction_descriptor; - } - - @Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.internal_static_org_opendaylight_controller_mdsal_PreCommitTransaction_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransaction.class, org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransaction.Builder.class); - } - - // Construct using org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransaction.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - private static Builder create() { - return new Builder(); - } - - @Override - public Builder clear() { - super.clear(); - return this; - } - - @Override - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - @Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.internal_static_org_opendaylight_controller_mdsal_PreCommitTransaction_descriptor; - } - - @Override - public org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransaction getDefaultInstanceForType() { - return org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransaction.getDefaultInstance(); - } - - @Override - public org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransaction build() { - org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransaction result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @Override - public org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransaction buildPartial() { - org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransaction result = new org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransaction(this); - onBuilt(); - return result; - } - - @Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransaction) { - return mergeFrom((org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransaction)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransaction other) { - if (other == org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransaction.getDefaultInstance()) { - return this; - } - this.mergeUnknownFields(other.getUnknownFields()); - return this; - } - - @Override - public final boolean isInitialized() { - return true; - } - - @Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransaction parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransaction) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - // @@protoc_insertion_point(builder_scope:org.opendaylight.controller.mdsal.PreCommitTransaction) - } - - static { - defaultInstance = new PreCommitTransaction(true); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:org.opendaylight.controller.mdsal.PreCommitTransaction) - } - - public interface PreCommitTransactionReplyOrBuilder - extends com.google.protobuf.MessageOrBuilder { - } - /** - * Protobuf type {@code org.opendaylight.controller.mdsal.PreCommitTransactionReply} - */ - public static final class PreCommitTransactionReply extends - com.google.protobuf.GeneratedMessage - implements PreCommitTransactionReplyOrBuilder { - // Use PreCommitTransactionReply.newBuilder() to construct. - private PreCommitTransactionReply(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private PreCommitTransactionReply(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final PreCommitTransactionReply defaultInstance; - public static PreCommitTransactionReply getDefaultInstance() { - return defaultInstance; - } - - @Override - public PreCommitTransactionReply getDefaultInstanceForType() { - return defaultInstance; - } - - private final com.google.protobuf.UnknownFieldSet unknownFields; - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private PreCommitTransactionReply( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.internal_static_org_opendaylight_controller_mdsal_PreCommitTransactionReply_descriptor; - } - - @Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.internal_static_org_opendaylight_controller_mdsal_PreCommitTransactionReply_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransactionReply.class, org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransactionReply.Builder.class); - } - - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @Override - public PreCommitTransactionReply parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new PreCommitTransactionReply(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - private void initFields() { - } - private byte memoizedIsInitialized = -1; - @Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) { - return isInitialized == 1; - } - - memoizedIsInitialized = 1; - return true; - } - - @Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - getUnknownFields().writeTo(output); - } - - private int memoizedSerializedSize = -1; - @Override - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) { - return size; - } - - size = 0; - size += getUnknownFields().getSerializedSize(); - memoizedSerializedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - - public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransactionReply parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransactionReply parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransactionReply parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransactionReply parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransactionReply parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransactionReply parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransactionReply parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransactionReply parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransactionReply parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransactionReply parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public static Builder newBuilder() { return Builder.create(); } - @Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransactionReply prototype) { - return newBuilder().mergeFrom(prototype); - } - @Override - public Builder toBuilder() { return newBuilder(this); } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code org.opendaylight.controller.mdsal.PreCommitTransactionReply} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransactionReplyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.internal_static_org_opendaylight_controller_mdsal_PreCommitTransactionReply_descriptor; - } - - @Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.internal_static_org_opendaylight_controller_mdsal_PreCommitTransactionReply_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransactionReply.class, org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransactionReply.Builder.class); - } - - // Construct using org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransactionReply.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - private static Builder create() { - return new Builder(); - } - - @Override - public Builder clear() { - super.clear(); - return this; - } - - @Override - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - @Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.internal_static_org_opendaylight_controller_mdsal_PreCommitTransactionReply_descriptor; - } - - @Override - public org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransactionReply getDefaultInstanceForType() { - return org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransactionReply.getDefaultInstance(); - } - - @Override - public org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransactionReply build() { - org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransactionReply result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @Override - public org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransactionReply buildPartial() { - org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransactionReply result = new org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransactionReply(this); - onBuilt(); - return result; - } - - @Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransactionReply) { - return mergeFrom((org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransactionReply)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransactionReply other) { - if (other == org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransactionReply.getDefaultInstance()) { - return this; - } - this.mergeUnknownFields(other.getUnknownFields()); - return this; - } - - @Override - public final boolean isInitialized() { - return true; - } - - @Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransactionReply parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages.PreCommitTransactionReply) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - // @@protoc_insertion_point(builder_scope:org.opendaylight.controller.mdsal.PreCommitTransactionReply) - } - - static { - defaultInstance = new PreCommitTransactionReply(true); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:org.opendaylight.controller.mdsal.PreCommitTransactionReply) - } - - private static com.google.protobuf.Descriptors.Descriptor - internal_static_org_opendaylight_controller_mdsal_CanCommitTransaction_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_org_opendaylight_controller_mdsal_CanCommitTransaction_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_org_opendaylight_controller_mdsal_CanCommitTransactionReply_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_org_opendaylight_controller_mdsal_CanCommitTransactionReply_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_org_opendaylight_controller_mdsal_AbortTransaction_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_org_opendaylight_controller_mdsal_AbortTransaction_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_org_opendaylight_controller_mdsal_AbortTransactionReply_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_org_opendaylight_controller_mdsal_AbortTransactionReply_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_org_opendaylight_controller_mdsal_CommitTransaction_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_org_opendaylight_controller_mdsal_CommitTransaction_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_org_opendaylight_controller_mdsal_CommitTransactionReply_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_org_opendaylight_controller_mdsal_CommitTransactionReply_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_org_opendaylight_controller_mdsal_PreCommitTransaction_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_org_opendaylight_controller_mdsal_PreCommitTransaction_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_org_opendaylight_controller_mdsal_PreCommitTransactionReply_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_org_opendaylight_controller_mdsal_PreCommitTransactionReply_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n\014Cohort.proto\022!org.opendaylight.control" + - "ler.mdsal\"-\n\024CanCommitTransaction\022\025\n\rtra" + - "nsactionId\030\001 \001(\t\".\n\031CanCommitTransaction" + - "Reply\022\021\n\tcanCommit\030\001 \002(\010\")\n\020AbortTransac" + - "tion\022\025\n\rtransactionId\030\001 \001(\t\"\027\n\025AbortTran" + - "sactionReply\"*\n\021CommitTransaction\022\025\n\rtra" + - "nsactionId\030\001 \001(\t\"\030\n\026CommitTransactionRep" + - "ly\"\026\n\024PreCommitTransaction\"\033\n\031PreCommitT" + - "ransactionReplyBZ\n8org.opendaylight.cont" + - "roller.protobuff.messages.cohort3pcB\036Thr", - "eePhaseCommitCohortMessages" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { - @Override - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - internal_static_org_opendaylight_controller_mdsal_CanCommitTransaction_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_org_opendaylight_controller_mdsal_CanCommitTransaction_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_org_opendaylight_controller_mdsal_CanCommitTransaction_descriptor, - new java.lang.String[] { "TransactionId", }); - internal_static_org_opendaylight_controller_mdsal_CanCommitTransactionReply_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_org_opendaylight_controller_mdsal_CanCommitTransactionReply_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_org_opendaylight_controller_mdsal_CanCommitTransactionReply_descriptor, - new java.lang.String[] { "CanCommit", }); - internal_static_org_opendaylight_controller_mdsal_AbortTransaction_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_org_opendaylight_controller_mdsal_AbortTransaction_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_org_opendaylight_controller_mdsal_AbortTransaction_descriptor, - new java.lang.String[] { "TransactionId", }); - internal_static_org_opendaylight_controller_mdsal_AbortTransactionReply_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_org_opendaylight_controller_mdsal_AbortTransactionReply_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_org_opendaylight_controller_mdsal_AbortTransactionReply_descriptor, - new java.lang.String[] { }); - internal_static_org_opendaylight_controller_mdsal_CommitTransaction_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_org_opendaylight_controller_mdsal_CommitTransaction_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_org_opendaylight_controller_mdsal_CommitTransaction_descriptor, - new java.lang.String[] { "TransactionId", }); - internal_static_org_opendaylight_controller_mdsal_CommitTransactionReply_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_org_opendaylight_controller_mdsal_CommitTransactionReply_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_org_opendaylight_controller_mdsal_CommitTransactionReply_descriptor, - new java.lang.String[] { }); - internal_static_org_opendaylight_controller_mdsal_PreCommitTransaction_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_org_opendaylight_controller_mdsal_PreCommitTransaction_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_org_opendaylight_controller_mdsal_PreCommitTransaction_descriptor, - new java.lang.String[] { }); - internal_static_org_opendaylight_controller_mdsal_PreCommitTransactionReply_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_org_opendaylight_controller_mdsal_PreCommitTransactionReply_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_org_opendaylight_controller_mdsal_PreCommitTransactionReply_descriptor, - new java.lang.String[] { }); - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - }, assigner); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/protobuff/messages/transaction/ShardTransactionChainMessages.java b/opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/protobuff/messages/transaction/ShardTransactionChainMessages.java deleted file mode 100644 index c3f7d98b55..0000000000 --- a/opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/protobuff/messages/transaction/ShardTransactionChainMessages.java +++ /dev/null @@ -1,900 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: ShardTransactionChain.proto - -package org.opendaylight.controller.protobuff.messages.transaction; - -@Deprecated -public final class ShardTransactionChainMessages { - private ShardTransactionChainMessages() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - } - public interface CloseTransactionChainOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // optional string transactionChainId = 1; - /** - * optional string transactionChainId = 1; - */ - boolean hasTransactionChainId(); - /** - * optional string transactionChainId = 1; - */ - java.lang.String getTransactionChainId(); - /** - * optional string transactionChainId = 1; - */ - com.google.protobuf.ByteString - getTransactionChainIdBytes(); - } - /** - * Protobuf type {@code org.opendaylight.controller.mdsal.CloseTransactionChain} - */ - public static final class CloseTransactionChain extends - com.google.protobuf.GeneratedMessage - implements CloseTransactionChainOrBuilder { - // Use CloseTransactionChain.newBuilder() to construct. - private CloseTransactionChain(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private CloseTransactionChain(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final CloseTransactionChain defaultInstance; - public static CloseTransactionChain getDefaultInstance() { - return defaultInstance; - } - - @Override - public CloseTransactionChain getDefaultInstanceForType() { - return defaultInstance; - } - - private final com.google.protobuf.UnknownFieldSet unknownFields; - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private CloseTransactionChain( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - done = true; - } - break; - } - case 10: { - bitField0_ |= 0x00000001; - transactionChainId_ = input.readBytes(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionChainMessages.internal_static_org_opendaylight_controller_mdsal_CloseTransactionChain_descriptor; - } - - @Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionChainMessages.internal_static_org_opendaylight_controller_mdsal_CloseTransactionChain_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionChainMessages.CloseTransactionChain.class, org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionChainMessages.CloseTransactionChain.Builder.class); - } - - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @Override - public CloseTransactionChain parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CloseTransactionChain(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - private int bitField0_; - // optional string transactionChainId = 1; - public static final int TRANSACTIONCHAINID_FIELD_NUMBER = 1; - private java.lang.Object transactionChainId_; - /** - * optional string transactionChainId = 1; - */ - @Override - public boolean hasTransactionChainId() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional string transactionChainId = 1; - */ - @Override - public java.lang.String getTransactionChainId() { - java.lang.Object ref = transactionChainId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - transactionChainId_ = s; - } - return s; - } - } - /** - * optional string transactionChainId = 1; - */ - @Override - public com.google.protobuf.ByteString - getTransactionChainIdBytes() { - java.lang.Object ref = transactionChainId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - transactionChainId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private void initFields() { - transactionChainId_ = ""; - } - private byte memoizedIsInitialized = -1; - @Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) { - return isInitialized == 1; - } - - memoizedIsInitialized = 1; - return true; - } - - @Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, getTransactionChainIdBytes()); - } - getUnknownFields().writeTo(output); - } - - private int memoizedSerializedSize = -1; - @Override - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) { - return size; - } - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, getTransactionChainIdBytes()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSerializedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - - public static org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionChainMessages.CloseTransactionChain parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionChainMessages.CloseTransactionChain parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionChainMessages.CloseTransactionChain parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionChainMessages.CloseTransactionChain parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionChainMessages.CloseTransactionChain parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionChainMessages.CloseTransactionChain parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionChainMessages.CloseTransactionChain parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionChainMessages.CloseTransactionChain parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionChainMessages.CloseTransactionChain parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionChainMessages.CloseTransactionChain parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public static Builder newBuilder() { return Builder.create(); } - @Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionChainMessages.CloseTransactionChain prototype) { - return newBuilder().mergeFrom(prototype); - } - @Override - public Builder toBuilder() { return newBuilder(this); } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code org.opendaylight.controller.mdsal.CloseTransactionChain} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionChainMessages.CloseTransactionChainOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionChainMessages.internal_static_org_opendaylight_controller_mdsal_CloseTransactionChain_descriptor; - } - - @Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionChainMessages.internal_static_org_opendaylight_controller_mdsal_CloseTransactionChain_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionChainMessages.CloseTransactionChain.class, org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionChainMessages.CloseTransactionChain.Builder.class); - } - - // Construct using org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionChainMessages.CloseTransactionChain.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - private static Builder create() { - return new Builder(); - } - - @Override - public Builder clear() { - super.clear(); - transactionChainId_ = ""; - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @Override - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - @Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionChainMessages.internal_static_org_opendaylight_controller_mdsal_CloseTransactionChain_descriptor; - } - - @Override - public org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionChainMessages.CloseTransactionChain getDefaultInstanceForType() { - return org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionChainMessages.CloseTransactionChain.getDefaultInstance(); - } - - @Override - public org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionChainMessages.CloseTransactionChain build() { - org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionChainMessages.CloseTransactionChain result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @Override - public org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionChainMessages.CloseTransactionChain buildPartial() { - org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionChainMessages.CloseTransactionChain result = new org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionChainMessages.CloseTransactionChain(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.transactionChainId_ = transactionChainId_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - @Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionChainMessages.CloseTransactionChain) { - return mergeFrom((org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionChainMessages.CloseTransactionChain)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionChainMessages.CloseTransactionChain other) { - if (other == org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionChainMessages.CloseTransactionChain.getDefaultInstance()) { - return this; - } - if (other.hasTransactionChainId()) { - bitField0_ |= 0x00000001; - transactionChainId_ = other.transactionChainId_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - return this; - } - - @Override - public final boolean isInitialized() { - return true; - } - - @Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionChainMessages.CloseTransactionChain parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionChainMessages.CloseTransactionChain) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - // optional string transactionChainId = 1; - private java.lang.Object transactionChainId_ = ""; - /** - * optional string transactionChainId = 1; - */ - @Override - public boolean hasTransactionChainId() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional string transactionChainId = 1; - */ - @Override - public java.lang.String getTransactionChainId() { - java.lang.Object ref = transactionChainId_; - if (!(ref instanceof java.lang.String)) { - java.lang.String s = ((com.google.protobuf.ByteString) ref) - .toStringUtf8(); - transactionChainId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string transactionChainId = 1; - */ - @Override - public com.google.protobuf.ByteString - getTransactionChainIdBytes() { - java.lang.Object ref = transactionChainId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - transactionChainId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string transactionChainId = 1; - */ - public Builder setTransactionChainId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - transactionChainId_ = value; - onChanged(); - return this; - } - /** - * optional string transactionChainId = 1; - */ - public Builder clearTransactionChainId() { - bitField0_ = (bitField0_ & ~0x00000001); - transactionChainId_ = getDefaultInstance().getTransactionChainId(); - onChanged(); - return this; - } - /** - * optional string transactionChainId = 1; - */ - public Builder setTransactionChainIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - transactionChainId_ = value; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:org.opendaylight.controller.mdsal.CloseTransactionChain) - } - - static { - defaultInstance = new CloseTransactionChain(true); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:org.opendaylight.controller.mdsal.CloseTransactionChain) - } - - public interface CloseTransactionChainReplyOrBuilder - extends com.google.protobuf.MessageOrBuilder { - } - /** - * Protobuf type {@code org.opendaylight.controller.mdsal.CloseTransactionChainReply} - */ - public static final class CloseTransactionChainReply extends - com.google.protobuf.GeneratedMessage - implements CloseTransactionChainReplyOrBuilder { - // Use CloseTransactionChainReply.newBuilder() to construct. - private CloseTransactionChainReply(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private CloseTransactionChainReply(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final CloseTransactionChainReply defaultInstance; - public static CloseTransactionChainReply getDefaultInstance() { - return defaultInstance; - } - - @Override - public CloseTransactionChainReply getDefaultInstanceForType() { - return defaultInstance; - } - - private final com.google.protobuf.UnknownFieldSet unknownFields; - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private CloseTransactionChainReply( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionChainMessages.internal_static_org_opendaylight_controller_mdsal_CloseTransactionChainReply_descriptor; - } - - @Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionChainMessages.internal_static_org_opendaylight_controller_mdsal_CloseTransactionChainReply_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionChainMessages.CloseTransactionChainReply.class, org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionChainMessages.CloseTransactionChainReply.Builder.class); - } - - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @Override - public CloseTransactionChainReply parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CloseTransactionChainReply(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - private void initFields() { - } - private byte memoizedIsInitialized = -1; - @Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) { - return isInitialized == 1; - } - - memoizedIsInitialized = 1; - return true; - } - - @Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - getUnknownFields().writeTo(output); - } - - private int memoizedSerializedSize = -1; - @Override - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) { - return size; - } - - size = 0; - size += getUnknownFields().getSerializedSize(); - memoizedSerializedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - - public static org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionChainMessages.CloseTransactionChainReply parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionChainMessages.CloseTransactionChainReply parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionChainMessages.CloseTransactionChainReply parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionChainMessages.CloseTransactionChainReply parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionChainMessages.CloseTransactionChainReply parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionChainMessages.CloseTransactionChainReply parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionChainMessages.CloseTransactionChainReply parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionChainMessages.CloseTransactionChainReply parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionChainMessages.CloseTransactionChainReply parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionChainMessages.CloseTransactionChainReply parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public static Builder newBuilder() { return Builder.create(); } - @Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionChainMessages.CloseTransactionChainReply prototype) { - return newBuilder().mergeFrom(prototype); - } - @Override - public Builder toBuilder() { return newBuilder(this); } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code org.opendaylight.controller.mdsal.CloseTransactionChainReply} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionChainMessages.CloseTransactionChainReplyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionChainMessages.internal_static_org_opendaylight_controller_mdsal_CloseTransactionChainReply_descriptor; - } - - @Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionChainMessages.internal_static_org_opendaylight_controller_mdsal_CloseTransactionChainReply_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionChainMessages.CloseTransactionChainReply.class, org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionChainMessages.CloseTransactionChainReply.Builder.class); - } - - // Construct using org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionChainMessages.CloseTransactionChainReply.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - private static Builder create() { - return new Builder(); - } - - @Override - public Builder clear() { - super.clear(); - return this; - } - - @Override - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - @Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionChainMessages.internal_static_org_opendaylight_controller_mdsal_CloseTransactionChainReply_descriptor; - } - - @Override - public org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionChainMessages.CloseTransactionChainReply getDefaultInstanceForType() { - return org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionChainMessages.CloseTransactionChainReply.getDefaultInstance(); - } - - @Override - public org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionChainMessages.CloseTransactionChainReply build() { - org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionChainMessages.CloseTransactionChainReply result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @Override - public org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionChainMessages.CloseTransactionChainReply buildPartial() { - org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionChainMessages.CloseTransactionChainReply result = new org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionChainMessages.CloseTransactionChainReply(this); - onBuilt(); - return result; - } - - @Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionChainMessages.CloseTransactionChainReply) { - return mergeFrom((org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionChainMessages.CloseTransactionChainReply)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionChainMessages.CloseTransactionChainReply other) { - if (other == org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionChainMessages.CloseTransactionChainReply.getDefaultInstance()) { - return this; - } - this.mergeUnknownFields(other.getUnknownFields()); - return this; - } - - @Override - public final boolean isInitialized() { - return true; - } - - @Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionChainMessages.CloseTransactionChainReply parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionChainMessages.CloseTransactionChainReply) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - // @@protoc_insertion_point(builder_scope:org.opendaylight.controller.mdsal.CloseTransactionChainReply) - } - - static { - defaultInstance = new CloseTransactionChainReply(true); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:org.opendaylight.controller.mdsal.CloseTransactionChainReply) - } - - private static com.google.protobuf.Descriptors.Descriptor - internal_static_org_opendaylight_controller_mdsal_CloseTransactionChain_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_org_opendaylight_controller_mdsal_CloseTransactionChain_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_org_opendaylight_controller_mdsal_CloseTransactionChainReply_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_org_opendaylight_controller_mdsal_CloseTransactionChainReply_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n\033ShardTransactionChain.proto\022!org.opend" + - "aylight.controller.mdsal\"3\n\025CloseTransac" + - "tionChain\022\032\n\022transactionChainId\030\001 \001(\t\"\034\n" + - "\032CloseTransactionChainReplyB[\n:org.opend" + - "aylight.controller.protobuff.messages.tr" + - "ansactionB\035ShardTransactionChainMessages" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { - @Override - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - internal_static_org_opendaylight_controller_mdsal_CloseTransactionChain_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_org_opendaylight_controller_mdsal_CloseTransactionChain_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_org_opendaylight_controller_mdsal_CloseTransactionChain_descriptor, - new java.lang.String[] { "TransactionChainId", }); - internal_static_org_opendaylight_controller_mdsal_CloseTransactionChainReply_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_org_opendaylight_controller_mdsal_CloseTransactionChainReply_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_org_opendaylight_controller_mdsal_CloseTransactionChainReply_descriptor, - new java.lang.String[] { }); - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - }, assigner); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/protobuff/messages/transaction/ShardTransactionMessages.java b/opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/protobuff/messages/transaction/ShardTransactionMessages.java deleted file mode 100644 index dbf6fe595b..0000000000 --- a/opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/protobuff/messages/transaction/ShardTransactionMessages.java +++ /dev/null @@ -1,3951 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: ShardTransaction.proto - -package org.opendaylight.controller.protobuff.messages.transaction; - -@Deprecated -public final class ShardTransactionMessages { - private ShardTransactionMessages() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - } - public interface CloseTransactionOrBuilder - extends com.google.protobuf.MessageOrBuilder { - } - /** - * Protobuf type {@code org.opendaylight.controller.mdsal.CloseTransaction} - */ - public static final class CloseTransaction extends - com.google.protobuf.GeneratedMessage - implements CloseTransactionOrBuilder { - // Use CloseTransaction.newBuilder() to construct. - private CloseTransaction(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private CloseTransaction(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final CloseTransaction defaultInstance; - public static CloseTransaction getDefaultInstance() { - return defaultInstance; - } - - @Override - public CloseTransaction getDefaultInstanceForType() { - return defaultInstance; - } - - private final com.google.protobuf.UnknownFieldSet unknownFields; - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private CloseTransaction( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_CloseTransaction_descriptor; - } - - @Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_CloseTransaction_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CloseTransaction.class, org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CloseTransaction.Builder.class); - } - - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @Override - public CloseTransaction parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CloseTransaction(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - private void initFields() { - } - private byte memoizedIsInitialized = -1; - @Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) { - return isInitialized == 1; - } - - memoizedIsInitialized = 1; - return true; - } - - @Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - getUnknownFields().writeTo(output); - } - - private int memoizedSerializedSize = -1; - @Override - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) { - return size; - } - - size = 0; - size += getUnknownFields().getSerializedSize(); - memoizedSerializedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - - public static org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CloseTransaction parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CloseTransaction parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CloseTransaction parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CloseTransaction parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CloseTransaction parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CloseTransaction parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CloseTransaction parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CloseTransaction parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CloseTransaction parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CloseTransaction parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public static Builder newBuilder() { return Builder.create(); } - @Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CloseTransaction prototype) { - return newBuilder().mergeFrom(prototype); - } - @Override - public Builder toBuilder() { return newBuilder(this); } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code org.opendaylight.controller.mdsal.CloseTransaction} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CloseTransactionOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_CloseTransaction_descriptor; - } - - @Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_CloseTransaction_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CloseTransaction.class, org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CloseTransaction.Builder.class); - } - - // Construct using org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CloseTransaction.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - private static Builder create() { - return new Builder(); - } - - @Override - public Builder clear() { - super.clear(); - return this; - } - - @Override - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - @Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_CloseTransaction_descriptor; - } - - @Override - public org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CloseTransaction getDefaultInstanceForType() { - return org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CloseTransaction.getDefaultInstance(); - } - - @Override - public org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CloseTransaction build() { - org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CloseTransaction result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @Override - public org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CloseTransaction buildPartial() { - org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CloseTransaction result = new org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CloseTransaction(this); - onBuilt(); - return result; - } - - @Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CloseTransaction) { - return mergeFrom((org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CloseTransaction)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CloseTransaction other) { - if (other == org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CloseTransaction.getDefaultInstance()) { - return this; - } - this.mergeUnknownFields(other.getUnknownFields()); - return this; - } - - @Override - public final boolean isInitialized() { - return true; - } - - @Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CloseTransaction parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CloseTransaction) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - // @@protoc_insertion_point(builder_scope:org.opendaylight.controller.mdsal.CloseTransaction) - } - - static { - defaultInstance = new CloseTransaction(true); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:org.opendaylight.controller.mdsal.CloseTransaction) - } - - public interface CloseTransactionReplyOrBuilder - extends com.google.protobuf.MessageOrBuilder { - } - /** - * Protobuf type {@code org.opendaylight.controller.mdsal.CloseTransactionReply} - */ - public static final class CloseTransactionReply extends - com.google.protobuf.GeneratedMessage - implements CloseTransactionReplyOrBuilder { - // Use CloseTransactionReply.newBuilder() to construct. - private CloseTransactionReply(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private CloseTransactionReply(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final CloseTransactionReply defaultInstance; - public static CloseTransactionReply getDefaultInstance() { - return defaultInstance; - } - - @Override - public CloseTransactionReply getDefaultInstanceForType() { - return defaultInstance; - } - - private final com.google.protobuf.UnknownFieldSet unknownFields; - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private CloseTransactionReply( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_CloseTransactionReply_descriptor; - } - - @Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_CloseTransactionReply_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CloseTransactionReply.class, org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CloseTransactionReply.Builder.class); - } - - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @Override - public CloseTransactionReply parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CloseTransactionReply(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - private void initFields() { - } - private byte memoizedIsInitialized = -1; - @Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) { - return isInitialized == 1; - } - - memoizedIsInitialized = 1; - return true; - } - - @Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - getUnknownFields().writeTo(output); - } - - private int memoizedSerializedSize = -1; - @Override - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) { - return size; - } - - size = 0; - size += getUnknownFields().getSerializedSize(); - memoizedSerializedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - - public static org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CloseTransactionReply parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CloseTransactionReply parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CloseTransactionReply parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CloseTransactionReply parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CloseTransactionReply parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CloseTransactionReply parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CloseTransactionReply parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CloseTransactionReply parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CloseTransactionReply parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CloseTransactionReply parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public static Builder newBuilder() { return Builder.create(); } - @Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CloseTransactionReply prototype) { - return newBuilder().mergeFrom(prototype); - } - @Override - public Builder toBuilder() { return newBuilder(this); } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code org.opendaylight.controller.mdsal.CloseTransactionReply} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CloseTransactionReplyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_CloseTransactionReply_descriptor; - } - - @Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_CloseTransactionReply_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CloseTransactionReply.class, org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CloseTransactionReply.Builder.class); - } - - // Construct using org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CloseTransactionReply.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - private static Builder create() { - return new Builder(); - } - - @Override - public Builder clear() { - super.clear(); - return this; - } - - @Override - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - @Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_CloseTransactionReply_descriptor; - } - - @Override - public org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CloseTransactionReply getDefaultInstanceForType() { - return org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CloseTransactionReply.getDefaultInstance(); - } - - @Override - public org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CloseTransactionReply build() { - org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CloseTransactionReply result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @Override - public org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CloseTransactionReply buildPartial() { - org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CloseTransactionReply result = new org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CloseTransactionReply(this); - onBuilt(); - return result; - } - - @Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CloseTransactionReply) { - return mergeFrom((org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CloseTransactionReply)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CloseTransactionReply other) { - if (other == org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CloseTransactionReply.getDefaultInstance()) { - return this; - } - this.mergeUnknownFields(other.getUnknownFields()); - return this; - } - - @Override - public final boolean isInitialized() { - return true; - } - - @Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CloseTransactionReply parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CloseTransactionReply) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - // @@protoc_insertion_point(builder_scope:org.opendaylight.controller.mdsal.CloseTransactionReply) - } - - static { - defaultInstance = new CloseTransactionReply(true); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:org.opendaylight.controller.mdsal.CloseTransactionReply) - } - - public interface CreateTransactionOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // required string transactionId = 1; - /** - * required string transactionId = 1; - */ - boolean hasTransactionId(); - /** - * required string transactionId = 1; - */ - java.lang.String getTransactionId(); - /** - * required string transactionId = 1; - */ - com.google.protobuf.ByteString - getTransactionIdBytes(); - - // required int32 transactionType = 2; - /** - * required int32 transactionType = 2; - */ - boolean hasTransactionType(); - /** - * required int32 transactionType = 2; - */ - int getTransactionType(); - - // optional string transactionChainId = 3; - /** - * optional string transactionChainId = 3; - */ - boolean hasTransactionChainId(); - /** - * optional string transactionChainId = 3; - */ - java.lang.String getTransactionChainId(); - /** - * optional string transactionChainId = 3; - */ - com.google.protobuf.ByteString - getTransactionChainIdBytes(); - - // optional int32 messageVersion = 4; - /** - * optional int32 messageVersion = 4; - */ - boolean hasMessageVersion(); - /** - * optional int32 messageVersion = 4; - */ - int getMessageVersion(); - } - /** - * Protobuf type {@code org.opendaylight.controller.mdsal.CreateTransaction} - */ - public static final class CreateTransaction extends - com.google.protobuf.GeneratedMessage - implements CreateTransactionOrBuilder { - // Use CreateTransaction.newBuilder() to construct. - private CreateTransaction(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private CreateTransaction(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final CreateTransaction defaultInstance; - public static CreateTransaction getDefaultInstance() { - return defaultInstance; - } - - @Override - public CreateTransaction getDefaultInstanceForType() { - return defaultInstance; - } - - private final com.google.protobuf.UnknownFieldSet unknownFields; - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private CreateTransaction( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - done = true; - } - break; - } - case 10: { - bitField0_ |= 0x00000001; - transactionId_ = input.readBytes(); - break; - } - case 16: { - bitField0_ |= 0x00000002; - transactionType_ = input.readInt32(); - break; - } - case 26: { - bitField0_ |= 0x00000004; - transactionChainId_ = input.readBytes(); - break; - } - case 32: { - bitField0_ |= 0x00000008; - messageVersion_ = input.readInt32(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_CreateTransaction_descriptor; - } - - @Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_CreateTransaction_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CreateTransaction.class, org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CreateTransaction.Builder.class); - } - - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @Override - public CreateTransaction parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateTransaction(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - private int bitField0_; - // required string transactionId = 1; - public static final int TRANSACTIONID_FIELD_NUMBER = 1; - private java.lang.Object transactionId_; - /** - * required string transactionId = 1; - */ - @Override - public boolean hasTransactionId() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * required string transactionId = 1; - */ - @Override - public java.lang.String getTransactionId() { - java.lang.Object ref = transactionId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - transactionId_ = s; - } - return s; - } - } - /** - * required string transactionId = 1; - */ - @Override - public com.google.protobuf.ByteString - getTransactionIdBytes() { - java.lang.Object ref = transactionId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - transactionId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - // required int32 transactionType = 2; - public static final int TRANSACTIONTYPE_FIELD_NUMBER = 2; - private int transactionType_; - /** - * required int32 transactionType = 2; - */ - @Override - public boolean hasTransactionType() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * required int32 transactionType = 2; - */ - @Override - public int getTransactionType() { - return transactionType_; - } - - // optional string transactionChainId = 3; - public static final int TRANSACTIONCHAINID_FIELD_NUMBER = 3; - private java.lang.Object transactionChainId_; - /** - * optional string transactionChainId = 3; - */ - @Override - public boolean hasTransactionChainId() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional string transactionChainId = 3; - */ - @Override - public java.lang.String getTransactionChainId() { - java.lang.Object ref = transactionChainId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - transactionChainId_ = s; - } - return s; - } - } - /** - * optional string transactionChainId = 3; - */ - @Override - public com.google.protobuf.ByteString - getTransactionChainIdBytes() { - java.lang.Object ref = transactionChainId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - transactionChainId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - // optional int32 messageVersion = 4; - public static final int MESSAGEVERSION_FIELD_NUMBER = 4; - private int messageVersion_; - /** - * optional int32 messageVersion = 4; - */ - @Override - public boolean hasMessageVersion() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - /** - * optional int32 messageVersion = 4; - */ - @Override - public int getMessageVersion() { - return messageVersion_; - } - - private void initFields() { - transactionId_ = ""; - transactionType_ = 0; - transactionChainId_ = ""; - messageVersion_ = 0; - } - private byte memoizedIsInitialized = -1; - @Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) { - return isInitialized == 1; - } - - if (!hasTransactionId()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasTransactionType()) { - memoizedIsInitialized = 0; - return false; - } - memoizedIsInitialized = 1; - return true; - } - - @Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, getTransactionIdBytes()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeInt32(2, transactionType_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeBytes(3, getTransactionChainIdBytes()); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeInt32(4, messageVersion_); - } - getUnknownFields().writeTo(output); - } - - private int memoizedSerializedSize = -1; - @Override - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) { - return size; - } - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, getTransactionIdBytes()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, transactionType_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(3, getTransactionChainIdBytes()); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(4, messageVersion_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSerializedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - - public static org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CreateTransaction parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CreateTransaction parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CreateTransaction parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CreateTransaction parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CreateTransaction parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CreateTransaction parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CreateTransaction parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CreateTransaction parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CreateTransaction parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CreateTransaction parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public static Builder newBuilder() { return Builder.create(); } - @Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CreateTransaction prototype) { - return newBuilder().mergeFrom(prototype); - } - @Override - public Builder toBuilder() { return newBuilder(this); } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code org.opendaylight.controller.mdsal.CreateTransaction} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CreateTransactionOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_CreateTransaction_descriptor; - } - - @Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_CreateTransaction_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CreateTransaction.class, org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CreateTransaction.Builder.class); - } - - // Construct using org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CreateTransaction.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - private static Builder create() { - return new Builder(); - } - - @Override - public Builder clear() { - super.clear(); - transactionId_ = ""; - bitField0_ = (bitField0_ & ~0x00000001); - transactionType_ = 0; - bitField0_ = (bitField0_ & ~0x00000002); - transactionChainId_ = ""; - bitField0_ = (bitField0_ & ~0x00000004); - messageVersion_ = 0; - bitField0_ = (bitField0_ & ~0x00000008); - return this; - } - - @Override - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - @Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_CreateTransaction_descriptor; - } - - @Override - public org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CreateTransaction getDefaultInstanceForType() { - return org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CreateTransaction.getDefaultInstance(); - } - - @Override - public org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CreateTransaction build() { - org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CreateTransaction result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @Override - public org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CreateTransaction buildPartial() { - org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CreateTransaction result = new org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CreateTransaction(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.transactionId_ = transactionId_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.transactionType_ = transactionType_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - result.transactionChainId_ = transactionChainId_; - if (((from_bitField0_ & 0x00000008) == 0x00000008)) { - to_bitField0_ |= 0x00000008; - } - result.messageVersion_ = messageVersion_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - @Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CreateTransaction) { - return mergeFrom((org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CreateTransaction)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CreateTransaction other) { - if (other == org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CreateTransaction.getDefaultInstance()) { - return this; - } - if (other.hasTransactionId()) { - bitField0_ |= 0x00000001; - transactionId_ = other.transactionId_; - onChanged(); - } - if (other.hasTransactionType()) { - setTransactionType(other.getTransactionType()); - } - if (other.hasTransactionChainId()) { - bitField0_ |= 0x00000004; - transactionChainId_ = other.transactionChainId_; - onChanged(); - } - if (other.hasMessageVersion()) { - setMessageVersion(other.getMessageVersion()); - } - this.mergeUnknownFields(other.getUnknownFields()); - return this; - } - - @Override - public final boolean isInitialized() { - if (!hasTransactionId()) { - - return false; - } - if (!hasTransactionType()) { - - return false; - } - return true; - } - - @Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CreateTransaction parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CreateTransaction) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - // required string transactionId = 1; - private java.lang.Object transactionId_ = ""; - /** - * required string transactionId = 1; - */ - @Override - public boolean hasTransactionId() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * required string transactionId = 1; - */ - @Override - public java.lang.String getTransactionId() { - java.lang.Object ref = transactionId_; - if (!(ref instanceof java.lang.String)) { - java.lang.String s = ((com.google.protobuf.ByteString) ref) - .toStringUtf8(); - transactionId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * required string transactionId = 1; - */ - @Override - public com.google.protobuf.ByteString - getTransactionIdBytes() { - java.lang.Object ref = transactionId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - transactionId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * required string transactionId = 1; - */ - public Builder setTransactionId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - transactionId_ = value; - onChanged(); - return this; - } - /** - * required string transactionId = 1; - */ - public Builder clearTransactionId() { - bitField0_ = (bitField0_ & ~0x00000001); - transactionId_ = getDefaultInstance().getTransactionId(); - onChanged(); - return this; - } - /** - * required string transactionId = 1; - */ - public Builder setTransactionIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - transactionId_ = value; - onChanged(); - return this; - } - - // required int32 transactionType = 2; - private int transactionType_ ; - /** - * required int32 transactionType = 2; - */ - @Override - public boolean hasTransactionType() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * required int32 transactionType = 2; - */ - @Override - public int getTransactionType() { - return transactionType_; - } - /** - * required int32 transactionType = 2; - */ - public Builder setTransactionType(int value) { - bitField0_ |= 0x00000002; - transactionType_ = value; - onChanged(); - return this; - } - /** - * required int32 transactionType = 2; - */ - public Builder clearTransactionType() { - bitField0_ = (bitField0_ & ~0x00000002); - transactionType_ = 0; - onChanged(); - return this; - } - - // optional string transactionChainId = 3; - private java.lang.Object transactionChainId_ = ""; - /** - * optional string transactionChainId = 3; - */ - @Override - public boolean hasTransactionChainId() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional string transactionChainId = 3; - */ - @Override - public java.lang.String getTransactionChainId() { - java.lang.Object ref = transactionChainId_; - if (!(ref instanceof java.lang.String)) { - java.lang.String s = ((com.google.protobuf.ByteString) ref) - .toStringUtf8(); - transactionChainId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string transactionChainId = 3; - */ - @Override - public com.google.protobuf.ByteString - getTransactionChainIdBytes() { - java.lang.Object ref = transactionChainId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - transactionChainId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string transactionChainId = 3; - */ - public Builder setTransactionChainId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000004; - transactionChainId_ = value; - onChanged(); - return this; - } - /** - * optional string transactionChainId = 3; - */ - public Builder clearTransactionChainId() { - bitField0_ = (bitField0_ & ~0x00000004); - transactionChainId_ = getDefaultInstance().getTransactionChainId(); - onChanged(); - return this; - } - /** - * optional string transactionChainId = 3; - */ - public Builder setTransactionChainIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000004; - transactionChainId_ = value; - onChanged(); - return this; - } - - // optional int32 messageVersion = 4; - private int messageVersion_ ; - /** - * optional int32 messageVersion = 4; - */ - @Override - public boolean hasMessageVersion() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - /** - * optional int32 messageVersion = 4; - */ - @Override - public int getMessageVersion() { - return messageVersion_; - } - /** - * optional int32 messageVersion = 4; - */ - public Builder setMessageVersion(int value) { - bitField0_ |= 0x00000008; - messageVersion_ = value; - onChanged(); - return this; - } - /** - * optional int32 messageVersion = 4; - */ - public Builder clearMessageVersion() { - bitField0_ = (bitField0_ & ~0x00000008); - messageVersion_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:org.opendaylight.controller.mdsal.CreateTransaction) - } - - static { - defaultInstance = new CreateTransaction(true); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:org.opendaylight.controller.mdsal.CreateTransaction) - } - - public interface CreateTransactionReplyOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // required string transactionActorPath = 1; - /** - * required string transactionActorPath = 1; - */ - boolean hasTransactionActorPath(); - /** - * required string transactionActorPath = 1; - */ - java.lang.String getTransactionActorPath(); - /** - * required string transactionActorPath = 1; - */ - com.google.protobuf.ByteString - getTransactionActorPathBytes(); - - // required string transactionId = 2; - /** - * required string transactionId = 2; - */ - boolean hasTransactionId(); - /** - * required string transactionId = 2; - */ - java.lang.String getTransactionId(); - /** - * required string transactionId = 2; - */ - com.google.protobuf.ByteString - getTransactionIdBytes(); - - // optional int32 messageVersion = 3; - /** - * optional int32 messageVersion = 3; - */ - boolean hasMessageVersion(); - /** - * optional int32 messageVersion = 3; - */ - int getMessageVersion(); - } - /** - * Protobuf type {@code org.opendaylight.controller.mdsal.CreateTransactionReply} - */ - public static final class CreateTransactionReply extends - com.google.protobuf.GeneratedMessage - implements CreateTransactionReplyOrBuilder { - // Use CreateTransactionReply.newBuilder() to construct. - private CreateTransactionReply(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private CreateTransactionReply(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final CreateTransactionReply defaultInstance; - public static CreateTransactionReply getDefaultInstance() { - return defaultInstance; - } - - @Override - public CreateTransactionReply getDefaultInstanceForType() { - return defaultInstance; - } - - private final com.google.protobuf.UnknownFieldSet unknownFields; - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private CreateTransactionReply( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - done = true; - } - break; - } - case 10: { - bitField0_ |= 0x00000001; - transactionActorPath_ = input.readBytes(); - break; - } - case 18: { - bitField0_ |= 0x00000002; - transactionId_ = input.readBytes(); - break; - } - case 24: { - bitField0_ |= 0x00000004; - messageVersion_ = input.readInt32(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_CreateTransactionReply_descriptor; - } - - @Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_CreateTransactionReply_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CreateTransactionReply.class, org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CreateTransactionReply.Builder.class); - } - - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @Override - public CreateTransactionReply parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateTransactionReply(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - private int bitField0_; - // required string transactionActorPath = 1; - public static final int TRANSACTIONACTORPATH_FIELD_NUMBER = 1; - private java.lang.Object transactionActorPath_; - /** - * required string transactionActorPath = 1; - */ - @Override - public boolean hasTransactionActorPath() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * required string transactionActorPath = 1; - */ - @Override - public java.lang.String getTransactionActorPath() { - java.lang.Object ref = transactionActorPath_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - transactionActorPath_ = s; - } - return s; - } - } - /** - * required string transactionActorPath = 1; - */ - @Override - public com.google.protobuf.ByteString - getTransactionActorPathBytes() { - java.lang.Object ref = transactionActorPath_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - transactionActorPath_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - // required string transactionId = 2; - public static final int TRANSACTIONID_FIELD_NUMBER = 2; - private java.lang.Object transactionId_; - /** - * required string transactionId = 2; - */ - @Override - public boolean hasTransactionId() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * required string transactionId = 2; - */ - @Override - public java.lang.String getTransactionId() { - java.lang.Object ref = transactionId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - transactionId_ = s; - } - return s; - } - } - /** - * required string transactionId = 2; - */ - @Override - public com.google.protobuf.ByteString - getTransactionIdBytes() { - java.lang.Object ref = transactionId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - transactionId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - // optional int32 messageVersion = 3; - public static final int MESSAGEVERSION_FIELD_NUMBER = 3; - private int messageVersion_; - /** - * optional int32 messageVersion = 3; - */ - @Override - public boolean hasMessageVersion() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional int32 messageVersion = 3; - */ - @Override - public int getMessageVersion() { - return messageVersion_; - } - - private void initFields() { - transactionActorPath_ = ""; - transactionId_ = ""; - messageVersion_ = 0; - } - private byte memoizedIsInitialized = -1; - @Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) { - return isInitialized == 1; - } - - if (!hasTransactionActorPath()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasTransactionId()) { - memoizedIsInitialized = 0; - return false; - } - memoizedIsInitialized = 1; - return true; - } - - @Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, getTransactionActorPathBytes()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBytes(2, getTransactionIdBytes()); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeInt32(3, messageVersion_); - } - getUnknownFields().writeTo(output); - } - - private int memoizedSerializedSize = -1; - @Override - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) { - return size; - } - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, getTransactionActorPathBytes()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, getTransactionIdBytes()); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(3, messageVersion_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSerializedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - - public static org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CreateTransactionReply parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CreateTransactionReply parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CreateTransactionReply parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CreateTransactionReply parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CreateTransactionReply parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CreateTransactionReply parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CreateTransactionReply parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CreateTransactionReply parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CreateTransactionReply parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CreateTransactionReply parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public static Builder newBuilder() { return Builder.create(); } - @Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CreateTransactionReply prototype) { - return newBuilder().mergeFrom(prototype); - } - @Override - public Builder toBuilder() { return newBuilder(this); } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code org.opendaylight.controller.mdsal.CreateTransactionReply} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CreateTransactionReplyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_CreateTransactionReply_descriptor; - } - - @Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_CreateTransactionReply_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CreateTransactionReply.class, org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CreateTransactionReply.Builder.class); - } - - // Construct using org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CreateTransactionReply.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - private static Builder create() { - return new Builder(); - } - - @Override - public Builder clear() { - super.clear(); - transactionActorPath_ = ""; - bitField0_ = (bitField0_ & ~0x00000001); - transactionId_ = ""; - bitField0_ = (bitField0_ & ~0x00000002); - messageVersion_ = 0; - bitField0_ = (bitField0_ & ~0x00000004); - return this; - } - - @Override - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - @Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_CreateTransactionReply_descriptor; - } - - @Override - public org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CreateTransactionReply getDefaultInstanceForType() { - return org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CreateTransactionReply.getDefaultInstance(); - } - - @Override - public org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CreateTransactionReply build() { - org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CreateTransactionReply result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @Override - public org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CreateTransactionReply buildPartial() { - org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CreateTransactionReply result = new org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CreateTransactionReply(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.transactionActorPath_ = transactionActorPath_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.transactionId_ = transactionId_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - result.messageVersion_ = messageVersion_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - @Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CreateTransactionReply) { - return mergeFrom((org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CreateTransactionReply)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CreateTransactionReply other) { - if (other == org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CreateTransactionReply.getDefaultInstance()) { - return this; - } - if (other.hasTransactionActorPath()) { - bitField0_ |= 0x00000001; - transactionActorPath_ = other.transactionActorPath_; - onChanged(); - } - if (other.hasTransactionId()) { - bitField0_ |= 0x00000002; - transactionId_ = other.transactionId_; - onChanged(); - } - if (other.hasMessageVersion()) { - setMessageVersion(other.getMessageVersion()); - } - this.mergeUnknownFields(other.getUnknownFields()); - return this; - } - - @Override - public final boolean isInitialized() { - if (!hasTransactionActorPath()) { - - return false; - } - if (!hasTransactionId()) { - - return false; - } - return true; - } - - @Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CreateTransactionReply parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.CreateTransactionReply) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - // required string transactionActorPath = 1; - private java.lang.Object transactionActorPath_ = ""; - /** - * required string transactionActorPath = 1; - */ - @Override - public boolean hasTransactionActorPath() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * required string transactionActorPath = 1; - */ - @Override - public java.lang.String getTransactionActorPath() { - java.lang.Object ref = transactionActorPath_; - if (!(ref instanceof java.lang.String)) { - java.lang.String s = ((com.google.protobuf.ByteString) ref) - .toStringUtf8(); - transactionActorPath_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * required string transactionActorPath = 1; - */ - @Override - public com.google.protobuf.ByteString - getTransactionActorPathBytes() { - java.lang.Object ref = transactionActorPath_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - transactionActorPath_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * required string transactionActorPath = 1; - */ - public Builder setTransactionActorPath( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - transactionActorPath_ = value; - onChanged(); - return this; - } - /** - * required string transactionActorPath = 1; - */ - public Builder clearTransactionActorPath() { - bitField0_ = (bitField0_ & ~0x00000001); - transactionActorPath_ = getDefaultInstance().getTransactionActorPath(); - onChanged(); - return this; - } - /** - * required string transactionActorPath = 1; - */ - public Builder setTransactionActorPathBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - transactionActorPath_ = value; - onChanged(); - return this; - } - - // required string transactionId = 2; - private java.lang.Object transactionId_ = ""; - /** - * required string transactionId = 2; - */ - @Override - public boolean hasTransactionId() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * required string transactionId = 2; - */ - @Override - public java.lang.String getTransactionId() { - java.lang.Object ref = transactionId_; - if (!(ref instanceof java.lang.String)) { - java.lang.String s = ((com.google.protobuf.ByteString) ref) - .toStringUtf8(); - transactionId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * required string transactionId = 2; - */ - @Override - public com.google.protobuf.ByteString - getTransactionIdBytes() { - java.lang.Object ref = transactionId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - transactionId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * required string transactionId = 2; - */ - public Builder setTransactionId( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - transactionId_ = value; - onChanged(); - return this; - } - /** - * required string transactionId = 2; - */ - public Builder clearTransactionId() { - bitField0_ = (bitField0_ & ~0x00000002); - transactionId_ = getDefaultInstance().getTransactionId(); - onChanged(); - return this; - } - /** - * required string transactionId = 2; - */ - public Builder setTransactionIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - transactionId_ = value; - onChanged(); - return this; - } - - // optional int32 messageVersion = 3; - private int messageVersion_ ; - /** - * optional int32 messageVersion = 3; - */ - @Override - public boolean hasMessageVersion() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional int32 messageVersion = 3; - */ - @Override - public int getMessageVersion() { - return messageVersion_; - } - /** - * optional int32 messageVersion = 3; - */ - public Builder setMessageVersion(int value) { - bitField0_ |= 0x00000004; - messageVersion_ = value; - onChanged(); - return this; - } - /** - * optional int32 messageVersion = 3; - */ - public Builder clearMessageVersion() { - bitField0_ = (bitField0_ & ~0x00000004); - messageVersion_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:org.opendaylight.controller.mdsal.CreateTransactionReply) - } - - static { - defaultInstance = new CreateTransactionReply(true); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:org.opendaylight.controller.mdsal.CreateTransactionReply) - } - - public interface ReadDataOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // required .org.opendaylight.controller.mdsal.InstanceIdentifier instanceIdentifierPathArguments = 1; - /** - * required .org.opendaylight.controller.mdsal.InstanceIdentifier instanceIdentifierPathArguments = 1; - */ - boolean hasInstanceIdentifierPathArguments(); - /** - * required .org.opendaylight.controller.mdsal.InstanceIdentifier instanceIdentifierPathArguments = 1; - */ - org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.InstanceIdentifier getInstanceIdentifierPathArguments(); - /** - * required .org.opendaylight.controller.mdsal.InstanceIdentifier instanceIdentifierPathArguments = 1; - */ - org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.InstanceIdentifierOrBuilder getInstanceIdentifierPathArgumentsOrBuilder(); - } - /** - * Protobuf type {@code org.opendaylight.controller.mdsal.ReadData} - */ - public static final class ReadData extends - com.google.protobuf.GeneratedMessage - implements ReadDataOrBuilder { - // Use ReadData.newBuilder() to construct. - private ReadData(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private ReadData(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final ReadData defaultInstance; - public static ReadData getDefaultInstance() { - return defaultInstance; - } - - @Override - public ReadData getDefaultInstanceForType() { - return defaultInstance; - } - - private final com.google.protobuf.UnknownFieldSet unknownFields; - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ReadData( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - done = true; - } - break; - } - case 10: { - org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.InstanceIdentifier.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - subBuilder = instanceIdentifierPathArguments_.toBuilder(); - } - instanceIdentifierPathArguments_ = input.readMessage(org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.InstanceIdentifier.PARSER, extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(instanceIdentifierPathArguments_); - instanceIdentifierPathArguments_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_ReadData_descriptor; - } - - @Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_ReadData_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.ReadData.class, org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.ReadData.Builder.class); - } - - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @Override - public ReadData parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ReadData(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - private int bitField0_; - // required .org.opendaylight.controller.mdsal.InstanceIdentifier instanceIdentifierPathArguments = 1; - public static final int INSTANCEIDENTIFIERPATHARGUMENTS_FIELD_NUMBER = 1; - private org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.InstanceIdentifier instanceIdentifierPathArguments_; - /** - * required .org.opendaylight.controller.mdsal.InstanceIdentifier instanceIdentifierPathArguments = 1; - */ - @Override - public boolean hasInstanceIdentifierPathArguments() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * required .org.opendaylight.controller.mdsal.InstanceIdentifier instanceIdentifierPathArguments = 1; - */ - @Override - public org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.InstanceIdentifier getInstanceIdentifierPathArguments() { - return instanceIdentifierPathArguments_; - } - /** - * required .org.opendaylight.controller.mdsal.InstanceIdentifier instanceIdentifierPathArguments = 1; - */ - @Override - public org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.InstanceIdentifierOrBuilder getInstanceIdentifierPathArgumentsOrBuilder() { - return instanceIdentifierPathArguments_; - } - - private void initFields() { - instanceIdentifierPathArguments_ = org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.InstanceIdentifier.getDefaultInstance(); - } - private byte memoizedIsInitialized = -1; - @Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) { - return isInitialized == 1; - } - - if (!hasInstanceIdentifierPathArguments()) { - memoizedIsInitialized = 0; - return false; - } - if (!getInstanceIdentifierPathArguments().isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - memoizedIsInitialized = 1; - return true; - } - - @Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeMessage(1, instanceIdentifierPathArguments_); - } - getUnknownFields().writeTo(output); - } - - private int memoizedSerializedSize = -1; - @Override - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) { - return size; - } - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, instanceIdentifierPathArguments_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSerializedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - - public static org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.ReadData parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.ReadData parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.ReadData parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.ReadData parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.ReadData parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.ReadData parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.ReadData parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.ReadData parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.ReadData parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.ReadData parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public static Builder newBuilder() { return Builder.create(); } - @Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.ReadData prototype) { - return newBuilder().mergeFrom(prototype); - } - @Override - public Builder toBuilder() { return newBuilder(this); } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code org.opendaylight.controller.mdsal.ReadData} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.ReadDataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_ReadData_descriptor; - } - - @Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_ReadData_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.ReadData.class, org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.ReadData.Builder.class); - } - - // Construct using org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.ReadData.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getInstanceIdentifierPathArgumentsFieldBuilder(); - } - } - private static Builder create() { - return new Builder(); - } - - @Override - public Builder clear() { - super.clear(); - if (instanceIdentifierPathArgumentsBuilder_ == null) { - instanceIdentifierPathArguments_ = org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.InstanceIdentifier.getDefaultInstance(); - } else { - instanceIdentifierPathArgumentsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @Override - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - @Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_ReadData_descriptor; - } - - @Override - public org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.ReadData getDefaultInstanceForType() { - return org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.ReadData.getDefaultInstance(); - } - - @Override - public org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.ReadData build() { - org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.ReadData result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @Override - public org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.ReadData buildPartial() { - org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.ReadData result = new org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.ReadData(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - if (instanceIdentifierPathArgumentsBuilder_ == null) { - result.instanceIdentifierPathArguments_ = instanceIdentifierPathArguments_; - } else { - result.instanceIdentifierPathArguments_ = instanceIdentifierPathArgumentsBuilder_.build(); - } - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - @Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.ReadData) { - return mergeFrom((org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.ReadData)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.ReadData other) { - if (other == org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.ReadData.getDefaultInstance()) { - return this; - } - if (other.hasInstanceIdentifierPathArguments()) { - mergeInstanceIdentifierPathArguments(other.getInstanceIdentifierPathArguments()); - } - this.mergeUnknownFields(other.getUnknownFields()); - return this; - } - - @Override - public final boolean isInitialized() { - if (!hasInstanceIdentifierPathArguments()) { - - return false; - } - if (!getInstanceIdentifierPathArguments().isInitialized()) { - - return false; - } - return true; - } - - @Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.ReadData parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.ReadData) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - // required .org.opendaylight.controller.mdsal.InstanceIdentifier instanceIdentifierPathArguments = 1; - private org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.InstanceIdentifier instanceIdentifierPathArguments_ = org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.InstanceIdentifier.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.InstanceIdentifier, org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.InstanceIdentifier.Builder, org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.InstanceIdentifierOrBuilder> instanceIdentifierPathArgumentsBuilder_; - /** - * required .org.opendaylight.controller.mdsal.InstanceIdentifier instanceIdentifierPathArguments = 1; - */ - @Override - public boolean hasInstanceIdentifierPathArguments() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * required .org.opendaylight.controller.mdsal.InstanceIdentifier instanceIdentifierPathArguments = 1; - */ - @Override - public org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.InstanceIdentifier getInstanceIdentifierPathArguments() { - if (instanceIdentifierPathArgumentsBuilder_ == null) { - return instanceIdentifierPathArguments_; - } else { - return instanceIdentifierPathArgumentsBuilder_.getMessage(); - } - } - /** - * required .org.opendaylight.controller.mdsal.InstanceIdentifier instanceIdentifierPathArguments = 1; - */ - public Builder setInstanceIdentifierPathArguments(org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.InstanceIdentifier value) { - if (instanceIdentifierPathArgumentsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - instanceIdentifierPathArguments_ = value; - onChanged(); - } else { - instanceIdentifierPathArgumentsBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - return this; - } - /** - * required .org.opendaylight.controller.mdsal.InstanceIdentifier instanceIdentifierPathArguments = 1; - */ - public Builder setInstanceIdentifierPathArguments( - org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.InstanceIdentifier.Builder builderForValue) { - if (instanceIdentifierPathArgumentsBuilder_ == null) { - instanceIdentifierPathArguments_ = builderForValue.build(); - onChanged(); - } else { - instanceIdentifierPathArgumentsBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - return this; - } - /** - * required .org.opendaylight.controller.mdsal.InstanceIdentifier instanceIdentifierPathArguments = 1; - */ - public Builder mergeInstanceIdentifierPathArguments(org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.InstanceIdentifier value) { - if (instanceIdentifierPathArgumentsBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001) && - instanceIdentifierPathArguments_ != org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.InstanceIdentifier.getDefaultInstance()) { - instanceIdentifierPathArguments_ = - org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.InstanceIdentifier.newBuilder(instanceIdentifierPathArguments_).mergeFrom(value).buildPartial(); - } else { - instanceIdentifierPathArguments_ = value; - } - onChanged(); - } else { - instanceIdentifierPathArgumentsBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000001; - return this; - } - /** - * required .org.opendaylight.controller.mdsal.InstanceIdentifier instanceIdentifierPathArguments = 1; - */ - public Builder clearInstanceIdentifierPathArguments() { - if (instanceIdentifierPathArgumentsBuilder_ == null) { - instanceIdentifierPathArguments_ = org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.InstanceIdentifier.getDefaultInstance(); - onChanged(); - } else { - instanceIdentifierPathArgumentsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - /** - * required .org.opendaylight.controller.mdsal.InstanceIdentifier instanceIdentifierPathArguments = 1; - */ - public org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.InstanceIdentifier.Builder getInstanceIdentifierPathArgumentsBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getInstanceIdentifierPathArgumentsFieldBuilder().getBuilder(); - } - /** - * required .org.opendaylight.controller.mdsal.InstanceIdentifier instanceIdentifierPathArguments = 1; - */ - @Override - public org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.InstanceIdentifierOrBuilder getInstanceIdentifierPathArgumentsOrBuilder() { - if (instanceIdentifierPathArgumentsBuilder_ != null) { - return instanceIdentifierPathArgumentsBuilder_.getMessageOrBuilder(); - } else { - return instanceIdentifierPathArguments_; - } - } - /** - * required .org.opendaylight.controller.mdsal.InstanceIdentifier instanceIdentifierPathArguments = 1; - */ - private com.google.protobuf.SingleFieldBuilder< - org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.InstanceIdentifier, org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.InstanceIdentifier.Builder, org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.InstanceIdentifierOrBuilder> - getInstanceIdentifierPathArgumentsFieldBuilder() { - if (instanceIdentifierPathArgumentsBuilder_ == null) { - instanceIdentifierPathArgumentsBuilder_ = new com.google.protobuf.SingleFieldBuilder< - org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.InstanceIdentifier, org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.InstanceIdentifier.Builder, org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.InstanceIdentifierOrBuilder>( - instanceIdentifierPathArguments_, - getParentForChildren(), - isClean()); - instanceIdentifierPathArguments_ = null; - } - return instanceIdentifierPathArgumentsBuilder_; - } - - // @@protoc_insertion_point(builder_scope:org.opendaylight.controller.mdsal.ReadData) - } - - static { - defaultInstance = new ReadData(true); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:org.opendaylight.controller.mdsal.ReadData) - } - - public interface DataExistsOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // required .org.opendaylight.controller.mdsal.InstanceIdentifier instanceIdentifierPathArguments = 1; - /** - * required .org.opendaylight.controller.mdsal.InstanceIdentifier instanceIdentifierPathArguments = 1; - */ - boolean hasInstanceIdentifierPathArguments(); - /** - * required .org.opendaylight.controller.mdsal.InstanceIdentifier instanceIdentifierPathArguments = 1; - */ - org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.InstanceIdentifier getInstanceIdentifierPathArguments(); - /** - * required .org.opendaylight.controller.mdsal.InstanceIdentifier instanceIdentifierPathArguments = 1; - */ - org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.InstanceIdentifierOrBuilder getInstanceIdentifierPathArgumentsOrBuilder(); - } - /** - * Protobuf type {@code org.opendaylight.controller.mdsal.DataExists} - */ - public static final class DataExists extends - com.google.protobuf.GeneratedMessage - implements DataExistsOrBuilder { - // Use DataExists.newBuilder() to construct. - private DataExists(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private DataExists(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final DataExists defaultInstance; - public static DataExists getDefaultInstance() { - return defaultInstance; - } - - @Override - public DataExists getDefaultInstanceForType() { - return defaultInstance; - } - - private final com.google.protobuf.UnknownFieldSet unknownFields; - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DataExists( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - done = true; - } - break; - } - case 10: { - org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.InstanceIdentifier.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - subBuilder = instanceIdentifierPathArguments_.toBuilder(); - } - instanceIdentifierPathArguments_ = input.readMessage(org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.InstanceIdentifier.PARSER, extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(instanceIdentifierPathArguments_); - instanceIdentifierPathArguments_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_DataExists_descriptor; - } - - @Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_DataExists_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.DataExists.class, org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.DataExists.Builder.class); - } - - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @Override - public DataExists parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DataExists(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - private int bitField0_; - // required .org.opendaylight.controller.mdsal.InstanceIdentifier instanceIdentifierPathArguments = 1; - public static final int INSTANCEIDENTIFIERPATHARGUMENTS_FIELD_NUMBER = 1; - private org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.InstanceIdentifier instanceIdentifierPathArguments_; - /** - * required .org.opendaylight.controller.mdsal.InstanceIdentifier instanceIdentifierPathArguments = 1; - */ - @Override - public boolean hasInstanceIdentifierPathArguments() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * required .org.opendaylight.controller.mdsal.InstanceIdentifier instanceIdentifierPathArguments = 1; - */ - @Override - public org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.InstanceIdentifier getInstanceIdentifierPathArguments() { - return instanceIdentifierPathArguments_; - } - /** - * required .org.opendaylight.controller.mdsal.InstanceIdentifier instanceIdentifierPathArguments = 1; - */ - @Override - public org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.InstanceIdentifierOrBuilder getInstanceIdentifierPathArgumentsOrBuilder() { - return instanceIdentifierPathArguments_; - } - - private void initFields() { - instanceIdentifierPathArguments_ = org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.InstanceIdentifier.getDefaultInstance(); - } - private byte memoizedIsInitialized = -1; - @Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) { - return isInitialized == 1; - } - - if (!hasInstanceIdentifierPathArguments()) { - memoizedIsInitialized = 0; - return false; - } - if (!getInstanceIdentifierPathArguments().isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - memoizedIsInitialized = 1; - return true; - } - - @Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeMessage(1, instanceIdentifierPathArguments_); - } - getUnknownFields().writeTo(output); - } - - private int memoizedSerializedSize = -1; - @Override - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) { - return size; - } - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, instanceIdentifierPathArguments_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSerializedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - - public static org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.DataExists parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.DataExists parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.DataExists parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.DataExists parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.DataExists parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.DataExists parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.DataExists parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.DataExists parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.DataExists parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.DataExists parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public static Builder newBuilder() { return Builder.create(); } - @Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.DataExists prototype) { - return newBuilder().mergeFrom(prototype); - } - @Override - public Builder toBuilder() { return newBuilder(this); } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code org.opendaylight.controller.mdsal.DataExists} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.DataExistsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_DataExists_descriptor; - } - - @Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_DataExists_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.DataExists.class, org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.DataExists.Builder.class); - } - - // Construct using org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.DataExists.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getInstanceIdentifierPathArgumentsFieldBuilder(); - } - } - private static Builder create() { - return new Builder(); - } - - @Override - public Builder clear() { - super.clear(); - if (instanceIdentifierPathArgumentsBuilder_ == null) { - instanceIdentifierPathArguments_ = org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.InstanceIdentifier.getDefaultInstance(); - } else { - instanceIdentifierPathArgumentsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @Override - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - @Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_DataExists_descriptor; - } - - @Override - public org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.DataExists getDefaultInstanceForType() { - return org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.DataExists.getDefaultInstance(); - } - - @Override - public org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.DataExists build() { - org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.DataExists result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @Override - public org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.DataExists buildPartial() { - org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.DataExists result = new org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.DataExists(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - if (instanceIdentifierPathArgumentsBuilder_ == null) { - result.instanceIdentifierPathArguments_ = instanceIdentifierPathArguments_; - } else { - result.instanceIdentifierPathArguments_ = instanceIdentifierPathArgumentsBuilder_.build(); - } - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - @Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.DataExists) { - return mergeFrom((org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.DataExists)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.DataExists other) { - if (other == org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.DataExists.getDefaultInstance()) { - return this; - } - if (other.hasInstanceIdentifierPathArguments()) { - mergeInstanceIdentifierPathArguments(other.getInstanceIdentifierPathArguments()); - } - this.mergeUnknownFields(other.getUnknownFields()); - return this; - } - - @Override - public final boolean isInitialized() { - if (!hasInstanceIdentifierPathArguments()) { - - return false; - } - if (!getInstanceIdentifierPathArguments().isInitialized()) { - - return false; - } - return true; - } - - @Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.DataExists parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.DataExists) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - // required .org.opendaylight.controller.mdsal.InstanceIdentifier instanceIdentifierPathArguments = 1; - private org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.InstanceIdentifier instanceIdentifierPathArguments_ = org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.InstanceIdentifier.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.InstanceIdentifier, org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.InstanceIdentifier.Builder, org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.InstanceIdentifierOrBuilder> instanceIdentifierPathArgumentsBuilder_; - /** - * required .org.opendaylight.controller.mdsal.InstanceIdentifier instanceIdentifierPathArguments = 1; - */ - @Override - public boolean hasInstanceIdentifierPathArguments() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * required .org.opendaylight.controller.mdsal.InstanceIdentifier instanceIdentifierPathArguments = 1; - */ - @Override - public org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.InstanceIdentifier getInstanceIdentifierPathArguments() { - if (instanceIdentifierPathArgumentsBuilder_ == null) { - return instanceIdentifierPathArguments_; - } else { - return instanceIdentifierPathArgumentsBuilder_.getMessage(); - } - } - /** - * required .org.opendaylight.controller.mdsal.InstanceIdentifier instanceIdentifierPathArguments = 1; - */ - public Builder setInstanceIdentifierPathArguments(org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.InstanceIdentifier value) { - if (instanceIdentifierPathArgumentsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - instanceIdentifierPathArguments_ = value; - onChanged(); - } else { - instanceIdentifierPathArgumentsBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - return this; - } - /** - * required .org.opendaylight.controller.mdsal.InstanceIdentifier instanceIdentifierPathArguments = 1; - */ - public Builder setInstanceIdentifierPathArguments( - org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.InstanceIdentifier.Builder builderForValue) { - if (instanceIdentifierPathArgumentsBuilder_ == null) { - instanceIdentifierPathArguments_ = builderForValue.build(); - onChanged(); - } else { - instanceIdentifierPathArgumentsBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - return this; - } - /** - * required .org.opendaylight.controller.mdsal.InstanceIdentifier instanceIdentifierPathArguments = 1; - */ - public Builder mergeInstanceIdentifierPathArguments(org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.InstanceIdentifier value) { - if (instanceIdentifierPathArgumentsBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001) && - instanceIdentifierPathArguments_ != org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.InstanceIdentifier.getDefaultInstance()) { - instanceIdentifierPathArguments_ = - org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.InstanceIdentifier.newBuilder(instanceIdentifierPathArguments_).mergeFrom(value).buildPartial(); - } else { - instanceIdentifierPathArguments_ = value; - } - onChanged(); - } else { - instanceIdentifierPathArgumentsBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000001; - return this; - } - /** - * required .org.opendaylight.controller.mdsal.InstanceIdentifier instanceIdentifierPathArguments = 1; - */ - public Builder clearInstanceIdentifierPathArguments() { - if (instanceIdentifierPathArgumentsBuilder_ == null) { - instanceIdentifierPathArguments_ = org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.InstanceIdentifier.getDefaultInstance(); - onChanged(); - } else { - instanceIdentifierPathArgumentsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - /** - * required .org.opendaylight.controller.mdsal.InstanceIdentifier instanceIdentifierPathArguments = 1; - */ - public org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.InstanceIdentifier.Builder getInstanceIdentifierPathArgumentsBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getInstanceIdentifierPathArgumentsFieldBuilder().getBuilder(); - } - /** - * required .org.opendaylight.controller.mdsal.InstanceIdentifier instanceIdentifierPathArguments = 1; - */ - @Override - public org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.InstanceIdentifierOrBuilder getInstanceIdentifierPathArgumentsOrBuilder() { - if (instanceIdentifierPathArgumentsBuilder_ != null) { - return instanceIdentifierPathArgumentsBuilder_.getMessageOrBuilder(); - } else { - return instanceIdentifierPathArguments_; - } - } - /** - * required .org.opendaylight.controller.mdsal.InstanceIdentifier instanceIdentifierPathArguments = 1; - */ - private com.google.protobuf.SingleFieldBuilder< - org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.InstanceIdentifier, org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.InstanceIdentifier.Builder, org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.InstanceIdentifierOrBuilder> - getInstanceIdentifierPathArgumentsFieldBuilder() { - if (instanceIdentifierPathArgumentsBuilder_ == null) { - instanceIdentifierPathArgumentsBuilder_ = new com.google.protobuf.SingleFieldBuilder< - org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.InstanceIdentifier, org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.InstanceIdentifier.Builder, org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.InstanceIdentifierOrBuilder>( - instanceIdentifierPathArguments_, - getParentForChildren(), - isClean()); - instanceIdentifierPathArguments_ = null; - } - return instanceIdentifierPathArgumentsBuilder_; - } - - // @@protoc_insertion_point(builder_scope:org.opendaylight.controller.mdsal.DataExists) - } - - static { - defaultInstance = new DataExists(true); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:org.opendaylight.controller.mdsal.DataExists) - } - - public interface DataExistsReplyOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // required bool exists = 1; - /** - * required bool exists = 1; - */ - boolean hasExists(); - /** - * required bool exists = 1; - */ - boolean getExists(); - } - /** - * Protobuf type {@code org.opendaylight.controller.mdsal.DataExistsReply} - */ - public static final class DataExistsReply extends - com.google.protobuf.GeneratedMessage - implements DataExistsReplyOrBuilder { - // Use DataExistsReply.newBuilder() to construct. - private DataExistsReply(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private DataExistsReply(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final DataExistsReply defaultInstance; - public static DataExistsReply getDefaultInstance() { - return defaultInstance; - } - - @Override - public DataExistsReply getDefaultInstanceForType() { - return defaultInstance; - } - - private final com.google.protobuf.UnknownFieldSet unknownFields; - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DataExistsReply( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - done = true; - } - break; - } - case 8: { - bitField0_ |= 0x00000001; - exists_ = input.readBool(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_DataExistsReply_descriptor; - } - - @Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_DataExistsReply_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.DataExistsReply.class, org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.DataExistsReply.Builder.class); - } - - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @Override - public DataExistsReply parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DataExistsReply(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - private int bitField0_; - // required bool exists = 1; - public static final int EXISTS_FIELD_NUMBER = 1; - private boolean exists_; - /** - * required bool exists = 1; - */ - @Override - public boolean hasExists() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * required bool exists = 1; - */ - @Override - public boolean getExists() { - return exists_; - } - - private void initFields() { - exists_ = false; - } - private byte memoizedIsInitialized = -1; - @Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) { - return isInitialized == 1; - } - - if (!hasExists()) { - memoizedIsInitialized = 0; - return false; - } - memoizedIsInitialized = 1; - return true; - } - - @Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBool(1, exists_); - } - getUnknownFields().writeTo(output); - } - - private int memoizedSerializedSize = -1; - @Override - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) { - return size; - } - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(1, exists_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSerializedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - - public static org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.DataExistsReply parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.DataExistsReply parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.DataExistsReply parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.DataExistsReply parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.DataExistsReply parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.DataExistsReply parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.DataExistsReply parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.DataExistsReply parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.DataExistsReply parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.DataExistsReply parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public static Builder newBuilder() { return Builder.create(); } - @Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.DataExistsReply prototype) { - return newBuilder().mergeFrom(prototype); - } - @Override - public Builder toBuilder() { return newBuilder(this); } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code org.opendaylight.controller.mdsal.DataExistsReply} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.DataExistsReplyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_DataExistsReply_descriptor; - } - - @Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_DataExistsReply_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.DataExistsReply.class, org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.DataExistsReply.Builder.class); - } - - // Construct using org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.DataExistsReply.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - private static Builder create() { - return new Builder(); - } - - @Override - public Builder clear() { - super.clear(); - exists_ = false; - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @Override - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - @Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.internal_static_org_opendaylight_controller_mdsal_DataExistsReply_descriptor; - } - - @Override - public org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.DataExistsReply getDefaultInstanceForType() { - return org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.DataExistsReply.getDefaultInstance(); - } - - @Override - public org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.DataExistsReply build() { - org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.DataExistsReply result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @Override - public org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.DataExistsReply buildPartial() { - org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.DataExistsReply result = new org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.DataExistsReply(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.exists_ = exists_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - @Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.DataExistsReply) { - return mergeFrom((org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.DataExistsReply)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.DataExistsReply other) { - if (other == org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.DataExistsReply.getDefaultInstance()) { - return this; - } - if (other.hasExists()) { - setExists(other.getExists()); - } - this.mergeUnknownFields(other.getUnknownFields()); - return this; - } - - @Override - public final boolean isInitialized() { - if (!hasExists()) { - - return false; - } - return true; - } - - @Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.DataExistsReply parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages.DataExistsReply) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - // required bool exists = 1; - private boolean exists_ ; - /** - * required bool exists = 1; - */ - @Override - public boolean hasExists() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * required bool exists = 1; - */ - @Override - public boolean getExists() { - return exists_; - } - /** - * required bool exists = 1; - */ - public Builder setExists(boolean value) { - bitField0_ |= 0x00000001; - exists_ = value; - onChanged(); - return this; - } - /** - * required bool exists = 1; - */ - public Builder clearExists() { - bitField0_ = (bitField0_ & ~0x00000001); - exists_ = false; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:org.opendaylight.controller.mdsal.DataExistsReply) - } - - static { - defaultInstance = new DataExistsReply(true); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:org.opendaylight.controller.mdsal.DataExistsReply) - } - - private static com.google.protobuf.Descriptors.Descriptor - internal_static_org_opendaylight_controller_mdsal_CloseTransaction_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_org_opendaylight_controller_mdsal_CloseTransaction_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_org_opendaylight_controller_mdsal_CloseTransactionReply_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_org_opendaylight_controller_mdsal_CloseTransactionReply_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_org_opendaylight_controller_mdsal_CreateTransaction_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_org_opendaylight_controller_mdsal_CreateTransaction_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_org_opendaylight_controller_mdsal_CreateTransactionReply_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_org_opendaylight_controller_mdsal_CreateTransactionReply_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_org_opendaylight_controller_mdsal_ReadData_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_org_opendaylight_controller_mdsal_ReadData_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_org_opendaylight_controller_mdsal_DataExists_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_org_opendaylight_controller_mdsal_DataExists_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_org_opendaylight_controller_mdsal_DataExistsReply_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_org_opendaylight_controller_mdsal_DataExistsReply_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n\026ShardTransaction.proto\022!org.opendaylig" + - "ht.controller.mdsal\032\014Common.proto\"\022\n\020Clo" + - "seTransaction\"\027\n\025CloseTransactionReply\"w" + - "\n\021CreateTransaction\022\025\n\rtransactionId\030\001 \002" + - "(\t\022\027\n\017transactionType\030\002 \002(\005\022\032\n\022transacti" + - "onChainId\030\003 \001(\t\022\026\n\016messageVersion\030\004 \001(\005\"" + - "e\n\026CreateTransactionReply\022\034\n\024transaction" + - "ActorPath\030\001 \002(\t\022\025\n\rtransactionId\030\002 \002(\t\022\026" + - "\n\016messageVersion\030\003 \001(\005\"j\n\010ReadData\022^\n\037in" + - "stanceIdentifierPathArguments\030\001 \002(\01325.or", - "g.opendaylight.controller.mdsal.Instance" + - "Identifier\"l\n\nDataExists\022^\n\037instanceIden" + - "tifierPathArguments\030\001 \002(\01325.org.opendayl" + - "ight.controller.mdsal.InstanceIdentifier" + - "\"!\n\017DataExistsReply\022\016\n\006exists\030\001 \002(\010BV\n:o" + - "rg.opendaylight.controller.protobuff.mes" + - "sages.transactionB\030ShardTransactionMessa" + - "ges" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { - @Override - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - internal_static_org_opendaylight_controller_mdsal_CloseTransaction_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_org_opendaylight_controller_mdsal_CloseTransaction_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_org_opendaylight_controller_mdsal_CloseTransaction_descriptor, - new java.lang.String[] { }); - internal_static_org_opendaylight_controller_mdsal_CloseTransactionReply_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_org_opendaylight_controller_mdsal_CloseTransactionReply_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_org_opendaylight_controller_mdsal_CloseTransactionReply_descriptor, - new java.lang.String[] { }); - internal_static_org_opendaylight_controller_mdsal_CreateTransaction_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_org_opendaylight_controller_mdsal_CreateTransaction_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_org_opendaylight_controller_mdsal_CreateTransaction_descriptor, - new java.lang.String[] { "TransactionId", "TransactionType", "TransactionChainId", "MessageVersion", }); - internal_static_org_opendaylight_controller_mdsal_CreateTransactionReply_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_org_opendaylight_controller_mdsal_CreateTransactionReply_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_org_opendaylight_controller_mdsal_CreateTransactionReply_descriptor, - new java.lang.String[] { "TransactionActorPath", "TransactionId", "MessageVersion", }); - internal_static_org_opendaylight_controller_mdsal_ReadData_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_org_opendaylight_controller_mdsal_ReadData_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_org_opendaylight_controller_mdsal_ReadData_descriptor, - new java.lang.String[] { "InstanceIdentifierPathArguments", }); - internal_static_org_opendaylight_controller_mdsal_DataExists_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_org_opendaylight_controller_mdsal_DataExists_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_org_opendaylight_controller_mdsal_DataExists_descriptor, - new java.lang.String[] { "InstanceIdentifierPathArguments", }); - internal_static_org_opendaylight_controller_mdsal_DataExistsReply_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_org_opendaylight_controller_mdsal_DataExistsReply_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_org_opendaylight_controller_mdsal_DataExistsReply_descriptor, - new java.lang.String[] { "Exists", }); - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages.getDescriptor(), - }, assigner); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/protobuff/messages/cohort3pc/ThreePhaseCommitCohortMessagesTest.java b/opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/protobuff/messages/cohort3pc/ThreePhaseCommitCohortMessagesTest.java deleted file mode 100644 index 6c988b9ce7..0000000000 --- a/opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/protobuff/messages/cohort3pc/ThreePhaseCommitCohortMessagesTest.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * - * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v10.html - * - */ - -package org.opendaylight.controller.protobuff.messages.cohort3pc; - -import org.junit.Assert; -import org.junit.Test; -import org.opendaylight.controller.protobuff.messages.AbstractMessagesTest; - -/** - * This test case is present to ensure that if others have used proper version of protocol buffer - * for the cohort.proto messages - * - * If a different version of protocol buffer and there is change in serializaiton format - * this test would break as we are comparing with protocol buffer 2.5 generated - * serialized data. - * - * @author: syedbahm - * - */ - - -public class ThreePhaseCommitCohortMessagesTest extends AbstractMessagesTest { - - - @Test - public void verifySerialization() throws Exception { - - - - ThreePhaseCommitCohortMessages.CanCommitTransactionReply.Builder builder = - ThreePhaseCommitCohortMessages.CanCommitTransactionReply.newBuilder(); - builder.setCanCommit(true); - - writeToFile(builder); - - // Here we will read from the just serialized data - - ThreePhaseCommitCohortMessages.CanCommitTransactionReply newCanCommitTransactionReply = - (ThreePhaseCommitCohortMessages.CanCommitTransactionReply) readFromFile(ThreePhaseCommitCohortMessages.CanCommitTransactionReply.PARSER); - - Assert.assertTrue(newCanCommitTransactionReply.getCanCommit()); - - - // Here we will read the same from our test-data file and check we got back what we had saved - // earlier - ThreePhaseCommitCohortMessages.CanCommitTransactionReply originalCanCommitTransactionReply = - (ThreePhaseCommitCohortMessages.CanCommitTransactionReply) readFromTestDataFile(ThreePhaseCommitCohortMessages.CanCommitTransactionReply.PARSER); - - Assert.assertEquals(newCanCommitTransactionReply.getCanCommit(), - originalCanCommitTransactionReply.getCanCommit()); - - } - - @Override - public String getTestFileName() { - return ThreePhaseCommitCohortMessagesTest.class.getSimpleName(); - } - - -} diff --git a/opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/protobuff/messages/transaction/ShardTransactionChainMessagesTest.java b/opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/protobuff/messages/transaction/ShardTransactionChainMessagesTest.java deleted file mode 100644 index dba8f4f95a..0000000000 --- a/opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/protobuff/messages/transaction/ShardTransactionChainMessagesTest.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * - * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v10.html - * - */ - -package org.opendaylight.controller.protobuff.messages.transaction; - -import org.junit.Test; -import org.opendaylight.controller.protobuff.messages.AbstractMessagesTest; - -/** - * This test case is present to ensure that if others have used proper version of protocol buffer - * for the ShardTransactionChain.proto messages - * - * If a different version of protocol buffer and there is change in serializaiton format - * this test would break as we are comparing with protocol buffer 2.5 generated - * serialized data. - * - * @author: syedbahm - * - */ - - -public class ShardTransactionChainMessagesTest extends AbstractMessagesTest { - - @Override - @Test - public void verifySerialization() throws Exception { - } - - @Override - public String getTestFileName() { - return ShardTransactionChainMessagesTest.class.getSimpleName(); - } - - - -} diff --git a/opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/protobuff/messages/transaction/ShardTransactionMessagesTest.java b/opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/protobuff/messages/transaction/ShardTransactionMessagesTest.java deleted file mode 100644 index e2b49e76b6..0000000000 --- a/opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/protobuff/messages/transaction/ShardTransactionMessagesTest.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * - * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v10.html - * - */ - -package org.opendaylight.controller.protobuff.messages.transaction; - -import org.junit.Assert; -import org.junit.Test; -import org.opendaylight.controller.protobuff.messages.AbstractMessagesTest; -import org.opendaylight.controller.protobuff.messages.common.NormalizedNodeMessages; -import org.opendaylight.yangtools.yang.common.QName; - -/** - * This test case is present to ensure that if others have used proper version of protocol buffer - * for the ShardTransaction.proto messages - * - * If a different version of protocol buffer and there is change in serializaiton format - * this test would break as we are comparing with protocol buffer 2.5 generated - * serialized data. - * - * @author: syedbahm - * - */ - - -public class ShardTransactionMessagesTest extends AbstractMessagesTest { - - private final String namespace = "urn:protobuff", revision = "2014-07-31", - localName = "test"; - - @Test - public void verifySerialization() throws Exception { - NormalizedNodeMessages.InstanceIdentifier.Builder instanceIdentifierBuilder = - NormalizedNodeMessages.InstanceIdentifier.newBuilder(); - NormalizedNodeMessages.PathArgument.Builder pathArgument = - NormalizedNodeMessages.PathArgument.newBuilder(); - pathArgument.setNodeType(NormalizedNodeMessages.QName.newBuilder() - .setValue(QName.create(namespace, revision, localName).toString()) - .build()); - pathArgument.setValue("test"); - instanceIdentifierBuilder.addArguments(pathArgument.build()); - ShardTransactionMessages.ReadData.Builder builder = - ShardTransactionMessages.ReadData.newBuilder(); - NormalizedNodeMessages.InstanceIdentifier expectedOne = - instanceIdentifierBuilder.build(); - builder.setInstanceIdentifierPathArguments(expectedOne); - - writeToFile(builder); - - // Here we will read the same and check we got back what we had saved - ShardTransactionMessages.ReadData readDataNew = - (ShardTransactionMessages.ReadData) readFromFile(ShardTransactionMessages.ReadData.PARSER); - - - Assert.assertEquals(expectedOne.getArgumentsCount(), readDataNew - .getInstanceIdentifierPathArguments().getArgumentsCount()); - Assert.assertEquals(expectedOne.getArguments(0), readDataNew - .getInstanceIdentifierPathArguments().getArguments(0)); - - - // the following will compare with the version we had shipped - ShardTransactionMessages.ReadData readDataOriginal = - (ShardTransactionMessages.ReadData) readFromTestDataFile(ShardTransactionMessages.ReadData.PARSER); - - - Assert.assertEquals(readDataNew.getInstanceIdentifierPathArguments() - .getArguments(0), readDataOriginal.getInstanceIdentifierPathArguments() - .getArguments(0)); - - } - - @Override - public String getTestFileName() { - return ShardTransactionMessagesTest.class.getSimpleName(); - } - - - -} diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/AbortTransaction.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/AbortTransaction.java index ed4519b83a..f7b569727a 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/AbortTransaction.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/AbortTransaction.java @@ -8,8 +8,7 @@ package org.opendaylight.controller.cluster.datastore.messages; -import org.opendaylight.controller.cluster.datastore.DataStoreVersions; -import org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages; +import com.google.common.base.Preconditions; public class AbortTransaction extends AbstractThreePhaseCommitMessage { private static final long serialVersionUID = 1L; @@ -21,24 +20,12 @@ public class AbortTransaction extends AbstractThreePhaseCommitMessage { super(transactionID, version); } - @Deprecated - @Override - protected Object newLegacySerializedInstance() { - return ThreePhaseCommitCohortMessages.AbortTransaction.newBuilder(). - setTransactionId(getTransactionID()).build(); - } - public static AbortTransaction fromSerializable(Object serializable) { - if(serializable instanceof AbortTransaction) { + Preconditions.checkArgument(serializable instanceof AbortTransaction); return (AbortTransaction)serializable; - } else { - return new AbortTransaction(((ThreePhaseCommitCohortMessages.AbortTransaction)serializable). - getTransactionId(), DataStoreVersions.LITHIUM_VERSION); - } } public static boolean isSerializedType(Object message) { - return message instanceof AbortTransaction || - message instanceof ThreePhaseCommitCohortMessages.AbortTransaction; + return message instanceof AbortTransaction; } } diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/AbortTransactionReply.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/AbortTransactionReply.java index 398f25336f..3b58458e1a 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/AbortTransactionReply.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/AbortTransactionReply.java @@ -9,13 +9,8 @@ package org.opendaylight.controller.cluster.datastore.messages; import org.opendaylight.controller.cluster.datastore.DataStoreVersions; -import org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages; public class AbortTransactionReply extends VersionedExternalizableMessage { - @Deprecated - private static final Object SERIALIZED_INSTANCE = - ThreePhaseCommitCohortMessages.AbortTransactionReply.newBuilder().build(); - private static final AbortTransactionReply INSTANCE = new AbortTransactionReply(); public AbortTransactionReply() { @@ -25,18 +20,11 @@ public class AbortTransactionReply extends VersionedExternalizableMessage { super(version); } - @Deprecated - @Override - protected Object newLegacySerializedInstance() { - return SERIALIZED_INSTANCE; - } - public static AbortTransactionReply instance(short version) { return version == DataStoreVersions.CURRENT_VERSION ? INSTANCE : new AbortTransactionReply(version); } public static boolean isSerializedType(Object message) { - return message instanceof AbortTransactionReply || - message instanceof ThreePhaseCommitCohortMessages.AbortTransactionReply; + return message instanceof AbortTransactionReply; } } diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/BatchedModificationsReply.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/BatchedModificationsReply.java index 3f179cf001..070b143cda 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/BatchedModificationsReply.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/BatchedModificationsReply.java @@ -44,12 +44,6 @@ public class BatchedModificationsReply extends VersionedExternalizableMessage { out.writeInt(numBatched); } - @Override - protected Object newLegacySerializedInstance() { - // no legacy serialized type for this class; return self - return this; - } - @Override public String toString() { StringBuilder builder = new StringBuilder(); diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/CanCommitTransaction.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/CanCommitTransaction.java index e0bf4489b4..2acaaeaadf 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/CanCommitTransaction.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/CanCommitTransaction.java @@ -8,8 +8,7 @@ package org.opendaylight.controller.cluster.datastore.messages; -import org.opendaylight.controller.cluster.datastore.DataStoreVersions; -import org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages; +import com.google.common.base.Preconditions; public class CanCommitTransaction extends AbstractThreePhaseCommitMessage { private static final long serialVersionUID = 1L; @@ -21,24 +20,12 @@ public class CanCommitTransaction extends AbstractThreePhaseCommitMessage { super(transactionID, version); } - @Deprecated - @Override - protected Object newLegacySerializedInstance() { - return ThreePhaseCommitCohortMessages.CanCommitTransaction.newBuilder(). - setTransactionId(getTransactionID()).build(); - } - public static CanCommitTransaction fromSerializable(Object serializable) { - if(serializable instanceof CanCommitTransaction) { - return (CanCommitTransaction)serializable; - } else { - return new CanCommitTransaction(((ThreePhaseCommitCohortMessages.CanCommitTransaction)serializable). - getTransactionId(), DataStoreVersions.LITHIUM_VERSION); - } + Preconditions.checkArgument(serializable instanceof CanCommitTransaction); + return (CanCommitTransaction)serializable; } public static boolean isSerializedType(Object message) { - return message instanceof CanCommitTransaction || - message instanceof ThreePhaseCommitCohortMessages.CanCommitTransaction; + return message instanceof CanCommitTransaction; } } 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 6b88b96ca6..f346cba433 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,11 +8,11 @@ package org.opendaylight.controller.cluster.datastore.messages; +import com.google.common.base.Preconditions; 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.cohort3pc.ThreePhaseCommitCohortMessages; public class CanCommitTransactionReply extends VersionedExternalizableMessage { private static final CanCommitTransactionReply YES = @@ -20,14 +20,6 @@ public class CanCommitTransactionReply extends VersionedExternalizableMessage { private static final CanCommitTransactionReply NO = new CanCommitTransactionReply(false, DataStoreVersions.CURRENT_VERSION); - @Deprecated - private static final ThreePhaseCommitCohortMessages.CanCommitTransactionReply YES_SERIALIZED = - ThreePhaseCommitCohortMessages.CanCommitTransactionReply.newBuilder().setCanCommit(true).build(); - - @Deprecated - private static final ThreePhaseCommitCohortMessages.CanCommitTransactionReply NO_SERIALIZED = - ThreePhaseCommitCohortMessages.CanCommitTransactionReply.newBuilder().setCanCommit(false).build(); - private boolean canCommit; public CanCommitTransactionReply() { @@ -54,12 +46,6 @@ public class CanCommitTransactionReply extends VersionedExternalizableMessage { out.writeBoolean(canCommit); } - @Deprecated - @Override - protected Object newLegacySerializedInstance() { - return canCommit ? YES_SERIALIZED : NO_SERIALIZED; - } - @Override public String toString() { return "CanCommitTransactionReply [canCommit=" + canCommit + ", version=" + getVersion() + "]"; @@ -74,17 +60,11 @@ public class CanCommitTransactionReply extends VersionedExternalizableMessage { } public static CanCommitTransactionReply fromSerializable(final Object serializable) { - if(serializable instanceof CanCommitTransactionReply) { - return (CanCommitTransactionReply)serializable; - } else { - ThreePhaseCommitCohortMessages.CanCommitTransactionReply serialized = - (ThreePhaseCommitCohortMessages.CanCommitTransactionReply) serializable; - return serialized.getCanCommit() ? YES : NO; - } + Preconditions.checkArgument(serializable instanceof CanCommitTransactionReply); + return (CanCommitTransactionReply)serializable; } public static boolean isSerializedType(Object message) { - return message instanceof CanCommitTransactionReply || - message instanceof ThreePhaseCommitCohortMessages.CanCommitTransactionReply; + return message instanceof CanCommitTransactionReply; } } diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/CloseTransaction.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/CloseTransaction.java index 8cf50023c6..1a3567cafa 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/CloseTransaction.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/CloseTransaction.java @@ -8,15 +8,9 @@ package org.opendaylight.controller.cluster.datastore.messages; -import org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages; - public class CloseTransaction extends VersionedExternalizableMessage { private static final long serialVersionUID = 1L; - @Deprecated - private static final Object SERIALIZED_INSTANCE = - ShardTransactionMessages.CloseTransaction.newBuilder().build(); - public CloseTransaction() { } @@ -24,13 +18,7 @@ public class CloseTransaction extends VersionedExternalizableMessage { super(version); } - @Deprecated - @Override - protected Object newLegacySerializedInstance() { - return SERIALIZED_INSTANCE; - } - public static boolean isSerializedType(Object message) { - return message instanceof CloseTransaction || message instanceof ShardTransactionMessages.CloseTransaction; + return message instanceof CloseTransaction; } } diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/CloseTransactionChain.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/CloseTransactionChain.java index b93f94e77c..212f2bca92 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/CloseTransactionChain.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/CloseTransactionChain.java @@ -8,11 +8,10 @@ package org.opendaylight.controller.cluster.datastore.messages; +import com.google.common.base.Preconditions; 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.ShardTransactionChainMessages; public class CloseTransactionChain extends VersionedExternalizableMessage { private static final long serialVersionUID = 1L; @@ -43,26 +42,12 @@ public class CloseTransactionChain extends VersionedExternalizableMessage { out.writeUTF(transactionChainId); } - @Deprecated - @Override - protected Object newLegacySerializedInstance() { - return ShardTransactionChainMessages.CloseTransactionChain.newBuilder().setTransactionChainId(transactionChainId) - .build(); - } - public static CloseTransactionChain fromSerializable(final Object serializable){ - if(serializable instanceof CloseTransactionChain) { - return (CloseTransactionChain)serializable; - } else { - ShardTransactionChainMessages.CloseTransactionChain closeTransactionChain = - (ShardTransactionChainMessages.CloseTransactionChain) serializable; - return new CloseTransactionChain(closeTransactionChain.getTransactionChainId(), - DataStoreVersions.LITHIUM_VERSION); - } + Preconditions.checkArgument(serializable instanceof CloseTransactionChain); + return (CloseTransactionChain)serializable; } public static boolean isSerializedType(Object message) { - return message instanceof CloseTransactionChain || - message instanceof ShardTransactionChainMessages.CloseTransactionChain; + return message instanceof CloseTransactionChain; } } diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/CloseTransactionReply.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/CloseTransactionReply.java index 549a274759..0e21b578ca 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/CloseTransactionReply.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/CloseTransactionReply.java @@ -13,10 +13,4 @@ public class CloseTransactionReply extends VersionedExternalizableMessage { public CloseTransactionReply() { } - - @Override - protected Object newLegacySerializedInstance() { - // no legacy serialized type for this class; return self - return this; - } } diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/CommitTransaction.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/CommitTransaction.java index 52ab643ad8..16cab0950b 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/CommitTransaction.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/CommitTransaction.java @@ -8,8 +8,7 @@ package org.opendaylight.controller.cluster.datastore.messages; -import org.opendaylight.controller.cluster.datastore.DataStoreVersions; -import org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages; +import com.google.common.base.Preconditions; public class CommitTransaction extends AbstractThreePhaseCommitMessage { private static final long serialVersionUID = 1L; @@ -21,24 +20,13 @@ public class CommitTransaction extends AbstractThreePhaseCommitMessage { super(transactionID, version); } - @Deprecated - @Override - protected Object newLegacySerializedInstance() { - return ThreePhaseCommitCohortMessages.CommitTransaction.newBuilder().setTransactionId( - getTransactionID()).build(); - } - public static CommitTransaction fromSerializable(Object serializable) { - if(serializable instanceof CommitTransaction) { - return (CommitTransaction)serializable; - } else { - return new CommitTransaction(((ThreePhaseCommitCohortMessages.CommitTransaction)serializable). - getTransactionId(), DataStoreVersions.LITHIUM_VERSION); - } + Preconditions.checkArgument(serializable instanceof CommitTransaction); + return (CommitTransaction)serializable; + } public static boolean isSerializedType(Object message) { - return message instanceof CommitTransaction || - message instanceof ThreePhaseCommitCohortMessages.CommitTransaction; + return message instanceof CommitTransaction; } } diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/CommitTransactionReply.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/CommitTransactionReply.java index b50bbcc1f3..cd3a13a9f7 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/CommitTransactionReply.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/CommitTransactionReply.java @@ -9,13 +9,8 @@ package org.opendaylight.controller.cluster.datastore.messages; import org.opendaylight.controller.cluster.datastore.DataStoreVersions; -import org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages; public class CommitTransactionReply extends VersionedExternalizableMessage { - @Deprecated - private static final Object SERIALIZED_INSTANCE = - ThreePhaseCommitCohortMessages.CommitTransactionReply.newBuilder().build(); - public static final CommitTransactionReply INSTANCE = new CommitTransactionReply(); public CommitTransactionReply() { @@ -25,18 +20,11 @@ public class CommitTransactionReply extends VersionedExternalizableMessage { super(version); } - @Deprecated - @Override - protected Object newLegacySerializedInstance() { - return SERIALIZED_INSTANCE; - } - public static CommitTransactionReply instance(short version) { return version == DataStoreVersions.CURRENT_VERSION ? INSTANCE : new CommitTransactionReply(version); } public static boolean isSerializedType(Object message) { - return message instanceof CommitTransactionReply || - message instanceof ThreePhaseCommitCohortMessages.CommitTransactionReply; + return message instanceof CommitTransactionReply; } } diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/CreateTransaction.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/CreateTransaction.java index bad7cfad91..3d831a568c 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/CreateTransaction.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/CreateTransaction.java @@ -12,7 +12,6 @@ import com.google.common.base.Preconditions; import java.io.IOException; import java.io.ObjectInput; import java.io.ObjectOutput; -import org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages; public class CreateTransaction extends VersionedExternalizableMessage { private static final long serialVersionUID = 1L; @@ -60,14 +59,6 @@ public class CreateTransaction extends VersionedExternalizableMessage { out.writeUTF(transactionChainId); } - @Deprecated - @Override - protected Object newLegacySerializedInstance() { - return ShardTransactionMessages.CreateTransaction.newBuilder().setTransactionId(transactionId) - .setTransactionType(transactionType).setTransactionChainId(transactionChainId) - .setMessageVersion(getVersion()).build(); - } - @Override public String toString() { return "CreateTransaction [transactionId=" + transactionId + ", transactionType=" + transactionType @@ -75,18 +66,11 @@ public class CreateTransaction extends VersionedExternalizableMessage { } public static CreateTransaction fromSerializable(Object message) { - if(message instanceof CreateTransaction) { - return (CreateTransaction)message; - } else { - ShardTransactionMessages.CreateTransaction createTransaction = - (ShardTransactionMessages.CreateTransaction) message; - return new CreateTransaction(createTransaction.getTransactionId(), - createTransaction.getTransactionType(), createTransaction.getTransactionChainId(), - (short)createTransaction.getMessageVersion()); - } + Preconditions.checkArgument(message instanceof CreateTransaction); + return (CreateTransaction)message; } public static boolean isSerializedType(Object message) { - return message instanceof CreateTransaction || message instanceof ShardTransactionMessages.CreateTransaction; + return message instanceof CreateTransaction; } } 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 73b33d7fe2..43ce2ec19b 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 @@ -8,10 +8,10 @@ package org.opendaylight.controller.cluster.datastore.messages; +import com.google.common.base.Preconditions; import java.io.IOException; import java.io.ObjectInput; import java.io.ObjectOutput; -import org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages; public class CreateTransactionReply extends VersionedExternalizableMessage { private static final long serialVersionUID = 1L; @@ -50,13 +50,6 @@ public class CreateTransactionReply extends VersionedExternalizableMessage { out.writeUTF(transactionPath); } - @Deprecated - @Override - protected Object newLegacySerializedInstance() { - return ShardTransactionMessages.CreateTransactionReply.newBuilder().setTransactionActorPath(transactionPath) - .setTransactionId(transactionId).setMessageVersion(getVersion()).build(); - } - @Override public String toString() { StringBuilder builder = new StringBuilder(); @@ -66,18 +59,11 @@ public class CreateTransactionReply extends VersionedExternalizableMessage { } public static CreateTransactionReply fromSerializable(Object serializable) { - if(serializable instanceof CreateTransactionReply) { - return (CreateTransactionReply)serializable; - } else { - ShardTransactionMessages.CreateTransactionReply o = - (ShardTransactionMessages.CreateTransactionReply) serializable; - return new CreateTransactionReply(o.getTransactionActorPath(), o.getTransactionId(), - (short)o.getMessageVersion()); - } + Preconditions.checkNotNull(serializable instanceof CreateTransactionReply); + return (CreateTransactionReply)serializable; } public static boolean isSerializedType(Object message) { - return message instanceof CreateTransactionReply || - message instanceof ShardTransactionMessages.CreateTransactionReply; + return message instanceof CreateTransactionReply; } } diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/DataExists.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/DataExists.java index 08394622fb..db62547d42 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/DataExists.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/DataExists.java @@ -8,12 +8,10 @@ package org.opendaylight.controller.cluster.datastore.messages; +import com.google.common.base.Preconditions; import com.google.common.util.concurrent.CheckedFuture; import com.google.common.util.concurrent.SettableFuture; -import org.opendaylight.controller.cluster.datastore.DataStoreVersions; -import org.opendaylight.controller.cluster.datastore.util.InstanceIdentifierUtils; import org.opendaylight.controller.md.sal.common.api.data.ReadFailedException; -import org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages; import org.opendaylight.controller.sal.core.spi.data.DOMStoreReadTransaction; import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier; @@ -27,13 +25,6 @@ public class DataExists extends AbstractRead { super(path, version); } - @Deprecated - @Override - protected Object newLegacySerializedInstance() { - return ShardTransactionMessages.DataExists.newBuilder() - .setInstanceIdentifierPathArguments(InstanceIdentifierUtils.toSerializable(getPath())).build(); - } - @Override public CheckedFuture apply(DOMStoreReadTransaction readDelegate) { return readDelegate.exists(getPath()); @@ -54,16 +45,11 @@ public class DataExists extends AbstractRead { } public static DataExists fromSerializable(final Object serializable){ - if(serializable instanceof DataExists) { - return (DataExists)serializable; - } else { - ShardTransactionMessages.DataExists o = (ShardTransactionMessages.DataExists) serializable; - return new DataExists(InstanceIdentifierUtils.fromSerializable(o.getInstanceIdentifierPathArguments()), - DataStoreVersions.LITHIUM_VERSION); - } + Preconditions.checkArgument(serializable instanceof DataExists); + return (DataExists)serializable; } public static boolean isSerializedType(Object message) { - return message instanceof DataExists || message instanceof ShardTransactionMessages.DataExists; + return message instanceof DataExists; } } diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/DataExistsReply.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/DataExistsReply.java index b24b51b5de..a57df0ecda 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/DataExistsReply.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/DataExistsReply.java @@ -8,22 +8,14 @@ package org.opendaylight.controller.cluster.datastore.messages; +import com.google.common.base.Preconditions; 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 DataExistsReply extends VersionedExternalizableMessage { private static final long serialVersionUID = 1L; - @Deprecated - private static final ShardTransactionMessages.DataExistsReply SERIALIZABLE_TRUE = - ShardTransactionMessages.DataExistsReply.newBuilder().setExists(true).build(); - @Deprecated - private static final ShardTransactionMessages.DataExistsReply SERIALIZABLE_FALSE = - ShardTransactionMessages.DataExistsReply.newBuilder().setExists(false).build(); - private boolean exists; public DataExistsReply() { @@ -50,22 +42,12 @@ public class DataExistsReply extends VersionedExternalizableMessage { out.writeBoolean(exists); } - @Deprecated - @Override - protected Object newLegacySerializedInstance() { - return exists ? SERIALIZABLE_TRUE : SERIALIZABLE_FALSE; - } - public static DataExistsReply fromSerializable(final Object serializable) { - if(serializable instanceof DataExistsReply) { - return (DataExistsReply)serializable; - } else { - ShardTransactionMessages.DataExistsReply o = (ShardTransactionMessages.DataExistsReply) serializable; - return new DataExistsReply(o.getExists(), DataStoreVersions.LITHIUM_VERSION); - } + Preconditions.checkArgument(serializable instanceof DataExistsReply); + return (DataExistsReply)serializable; } public static boolean isSerializedType(Object message) { - return message instanceof DataExistsReply || message instanceof ShardTransactionMessages.DataExistsReply; + return message instanceof DataExistsReply; } } diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/ReadData.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/ReadData.java index 6a01f281aa..a9d1311d61 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/ReadData.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/ReadData.java @@ -9,12 +9,10 @@ package org.opendaylight.controller.cluster.datastore.messages; import com.google.common.base.Optional; +import com.google.common.base.Preconditions; import com.google.common.util.concurrent.CheckedFuture; import com.google.common.util.concurrent.SettableFuture; -import org.opendaylight.controller.cluster.datastore.DataStoreVersions; -import org.opendaylight.controller.cluster.datastore.util.InstanceIdentifierUtils; import org.opendaylight.controller.md.sal.common.api.data.ReadFailedException; -import org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages; import org.opendaylight.controller.sal.core.spi.data.DOMStoreReadTransaction; import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier; import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode; @@ -29,13 +27,6 @@ public class ReadData extends AbstractRead>> { super(path, version); } - @Deprecated - @Override - protected Object newLegacySerializedInstance() { - return ShardTransactionMessages.ReadData.newBuilder() - .setInstanceIdentifierPathArguments(InstanceIdentifierUtils.toSerializable(getPath())).build(); - } - @Override public CheckedFuture>, ReadFailedException> apply(DOMStoreReadTransaction readDelegate) { return readDelegate.read(getPath()); @@ -57,16 +48,11 @@ public class ReadData extends AbstractRead>> { } public static ReadData fromSerializable(final Object serializable) { - if(serializable instanceof ReadData) { - return (ReadData)serializable; - } else { - ShardTransactionMessages.ReadData o = (ShardTransactionMessages.ReadData)serializable; - return new ReadData(InstanceIdentifierUtils.fromSerializable(o.getInstanceIdentifierPathArguments()), - DataStoreVersions.LITHIUM_VERSION); - } + Preconditions.checkArgument(serializable instanceof ReadData); + return (ReadData)serializable; } public static boolean isSerializedType(Object message) { - return message instanceof ReadData || message instanceof ShardTransactionMessages.ReadData; + return message instanceof ReadData; } } diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/ReadDataReply.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/ReadDataReply.java index 747ec99a71..fad6abb5c1 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/ReadDataReply.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/ReadDataReply.java @@ -43,12 +43,6 @@ public class ReadDataReply extends VersionedExternalizableMessage { SerializationUtils.serializeNormalizedNode(normalizedNode, out); } - @Override - protected Object newLegacySerializedInstance() { - // no legacy serialized type for this class; return self - return this; - } - public static ReadDataReply fromSerializable(Object serializable) { return (ReadDataReply) serializable; } 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 475ef3a363..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 @@ -46,12 +46,6 @@ public class ReadyTransactionReply extends VersionedExternalizableMessage { out.writeUTF(cohortPath); } - @Override - protected Object newLegacySerializedInstance() { - // no legacy serialized type for this class; return self - return this; - } - public static ReadyTransactionReply fromSerializable(Object serializable) { return (ReadyTransactionReply)serializable; } diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/VersionedExternalizableMessage.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/VersionedExternalizableMessage.java index 60f51ddf5e..51a9079d20 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/VersionedExternalizableMessage.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/VersionedExternalizableMessage.java @@ -44,15 +44,13 @@ public abstract class VersionedExternalizableMessage implements Externalizable, out.writeShort(version); } - /** - * @deprecated Pre-Boron compatibility. - */ - @Deprecated - protected abstract Object newLegacySerializedInstance(); - @Override public final Object toSerializable() { - return getVersion() >= DataStoreVersions.BORON_VERSION ? this : newLegacySerializedInstance(); + if (getVersion() < DataStoreVersions.BORON_VERSION) { + throw new UnsupportedOperationException("Versions prior to " + DataStoreVersions.BORON_VERSION + " are not supported"); + } + + return this; } @Override diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/modification/MutableCompositeModification.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/modification/MutableCompositeModification.java index d7e89597e2..0c9a73a0d0 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/modification/MutableCompositeModification.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/modification/MutableCompositeModification.java @@ -8,6 +8,7 @@ package org.opendaylight.controller.cluster.datastore.modification; +import com.google.common.base.Preconditions; import java.io.IOException; import java.io.ObjectInput; import java.io.ObjectOutput; @@ -18,7 +19,6 @@ import org.opendaylight.controller.cluster.datastore.messages.VersionedExternali import org.opendaylight.controller.cluster.datastore.node.utils.stream.NormalizedNodeInputOutput; import org.opendaylight.controller.cluster.datastore.node.utils.stream.NormalizedNodeInputStreamReader; import org.opendaylight.controller.cluster.datastore.utils.SerializationUtils; -import org.opendaylight.controller.protobuff.messages.persistent.PersistentMessages; import org.opendaylight.controller.sal.core.spi.data.DOMStoreWriteTransaction; import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeModification; @@ -125,48 +125,8 @@ public class MutableCompositeModification extends VersionedExternalizableMessage } } - @Override - @Deprecated - protected Object newLegacySerializedInstance() { - if(getVersion() >= DataStoreVersions.LITHIUM_VERSION) { - return this; - } else { - PersistentMessages.CompositeModification.Builder builder = - PersistentMessages.CompositeModification.newBuilder(); - - builder.setTimeStamp(System.nanoTime()); - - for (Modification m : modifications) { - builder.addModification((PersistentMessages.Modification) m.toSerializable()); - } - - return builder.build(); - } - } - public static MutableCompositeModification fromSerializable(Object serializable) { - if(serializable instanceof MutableCompositeModification) { - return (MutableCompositeModification)serializable; - } else { - return fromLegacySerializable(serializable); - } - } - - @Deprecated - private static MutableCompositeModification fromLegacySerializable(Object serializable) { - PersistentMessages.CompositeModification o = (PersistentMessages.CompositeModification) serializable; - MutableCompositeModification compositeModification = new MutableCompositeModification(); - - for(PersistentMessages.Modification m : o.getModificationList()){ - if(m.getType().equals(DeleteModification.class.toString())){ - compositeModification.addModification(DeleteModification.fromSerializable(m)); - } else if(m.getType().equals(WriteModification.class.toString())){ - compositeModification.addModification(WriteModification.fromSerializable(m)); - } else if(m.getType().equals(MergeModification.class.toString())){ - compositeModification.addModification(MergeModification.fromSerializable(m)); - } - } - - return compositeModification; + Preconditions.checkArgument(serializable instanceof MutableCompositeModification); + return (MutableCompositeModification)serializable; } } diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardTransactionTest.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardTransactionTest.java index ad5a7a4535..a02220d7b5 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardTransactionTest.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardTransactionTest.java @@ -45,7 +45,6 @@ import org.opendaylight.controller.cluster.datastore.modification.WriteModificat import org.opendaylight.controller.cluster.datastore.utils.SerializationUtils; import org.opendaylight.controller.cluster.raft.base.messages.CaptureSnapshotReply; import org.opendaylight.controller.md.cluster.datastore.model.TestModel; -import org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages; import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier; import org.opendaylight.yangtools.yang.data.api.schema.ContainerNode; import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode; @@ -442,36 +441,6 @@ public class ShardTransactionTest extends AbstractActorTest { expectMsgClass(duration("3 seconds"), Terminated.class); }}; } - - @Test - public void testOnReceivePreBoronReadData() throws Exception { - new JavaTestKit(getSystem()) {{ - ActorRef transaction = newTransactionActor(RO, readOnlyTransaction(), createShard(), - "testOnReceivePreBoronReadData"); - - transaction.tell(new ReadData(YangInstanceIdentifier.EMPTY, DataStoreVersions.LITHIUM_VERSION). - toSerializable(), getRef()); - - Object replySerialized = expectMsgClass(duration("5 seconds"), ReadDataReply.class); - assertNotNull(ReadDataReply.fromSerializable(replySerialized).getNormalizedNode()); - }}; - } - - @Test - public void testOnReceivePreBoronDataExists() throws Exception { - new JavaTestKit(getSystem()) {{ - ActorRef transaction = newTransactionActor(RO, readOnlyTransaction(), createShard(), - "testOnReceivePreBoronDataExists"); - - transaction.tell(new DataExists(YangInstanceIdentifier.EMPTY, DataStoreVersions.LITHIUM_VERSION). - toSerializable(), getRef()); - - Object replySerialized = expectMsgClass(duration("5 seconds"), - ShardTransactionMessages.DataExistsReply.class); - assertTrue(DataExistsReply.fromSerializable(replySerialized).exists()); - }}; - } - public static class TestException extends RuntimeException { private static final long serialVersionUID = 1L; } diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ThreePhaseCommitCohortProxyTest.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ThreePhaseCommitCohortProxyTest.java index 3014f7e157..5a87be3d32 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ThreePhaseCommitCohortProxyTest.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ThreePhaseCommitCohortProxyTest.java @@ -48,7 +48,6 @@ import org.opendaylight.controller.cluster.datastore.utils.MockConfiguration; import org.opendaylight.controller.cluster.datastore.utils.PrimaryShardInfoFutureCache; import org.opendaylight.controller.cluster.raft.TestActorFactory; import org.opendaylight.controller.cluster.raft.utils.DoNothingActor; -import org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages; public class ThreePhaseCommitCohortProxyTest extends AbstractActorTest { @@ -258,23 +257,6 @@ public class ThreePhaseCommitCohortProxyTest extends AbstractActorTest { verifyCohortActors(); } - @Test - public void testBackwardsCompatibilityWithPreBoron() throws Exception { - List cohorts = Arrays.asList( - newCohortInfo(new CohortActor.Builder("txn-1"). - expectCanCommit(ThreePhaseCommitCohortMessages.CanCommitTransaction.class, - CanCommitTransactionReply.yes(DataStoreVersions.LITHIUM_VERSION)). - expectCommit(ThreePhaseCommitCohortMessages.CommitTransaction.class, - CommitTransactionReply.instance(DataStoreVersions.LITHIUM_VERSION)), - DataStoreVersions.LITHIUM_VERSION)); - ThreePhaseCommitCohortProxy proxy = new ThreePhaseCommitCohortProxy(actorContext, cohorts, "txn-1"); - - verifyCanCommit(proxy.canCommit(), true); - verifySuccessfulFuture(proxy.preCommit()); - verifySuccessfulFuture(proxy.commit()); - verifyCohortActors(); - } - private void propagateExecutionExceptionCause(ListenableFuture future) throws Throwable { try { diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/compat/PreBoronShardTest.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/compat/PreBoronShardTest.java deleted file mode 100644 index 4499043b14..0000000000 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/compat/PreBoronShardTest.java +++ /dev/null @@ -1,129 +0,0 @@ -/* - * Copyright (c) 2016 Brocade Communications Systems, Inc. and others. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v10.html - */ -package org.opendaylight.controller.cluster.datastore.compat; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; -import akka.actor.ActorRef; -import akka.dispatch.Dispatchers; -import akka.testkit.TestActorRef; -import org.junit.Test; -import org.opendaylight.controller.cluster.datastore.AbstractShardTest; -import org.opendaylight.controller.cluster.datastore.DataStoreVersions; -import org.opendaylight.controller.cluster.datastore.Shard; -import org.opendaylight.controller.cluster.datastore.ShardTestKit; -import org.opendaylight.controller.cluster.datastore.TransactionType; -import org.opendaylight.controller.cluster.datastore.messages.BatchedModifications; -import org.opendaylight.controller.cluster.datastore.messages.CanCommitTransaction; -import org.opendaylight.controller.cluster.datastore.messages.CanCommitTransactionReply; -import org.opendaylight.controller.cluster.datastore.messages.CommitTransaction; -import org.opendaylight.controller.cluster.datastore.messages.CreateTransaction; -import org.opendaylight.controller.cluster.datastore.messages.CreateTransactionReply; -import org.opendaylight.controller.cluster.datastore.messages.ReadyTransactionReply; -import org.opendaylight.controller.cluster.datastore.messages.UpdateSchemaContext; -import org.opendaylight.controller.cluster.datastore.modification.WriteModification; -import org.opendaylight.controller.md.cluster.datastore.model.TestModel; -import org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages; -import org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages; -import org.opendaylight.yangtools.yang.data.impl.schema.ImmutableNodes; - -/** - * Shard unit tests for backwards compatibility with pre-Boron versions. - * - * @author Thomas Pantelis - */ -public class PreBoronShardTest extends AbstractShardTest { - - @Test - public void testCreateTransaction(){ - new ShardTestKit(getSystem()) {{ - final ActorRef shard = actorFactory.createActor(newShardProps(), "testCreateTransaction"); - - waitUntilLeader(shard); - - shard.tell(new UpdateSchemaContext(TestModel.createTestContext()), getRef()); - - shard.tell(new CreateTransaction("txn-1", TransactionType.READ_ONLY.ordinal(), null, - DataStoreVersions.LITHIUM_VERSION).toSerializable(), getRef()); - - ShardTransactionMessages.CreateTransactionReply reply = - expectMsgClass(ShardTransactionMessages.CreateTransactionReply.class); - - final String path = CreateTransactionReply.fromSerializable(reply).getTransactionPath().toString(); - assertTrue("Unexpected transaction path " + path, - path.contains("akka://test/user/testCreateTransaction/shard-txn-1")); - }}; - } - - @Test - public void testBatchedModificationsWithCommitOnReady() throws Throwable { - new ShardTestKit(getSystem()) {{ - final TestActorRef shard = actorFactory.createTestActor( - newShardProps().withDispatcher(Dispatchers.DefaultDispatcherId()), - "testBatchedModificationsWithCommitOnReady"); - - waitUntilLeader(shard); - - final String transactionID = "tx"; - - BatchedModifications batched = new BatchedModifications(transactionID, - DataStoreVersions.LITHIUM_VERSION, ""); - batched.addModification(new WriteModification(TestModel.TEST_PATH, - ImmutableNodes.containerNode(TestModel.TEST_QNAME))); - batched.setReady(true); - batched.setDoCommitOnReady(true); - batched.setTotalMessagesSent(1); - - shard.tell(batched, getRef()); - expectMsgClass(ThreePhaseCommitCohortMessages.CommitTransactionReply.class); - }}; - } - - @Test - public void testImmediateCommitWithForwardedReadyTransaction() throws Throwable { - new ShardTestKit(getSystem()) {{ - final TestActorRef shard = actorFactory.createTestActor( - newShardProps().withDispatcher(Dispatchers.DefaultDispatcherId()), - "testImmediateCommitWithForwardedReadyTransaction"); - - waitUntilLeader(shard); - - final String transactionID = "tx"; - - shard.tell(prepareForwardedReadyTransaction(mockShardDataTreeCohort(), transactionID, - DataStoreVersions.LITHIUM_VERSION, true), getRef()); - - expectMsgClass(ThreePhaseCommitCohortMessages.CommitTransactionReply.class); - }}; - } - - @Test - public void testThreePhaseCommitOnForwardedReadyTransaction() throws Throwable { - new ShardTestKit(getSystem()) {{ - final TestActorRef shard = actorFactory.createTestActor( - newShardProps().withDispatcher(Dispatchers.DefaultDispatcherId()), - "testThreePhaseCommitOnForwardedReadyTransaction"); - - waitUntilLeader(shard); - - final String transactionID = "tx"; - - shard.tell(prepareForwardedReadyTransaction(mockShardDataTreeCohort(), transactionID, - DataStoreVersions.LITHIUM_VERSION, false), getRef()); - expectMsgClass(ReadyTransactionReply.class); - - shard.tell(new CanCommitTransaction(transactionID, DataStoreVersions.LITHIUM_VERSION).toSerializable(), getRef()); - CanCommitTransactionReply canCommitReply = CanCommitTransactionReply.fromSerializable( - expectMsgClass(ThreePhaseCommitCohortMessages.CanCommitTransactionReply.class)); - assertEquals("Can commit", true, canCommitReply.getCanCommit()); - - shard.tell(new CommitTransaction(transactionID, DataStoreVersions.LITHIUM_VERSION).toSerializable(), getRef()); - expectMsgClass(ThreePhaseCommitCohortMessages.CommitTransactionReply.class); - }}; - } -} diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/compat/PreBoronTransactionProxyTest.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/compat/PreBoronTransactionProxyTest.java deleted file mode 100644 index f4c777ee61..0000000000 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/compat/PreBoronTransactionProxyTest.java +++ /dev/null @@ -1,166 +0,0 @@ -/* - * Copyright (c) 2016 Brocade Communications Systems, Inc. and others. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v10.html - */ -package org.opendaylight.controller.cluster.datastore.compat; - -import static org.junit.Assert.assertEquals; -import static org.mockito.Matchers.any; -import static org.mockito.Matchers.argThat; -import static org.mockito.Matchers.eq; -import static org.mockito.Matchers.isA; -import static org.mockito.Mockito.doReturn; -import static org.mockito.Mockito.verify; -import static org.opendaylight.controller.cluster.datastore.TransactionType.READ_WRITE; -import akka.actor.ActorRef; -import akka.actor.ActorSystem; -import akka.actor.Props; -import akka.dispatch.Futures; -import akka.util.Timeout; -import com.google.common.base.Optional; -import java.util.concurrent.TimeUnit; -import org.junit.Test; -import org.mockito.ArgumentMatcher; -import org.opendaylight.controller.cluster.datastore.AbstractTransactionProxyTest; -import org.opendaylight.controller.cluster.datastore.DataStoreVersions; -import org.opendaylight.controller.cluster.datastore.TransactionProxy; -import org.opendaylight.controller.cluster.datastore.TransactionType; -import org.opendaylight.controller.cluster.datastore.messages.CreateTransaction; -import org.opendaylight.controller.cluster.datastore.messages.DataExists; -import org.opendaylight.controller.cluster.datastore.messages.ReadData; -import org.opendaylight.controller.cluster.datastore.shardstrategy.DefaultShardStrategy; -import org.opendaylight.controller.cluster.raft.utils.DoNothingActor; -import org.opendaylight.controller.md.cluster.datastore.model.TestModel; -import org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages; -import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier; -import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode; -import org.opendaylight.yangtools.yang.data.impl.schema.ImmutableNodes; - -/** - * TransactionProxy unit tests for backwards compatibility with pre-Boron versions. - * - * @author Thomas Pantelis - */ -@SuppressWarnings("resource") -public class PreBoronTransactionProxyTest extends AbstractTransactionProxyTest { - - private CreateTransaction eqLegacyCreateTransaction(final TransactionType type) { - ArgumentMatcher matcher = new ArgumentMatcher() { - @Override - public boolean matches(Object argument) { - if(ShardTransactionMessages.CreateTransaction.class.equals(argument.getClass())) { - CreateTransaction obj = CreateTransaction.fromSerializable(argument); - return obj.getTransactionId().startsWith(memberName + ':') && - obj.getTransactionType() == type.ordinal(); - } - - return false; - } - }; - - return argThat(matcher); - } - - private static ShardTransactionMessages.CreateTransactionReply legacyCreateTransactionReply(ActorRef actorRef, - int transactionVersion){ - return ShardTransactionMessages.CreateTransactionReply.newBuilder() - .setTransactionActorPath(actorRef.path().toString()) - .setTransactionId("txn-1") - .setMessageVersion(transactionVersion) - .build(); - } - - private static ReadData eqLegacySerializedReadData(final YangInstanceIdentifier path) { - ArgumentMatcher matcher = new ArgumentMatcher() { - @Override - public boolean matches(Object argument) { - return ShardTransactionMessages.ReadData.class.equals(argument.getClass()) && - ReadData.fromSerializable(argument).getPath().equals(path); - } - }; - - return argThat(matcher); - } - - private static DataExists eqLegacySerializedDataExists() { - ArgumentMatcher matcher = new ArgumentMatcher() { - @Override - public boolean matches(Object argument) { - return ShardTransactionMessages.DataExists.class.equals(argument.getClass()) && - DataExists.fromSerializable(argument).getPath().equals(TestModel.TEST_PATH); - } - }; - - return argThat(matcher); - } - - private ActorRef setupPreBoronActorContextWithInitialCreateTransaction(ActorSystem actorSystem, - TransactionType type) { - ActorRef shardActorRef = setupActorContextWithoutInitialCreateTransaction(actorSystem, - DefaultShardStrategy.DEFAULT_SHARD, DataStoreVersions.LITHIUM_VERSION); - - ActorRef txActorRef; - if(type == TransactionType.WRITE_ONLY) { - txActorRef = shardActorRef; - } else { - txActorRef = actorSystem.actorOf(Props.create(DoNothingActor.class)); - doReturn(actorSystem.actorSelection(txActorRef.path())). - when(mockActorContext).actorSelection(txActorRef.path().toString()); - - doReturn(Futures.successful(legacyCreateTransactionReply(txActorRef, DataStoreVersions.LITHIUM_VERSION))) - .when(mockActorContext).executeOperationAsync(eq(actorSystem.actorSelection(shardActorRef.path())), - eqLegacyCreateTransaction(type), any(Timeout.class)); - } - - return txActorRef; - } - - @Test - public void testClose() { - ActorRef actorRef = setupPreBoronActorContextWithInitialCreateTransaction(getSystem(), READ_WRITE); - - expectBatchedModifications(actorRef, 1); - - TransactionProxy transactionProxy = new TransactionProxy(mockComponentFactory, READ_WRITE); - - transactionProxy.write(TestModel.TEST_PATH, ImmutableNodes.containerNode(TestModel.TEST_QNAME)); - - transactionProxy.close(); - - verify(mockActorContext).sendOperationAsync( - eq(actorSelection(actorRef)), isA(ShardTransactionMessages.CloseTransaction.class)); - } - - @Test - public void testRead() throws Exception{ - ActorRef actorRef = setupPreBoronActorContextWithInitialCreateTransaction(getSystem(), READ_WRITE); - - NormalizedNode expectedNode = ImmutableNodes.containerNode(TestModel.TEST_QNAME); - doReturn(readDataReply(expectedNode)).when(mockActorContext).executeOperationAsync( - eq(actorSelection(actorRef)), eqLegacySerializedReadData(TestModel.TEST_PATH), any(Timeout.class)); - - TransactionProxy transactionProxy = new TransactionProxy(mockComponentFactory, READ_WRITE); - - Optional> readOptional = transactionProxy.read( - TestModel.TEST_PATH).get(5, TimeUnit.SECONDS); - - assertEquals("NormalizedNode isPresent", true, readOptional.isPresent()); - assertEquals("Response NormalizedNode", expectedNode, readOptional.get()); - } - - @Test - public void testExists() throws Exception{ - ActorRef actorRef = setupPreBoronActorContextWithInitialCreateTransaction(getSystem(), READ_WRITE); - - doReturn(dataExistsReply(true)).when(mockActorContext).executeOperationAsync( - eq(actorSelection(actorRef)), eqLegacySerializedDataExists(), any(Timeout.class)); - - TransactionProxy transactionProxy = new TransactionProxy(mockComponentFactory, READ_WRITE); - - Boolean exists = transactionProxy.exists(TestModel.TEST_PATH).checkedGet(5, TimeUnit.SECONDS); - assertEquals("Exists response", true, exists); - } -} diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/messages/AbortTransactionReplyTest.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/messages/AbortTransactionReplyTest.java index bbc4da52a7..36c2255466 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/messages/AbortTransactionReplyTest.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/messages/AbortTransactionReplyTest.java @@ -12,7 +12,6 @@ import java.io.Serializable; import org.apache.commons.lang.SerializationUtils; import org.junit.Test; import org.opendaylight.controller.cluster.datastore.DataStoreVersions; -import org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages; /** * Unit tests for AbortTransactionReply. @@ -32,19 +31,8 @@ public class AbortTransactionReplyTest { assertEquals("getVersion", DataStoreVersions.CURRENT_VERSION, actual.getVersion()); } - @Test - public void testSerializationWithPreBoronVersion() { - AbortTransactionReply expected = AbortTransactionReply.instance(DataStoreVersions.LITHIUM_VERSION); - - Object serialized = expected.toSerializable(); - assertEquals("Serialized type", ThreePhaseCommitCohortMessages.AbortTransactionReply.class, serialized.getClass()); - } - @Test public void testIsSerializedType() { - assertEquals("isSerializedType", true, AbortTransactionReply.isSerializedType( - ThreePhaseCommitCohortMessages.AbortTransactionReply.newBuilder().build())); - assertEquals("isSerializedType", true, AbortTransactionReply.isSerializedType(new AbortTransactionReply())); assertEquals("isSerializedType", false, AbortTransactionReply.isSerializedType(new Object())); } diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/messages/AbortTransactionTest.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/messages/AbortTransactionTest.java index 78c26861e9..92fa6d04ae 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/messages/AbortTransactionTest.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/messages/AbortTransactionTest.java @@ -12,7 +12,6 @@ import java.io.Serializable; import org.apache.commons.lang.SerializationUtils; import org.junit.Test; import org.opendaylight.controller.cluster.datastore.DataStoreVersions; -import org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages; /** * Unit tests for AbortTransaction. @@ -34,24 +33,8 @@ public class AbortTransactionTest { assertEquals("getVersion", DataStoreVersions.CURRENT_VERSION, actual.getVersion()); } - @Test - public void testSerializationWithPreBoronVersion() { - AbortTransaction expected = new AbortTransaction("txId", DataStoreVersions.LITHIUM_VERSION); - - Object serialized = expected.toSerializable(); - assertEquals("Serialized type", ThreePhaseCommitCohortMessages.AbortTransaction.class, serialized.getClass()); - - AbortTransaction actual = AbortTransaction.fromSerializable( - SerializationUtils.clone((Serializable) serialized)); - assertEquals("getTransactionID", expected.getTransactionID(), actual.getTransactionID()); - assertEquals("getVersion", DataStoreVersions.LITHIUM_VERSION, actual.getVersion()); - } - @Test public void testIsSerializedType() { - assertEquals("isSerializedType", true, AbortTransaction.isSerializedType( - ThreePhaseCommitCohortMessages.AbortTransaction.newBuilder().setTransactionId("").build())); - assertEquals("isSerializedType", true, AbortTransaction.isSerializedType(new AbortTransaction())); assertEquals("isSerializedType", false, AbortTransaction.isSerializedType(new Object())); } diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/messages/CanCommitTransactionReplyTest.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/messages/CanCommitTransactionReplyTest.java index a85f5fbbd8..628a661ce4 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/messages/CanCommitTransactionReplyTest.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/messages/CanCommitTransactionReplyTest.java @@ -12,7 +12,6 @@ import java.io.Serializable; import org.apache.commons.lang.SerializationUtils; import org.junit.Test; import org.opendaylight.controller.cluster.datastore.DataStoreVersions; -import org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages; /** * Unit tests for CanCommitTransactionReply. @@ -39,19 +38,8 @@ public class CanCommitTransactionReplyTest { assertEquals("getVersion", DataStoreVersions.CURRENT_VERSION, actual.getVersion()); } - @Test - public void testSerializationWithPreBoronVersion() { - testSerialization(CanCommitTransactionReply.yes(DataStoreVersions.LITHIUM_VERSION), - ThreePhaseCommitCohortMessages.CanCommitTransactionReply.class); - testSerialization(CanCommitTransactionReply.no(DataStoreVersions.LITHIUM_VERSION), - ThreePhaseCommitCohortMessages.CanCommitTransactionReply.class); - } - @Test public void testIsSerializedType() { - assertEquals("isSerializedType", true, CanCommitTransactionReply.isSerializedType( - ThreePhaseCommitCohortMessages.CanCommitTransactionReply.newBuilder().setCanCommit(true).build())); - assertEquals("isSerializedType", true, CanCommitTransactionReply.isSerializedType( new CanCommitTransactionReply())); assertEquals("isSerializedType", false, CanCommitTransactionReply.isSerializedType(new Object())); diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/messages/CanCommitTransactionTest.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/messages/CanCommitTransactionTest.java index 18da82176b..1ee51b69d6 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/messages/CanCommitTransactionTest.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/messages/CanCommitTransactionTest.java @@ -12,7 +12,6 @@ import java.io.Serializable; import org.apache.commons.lang.SerializationUtils; import org.junit.Test; import org.opendaylight.controller.cluster.datastore.DataStoreVersions; -import org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages; /** * Unit tests for CanCommitTransaction. @@ -34,25 +33,8 @@ public class CanCommitTransactionTest { assertEquals("getVersion", DataStoreVersions.CURRENT_VERSION, actual.getVersion()); } - @Test - public void testSerializationWithPreBoronVersion() { - CanCommitTransaction expected = new CanCommitTransaction("txId", DataStoreVersions.LITHIUM_VERSION); - - Object serialized = expected.toSerializable(); - assertEquals("Serialized type", ThreePhaseCommitCohortMessages.CanCommitTransaction.class, serialized.getClass()); - - CanCommitTransaction actual = CanCommitTransaction.fromSerializable( - SerializationUtils.clone((Serializable) serialized)); - assertEquals("getTransactionID", expected.getTransactionID(), actual.getTransactionID()); - assertEquals("getVersion", DataStoreVersions.LITHIUM_VERSION, actual.getVersion()); - } - @Test public void testIsSerializedType() { - assertEquals("isSerializedType", true, CanCommitTransaction.isSerializedType( - ThreePhaseCommitCohortMessages.CanCommitTransaction.newBuilder(). - setTransactionId("").build())); - assertEquals("isSerializedType", true, CanCommitTransaction.isSerializedType(new CanCommitTransaction())); assertEquals("isSerializedType", false, CanCommitTransaction.isSerializedType(new Object())); } diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/messages/CloseTransactionChainTest.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/messages/CloseTransactionChainTest.java index 0e9c5d85d0..c4ff243de3 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/messages/CloseTransactionChainTest.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/messages/CloseTransactionChainTest.java @@ -12,7 +12,6 @@ import java.io.Serializable; import org.apache.commons.lang.SerializationUtils; import org.junit.Test; import org.opendaylight.controller.cluster.datastore.DataStoreVersions; -import org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionChainMessages; /** * Unit tests for CloseTransactionChain. @@ -34,24 +33,8 @@ public class CloseTransactionChainTest { assertEquals("getVersion", DataStoreVersions.CURRENT_VERSION, actual.getVersion()); } - @Test - public void testSerializationWithPreBoronVersion() { - CloseTransactionChain expected = new CloseTransactionChain("txId", DataStoreVersions.LITHIUM_VERSION); - - Object serialized = expected.toSerializable(); - assertEquals("Serialized type", ShardTransactionChainMessages.CloseTransactionChain.class, serialized.getClass()); - - CloseTransactionChain actual = CloseTransactionChain.fromSerializable( - SerializationUtils.clone((Serializable) serialized)); - assertEquals("getTransactionChainId", expected.getTransactionChainId(), actual.getTransactionChainId()); - assertEquals("getVersion", DataStoreVersions.LITHIUM_VERSION, actual.getVersion()); - } - @Test public void testIsSerializedType() { - assertEquals("isSerializedType", true, CloseTransactionChain.isSerializedType( - ShardTransactionChainMessages.CloseTransactionChain.newBuilder().setTransactionChainId("").build())); - assertEquals("isSerializedType", true, CloseTransactionChain.isSerializedType(new CloseTransactionChain())); assertEquals("isSerializedType", false, CloseTransactionChain.isSerializedType(new Object())); } diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/messages/CommitTransactionReplyTest.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/messages/CommitTransactionReplyTest.java index c0b548b211..1707d6d61f 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/messages/CommitTransactionReplyTest.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/messages/CommitTransactionReplyTest.java @@ -12,7 +12,6 @@ import java.io.Serializable; import org.apache.commons.lang.SerializationUtils; import org.junit.Test; import org.opendaylight.controller.cluster.datastore.DataStoreVersions; -import org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages; /** * Unit tests for CommitTransactionReply. @@ -32,19 +31,8 @@ public class CommitTransactionReplyTest { assertEquals("getVersion", DataStoreVersions.CURRENT_VERSION, actual.getVersion()); } - @Test - public void testSerializationWithPreBoronVersion() { - CommitTransactionReply expected = CommitTransactionReply.instance(DataStoreVersions.LITHIUM_VERSION); - - Object serialized = expected.toSerializable(); - assertEquals("Serialized type", ThreePhaseCommitCohortMessages.CommitTransactionReply.class, serialized.getClass()); - } - @Test public void testIsSerializedType() { - assertEquals("isSerializedType", true, CommitTransactionReply.isSerializedType( - ThreePhaseCommitCohortMessages.CommitTransactionReply.newBuilder().build())); - assertEquals("isSerializedType", true, CommitTransactionReply.isSerializedType(new CommitTransactionReply())); assertEquals("isSerializedType", false, CommitTransactionReply.isSerializedType(new Object())); } diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/messages/CommitTransactionTest.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/messages/CommitTransactionTest.java index 0f46c585db..43311a393e 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/messages/CommitTransactionTest.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/messages/CommitTransactionTest.java @@ -12,7 +12,6 @@ import java.io.Serializable; import org.apache.commons.lang.SerializationUtils; import org.junit.Test; import org.opendaylight.controller.cluster.datastore.DataStoreVersions; -import org.opendaylight.controller.protobuff.messages.cohort3pc.ThreePhaseCommitCohortMessages; /** * Unit tests for CommitTransaction. @@ -34,24 +33,8 @@ public class CommitTransactionTest { assertEquals("getVersion", DataStoreVersions.CURRENT_VERSION, actual.getVersion()); } - @Test - public void testSerializationWithPreBoronVersion() { - CommitTransaction expected = new CommitTransaction("txId", DataStoreVersions.LITHIUM_VERSION); - - Object serialized = expected.toSerializable(); - assertEquals("Serialized type", ThreePhaseCommitCohortMessages.CommitTransaction.class, serialized.getClass()); - - CommitTransaction actual = CommitTransaction.fromSerializable( - SerializationUtils.clone((Serializable) serialized)); - assertEquals("getTransactionID", expected.getTransactionID(), actual.getTransactionID()); - assertEquals("getVersion", DataStoreVersions.LITHIUM_VERSION, actual.getVersion()); - } - @Test public void testIsSerializedType() { - assertEquals("isSerializedType", true, CommitTransaction.isSerializedType( - ThreePhaseCommitCohortMessages.CommitTransaction.newBuilder().setTransactionId("").build())); - assertEquals("isSerializedType", true, CommitTransaction.isSerializedType(new CommitTransaction())); assertEquals("isSerializedType", false, CommitTransaction.isSerializedType(new Object())); } diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/messages/CreateTransactionReplyTest.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/messages/CreateTransactionReplyTest.java index 19c7f012a4..b8edbd94f4 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/messages/CreateTransactionReplyTest.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/messages/CreateTransactionReplyTest.java @@ -12,7 +12,6 @@ import java.io.Serializable; import org.apache.commons.lang.SerializationUtils; import org.junit.Test; import org.opendaylight.controller.cluster.datastore.DataStoreVersions; -import org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages; /** * Unit tests for CreateTransactionReply. @@ -35,26 +34,8 @@ public class CreateTransactionReplyTest { assertEquals("getVersion", DataStoreVersions.CURRENT_VERSION, actual.getVersion()); } - @Test - public void testSerializationWithPreBoronVersion() { - CreateTransactionReply expected = new CreateTransactionReply("txPath", "txId", DataStoreVersions.LITHIUM_VERSION); - - Object serialized = expected.toSerializable(); - assertEquals("Serialized type", ShardTransactionMessages.CreateTransactionReply.class, serialized.getClass()); - - CreateTransactionReply actual = CreateTransactionReply.fromSerializable( - SerializationUtils.clone((Serializable) serialized)); - assertEquals("getTransactionId", expected.getTransactionId(), actual.getTransactionId()); - assertEquals("getTransactionPath", expected.getTransactionPath(), actual.getTransactionPath()); - assertEquals("getVersion", DataStoreVersions.LITHIUM_VERSION, actual.getVersion()); - } - @Test public void testIsSerializedType() { - assertEquals("isSerializedType", true, CreateTransactionReply.isSerializedType( - ShardTransactionMessages.CreateTransactionReply.newBuilder().setTransactionActorPath("") - .setTransactionId("").setMessageVersion(4).build())); - assertEquals("isSerializedType", true, CreateTransactionReply.isSerializedType(new CreateTransactionReply())); assertEquals("isSerializedType", false, CreateTransactionReply.isSerializedType(new Object())); } diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/messages/CreateTransactionTest.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/messages/CreateTransactionTest.java index 771d091ab7..a558b75ce4 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/messages/CreateTransactionTest.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/messages/CreateTransactionTest.java @@ -12,7 +12,6 @@ import java.io.Serializable; import org.apache.commons.lang.SerializationUtils; import org.junit.Test; import org.opendaylight.controller.cluster.datastore.DataStoreVersions; -import org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages; /** * Unit tests for CreateTransaction. @@ -36,21 +35,6 @@ public class CreateTransactionTest { assertEquals("getVersion", DataStoreVersions.CURRENT_VERSION, actual.getVersion()); } - @Test - public void testSerializationWithPreBoronVersion() { - CreateTransaction expected = new CreateTransaction("txId", 2, "chainId", DataStoreVersions.LITHIUM_VERSION); - - Object serialized = expected.toSerializable(); - assertEquals("Serialized type", ShardTransactionMessages.CreateTransaction.class, serialized.getClass()); - - CreateTransaction actual = CreateTransaction.fromSerializable( - SerializationUtils.clone((Serializable) serialized)); - assertEquals("getTransactionId", expected.getTransactionId(), actual.getTransactionId()); - assertEquals("getTransactionType", expected.getTransactionType(), actual.getTransactionType()); - assertEquals("getTransactionChainId", expected.getTransactionChainId(), actual.getTransactionChainId()); - assertEquals("getVersion", DataStoreVersions.LITHIUM_VERSION, actual.getVersion()); - } - @Test public void testSerializationWithNewerVersion() { short newerVersion = DataStoreVersions.CURRENT_VERSION + (short)1; @@ -69,10 +53,6 @@ public class CreateTransactionTest { @Test public void testIsSerializedType() { - assertEquals("isSerializedType", true, CreateTransaction.isSerializedType( - ShardTransactionMessages.CreateTransaction.newBuilder().setTransactionId("") - .setTransactionType(2).setTransactionChainId("").setMessageVersion(4).build())); - assertEquals("isSerializedType", true, CreateTransaction.isSerializedType(new CreateTransaction())); assertEquals("isSerializedType", false, CreateTransaction.isSerializedType(new Object())); } diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/messages/DataExistsReplyTest.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/messages/DataExistsReplyTest.java index a4c903990c..790626d730 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/messages/DataExistsReplyTest.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/messages/DataExistsReplyTest.java @@ -12,7 +12,6 @@ import java.io.Serializable; import org.apache.commons.lang.SerializationUtils; import org.junit.Test; import org.opendaylight.controller.cluster.datastore.DataStoreVersions; -import org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages; /** * Unit tests for DataExistsReply. @@ -33,23 +32,8 @@ public class DataExistsReplyTest { assertEquals("getVersion", DataStoreVersions.CURRENT_VERSION, actual.getVersion()); } - @Test - public void testSerializationWithPreBoronVersion() { - DataExistsReply expected = new DataExistsReply(true, DataStoreVersions.LITHIUM_VERSION); - - Object serialized = expected.toSerializable(); - assertEquals("Serialized type", ShardTransactionMessages.DataExistsReply.class, serialized.getClass()); - - DataExistsReply actual = DataExistsReply.fromSerializable(SerializationUtils.clone((Serializable) serialized)); - assertEquals("exists", expected.exists(), actual.exists()); - assertEquals("getVersion", DataStoreVersions.LITHIUM_VERSION, actual.getVersion()); - } - @Test public void testIsSerializedType() { - assertEquals("isSerializedType", true, DataExistsReply.isSerializedType( - ShardTransactionMessages.DataExistsReply.newBuilder().setExists(true).build())); - assertEquals("isSerializedType", true, DataExistsReply.isSerializedType(new DataExistsReply())); assertEquals("isSerializedType", false, DataExistsReply.isSerializedType(new Object())); } diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/messages/DataExistsTest.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/messages/DataExistsTest.java index 2c16e812ae..b0c46451fc 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/messages/DataExistsTest.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/messages/DataExistsTest.java @@ -12,9 +12,7 @@ import java.io.Serializable; import org.apache.commons.lang.SerializationUtils; import org.junit.Test; import org.opendaylight.controller.cluster.datastore.DataStoreVersions; -import org.opendaylight.controller.cluster.datastore.util.InstanceIdentifierUtils; import org.opendaylight.controller.md.cluster.datastore.model.TestModel; -import org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages; /** * Unit tests for DataExists. @@ -35,24 +33,8 @@ public class DataExistsTest { assertEquals("getVersion", DataStoreVersions.CURRENT_VERSION, actual.getVersion()); } - @Test - public void testSerializationWithPreBoronVersion() { - DataExists expected = new DataExists(TestModel.TEST_PATH, DataStoreVersions.LITHIUM_VERSION); - - Object serialized = expected.toSerializable(); - assertEquals("Serialized type", ShardTransactionMessages.DataExists.class, serialized.getClass()); - - DataExists actual = DataExists.fromSerializable(SerializationUtils.clone((Serializable) serialized)); - assertEquals("getPath", expected.getPath(), actual.getPath()); - assertEquals("getVersion", DataStoreVersions.LITHIUM_VERSION, actual.getVersion()); - } - @Test public void testIsSerializedType() { - assertEquals("isSerializedType", true, DataExists.isSerializedType( - ShardTransactionMessages.DataExists.newBuilder().setInstanceIdentifierPathArguments( - InstanceIdentifierUtils.toSerializable(TestModel.TEST_PATH)).build())); - assertEquals("isSerializedType", true, DataExists.isSerializedType(new DataExists())); assertEquals("isSerializedType", false, DataExists.isSerializedType(new Object())); } diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/messages/ReadDataTest.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/messages/ReadDataTest.java index 56902186c6..8214e310c3 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/messages/ReadDataTest.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/messages/ReadDataTest.java @@ -12,9 +12,7 @@ import java.io.Serializable; import org.apache.commons.lang.SerializationUtils; import org.junit.Test; import org.opendaylight.controller.cluster.datastore.DataStoreVersions; -import org.opendaylight.controller.cluster.datastore.util.InstanceIdentifierUtils; import org.opendaylight.controller.md.cluster.datastore.model.TestModel; -import org.opendaylight.controller.protobuff.messages.transaction.ShardTransactionMessages; /** * Unit tests for ReadData. @@ -35,24 +33,8 @@ public class ReadDataTest { assertEquals("getVersion", DataStoreVersions.CURRENT_VERSION, actual.getVersion()); } - @Test - public void testSerializationWithPreBoronVersion() { - ReadData expected = new ReadData(TestModel.TEST_PATH, DataStoreVersions.LITHIUM_VERSION); - - Object serialized = expected.toSerializable(); - assertEquals("Serialized type", ShardTransactionMessages.ReadData.class, serialized.getClass()); - - ReadData actual = ReadData.fromSerializable(SerializationUtils.clone((Serializable) serialized)); - assertEquals("getPath", expected.getPath(), actual.getPath()); - assertEquals("getVersion", DataStoreVersions.LITHIUM_VERSION, actual.getVersion()); - } - @Test public void testIsSerializedType() { - assertEquals("isSerializedType", true, ReadData.isSerializedType( - ShardTransactionMessages.ReadData.newBuilder().setInstanceIdentifierPathArguments( - InstanceIdentifierUtils.toSerializable(TestModel.TEST_PATH)).build())); - assertEquals("isSerializedType", true, ReadData.isSerializedType(new ReadData())); assertEquals("isSerializedType", false, ReadData.isSerializedType(new Object())); } -- 2.36.6