From 5db894b0b79b4d111768c3643efa1330f8fbee84 Mon Sep 17 00:00:00 2001 From: Tom Pantelis Date: Sat, 23 Jan 2016 00:05:24 -0500 Subject: [PATCH] Remove unused protobuff messages Removed the following unused protobuff messages: ShardManager.proto MockPayload.proto KeyValueMessages.proto SimpleNormalizedNode.proto Change-Id: I245068fe7c9ead9ea70d9983e73984067c7655da Signed-off-by: Tom Pantelis --- .../cluster/example/messages/KeyValue.java | 16 +- .../cluster/raft/MockRaftActorContext.java | 9 +- .../cluster/example/KeyValueMessages.java | 73 - .../raft/test/MockPayloadMessages.java | 58 - .../common/SimpleNormalizedNodeMessage.java | 696 -------- .../messages/shard/ShardManagerMessages.java | 1513 ----------------- .../src/main/resources/KeyValueMessages.proto | 13 - .../src/main/resources/MockPayload.proto | 10 - .../src/main/resources/ShardManager.proto | 16 - .../main/resources/SimpleNormalizedNode.proto | 10 - .../shard/ShardManagerMessagesTest.java | 61 - 11 files changed, 5 insertions(+), 2470 deletions(-) delete mode 100644 opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/protobuff/messages/cluster/example/KeyValueMessages.java delete mode 100644 opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/protobuff/messages/cluster/raft/test/MockPayloadMessages.java delete mode 100644 opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/protobuff/messages/common/SimpleNormalizedNodeMessage.java delete mode 100644 opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/protobuff/messages/shard/ShardManagerMessages.java delete mode 100644 opendaylight/md-sal/sal-clustering-commons/src/main/resources/KeyValueMessages.proto delete mode 100644 opendaylight/md-sal/sal-clustering-commons/src/main/resources/MockPayload.proto delete mode 100644 opendaylight/md-sal/sal-clustering-commons/src/main/resources/ShardManager.proto delete mode 100644 opendaylight/md-sal/sal-clustering-commons/src/main/resources/SimpleNormalizedNode.proto delete mode 100644 opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/protobuff/messages/shard/ShardManagerMessagesTest.java diff --git a/opendaylight/md-sal/sal-akka-raft-example/src/main/java/org/opendaylight/controller/cluster/example/messages/KeyValue.java b/opendaylight/md-sal/sal-akka-raft-example/src/main/java/org/opendaylight/controller/cluster/example/messages/KeyValue.java index 2eb4189eac..87a77b271b 100644 --- a/opendaylight/md-sal/sal-akka-raft-example/src/main/java/org/opendaylight/controller/cluster/example/messages/KeyValue.java +++ b/opendaylight/md-sal/sal-akka-raft-example/src/main/java/org/opendaylight/controller/cluster/example/messages/KeyValue.java @@ -10,10 +10,8 @@ package org.opendaylight.controller.cluster.example.messages; import com.google.protobuf.GeneratedMessage; import java.io.Serializable; -import java.util.HashMap; import java.util.Map; import org.opendaylight.controller.cluster.raft.protobuff.client.messages.Payload; -import org.opendaylight.controller.protobuff.messages.cluster.example.KeyValueMessages; import org.opendaylight.controller.protobuff.messages.cluster.raft.AppendEntriesMessages; public class KeyValue extends Payload implements Serializable { @@ -54,20 +52,12 @@ public class KeyValue extends Payload implements Serializable { // override this method to return the protobuff related extension fields and their values @Override public Map, String> encode() { - Map, String> map = new HashMap<>(); - map.put(KeyValueMessages.key, getKey()); - map.put(KeyValueMessages.value, getValue()); - return map; + return null; } // override this method to assign the values from protobuff - @Override public Payload decode( - AppendEntriesMessages.AppendEntries.ReplicatedLogEntry.Payload payloadProtoBuff) { - String key = payloadProtoBuff.getExtension(KeyValueMessages.key); - String value = payloadProtoBuff.getExtension(KeyValueMessages.value); - this.setKey(key); - this.setValue(value); - return this; + @Override public Payload decode(AppendEntriesMessages.AppendEntries.ReplicatedLogEntry.Payload payloadProtoBuff) { + return null; } @Override diff --git a/opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/MockRaftActorContext.java b/opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/MockRaftActorContext.java index 7f70796bbd..d42812a5e4 100644 --- a/opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/MockRaftActorContext.java +++ b/opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/MockRaftActorContext.java @@ -21,7 +21,6 @@ import org.opendaylight.controller.cluster.NonPersistentDataProvider; import org.opendaylight.controller.cluster.raft.policy.RaftPolicy; import org.opendaylight.controller.cluster.raft.protobuff.client.messages.Payload; import org.opendaylight.controller.protobuff.messages.cluster.raft.AppendEntriesMessages; -import org.opendaylight.controller.protobuff.messages.cluster.raft.test.MockPayloadMessages; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -184,16 +183,12 @@ public class MockRaftActorContext extends RaftActorContextImpl { } @Override public Map, String> encode() { - Map, String> map = new HashMap<>(); - map.put(MockPayloadMessages.value, value); - return map; + return null; } @Override public Payload decode( AppendEntriesMessages.AppendEntries.ReplicatedLogEntry.Payload payloadProtoBuff) { - String value = payloadProtoBuff.getExtension(MockPayloadMessages.value); - this.value = value; - return this; + return null; } @Override diff --git a/opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/protobuff/messages/cluster/example/KeyValueMessages.java b/opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/protobuff/messages/cluster/example/KeyValueMessages.java deleted file mode 100644 index 5410840741..0000000000 --- a/opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/protobuff/messages/cluster/example/KeyValueMessages.java +++ /dev/null @@ -1,73 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: KeyValueMessages.proto - -package org.opendaylight.controller.protobuff.messages.cluster.example; - -public final class KeyValueMessages { - private KeyValueMessages() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registry.add(org.opendaylight.controller.protobuff.messages.cluster.example.KeyValueMessages.key); - registry.add(org.opendaylight.controller.protobuff.messages.cluster.example.KeyValueMessages.value); - } - public static final int KEY_FIELD_NUMBER = 2; - /** - * extend .org.opendaylight.controller.cluster.raft.AppendEntries.ReplicatedLogEntry.Payload { ... } - */ - public static final - com.google.protobuf.GeneratedMessage.GeneratedExtension< - org.opendaylight.controller.protobuff.messages.cluster.raft.AppendEntriesMessages.AppendEntries.ReplicatedLogEntry.Payload, - java.lang.String> key = com.google.protobuf.GeneratedMessage - .newFileScopedGeneratedExtension( - java.lang.String.class, - null); - public static final int VALUE_FIELD_NUMBER = 3; - /** - * extend .org.opendaylight.controller.cluster.raft.AppendEntries.ReplicatedLogEntry.Payload { ... } - */ - public static final - com.google.protobuf.GeneratedMessage.GeneratedExtension< - org.opendaylight.controller.protobuff.messages.cluster.raft.AppendEntriesMessages.AppendEntries.ReplicatedLogEntry.Payload, - java.lang.String> value = com.google.protobuf.GeneratedMessage - .newFileScopedGeneratedExtension( - java.lang.String.class, - null); - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n\026KeyValueMessages.proto\022(org.opendaylig" + - "ht.controller.cluster.raft\032\033AppendEntrie" + - "sMessages.proto:_\n\003key\022R.org.opendayligh" + - "t.controller.cluster.raft.AppendEntries." + - "ReplicatedLogEntry.Payload\030\002 \001(\t:a\n\005valu" + - "e\022R.org.opendaylight.controller.cluster." + - "raft.AppendEntries.ReplicatedLogEntry.Pa" + - "yload\030\003 \001(\tBT\n>org.opendaylight.controll" + - "er.protobuff.messages.cluster.exampleB\020K" + - "eyValueMessagesH\001" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - key.internalInit(descriptor.getExtensions().get(0)); - value.internalInit(descriptor.getExtensions().get(1)); - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - org.opendaylight.controller.protobuff.messages.cluster.raft.AppendEntriesMessages.getDescriptor(), - }, assigner); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/protobuff/messages/cluster/raft/test/MockPayloadMessages.java b/opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/protobuff/messages/cluster/raft/test/MockPayloadMessages.java deleted file mode 100644 index 76ae4a85aa..0000000000 --- a/opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/protobuff/messages/cluster/raft/test/MockPayloadMessages.java +++ /dev/null @@ -1,58 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: MockPayload.proto - -package org.opendaylight.controller.protobuff.messages.cluster.raft.test; - -public final class MockPayloadMessages { - private MockPayloadMessages() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registry.add(org.opendaylight.controller.protobuff.messages.cluster.raft.test.MockPayloadMessages.value); - } - public static final int VALUE_FIELD_NUMBER = 2; - /** - * extend .org.opendaylight.controller.cluster.raft.AppendEntries.ReplicatedLogEntry.Payload { ... } - */ - public static final - com.google.protobuf.GeneratedMessage.GeneratedExtension< - org.opendaylight.controller.protobuff.messages.cluster.raft.AppendEntriesMessages.AppendEntries.ReplicatedLogEntry.Payload, - java.lang.String> value = com.google.protobuf.GeneratedMessage - .newFileScopedGeneratedExtension( - java.lang.String.class, - null); - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n\021MockPayload.proto\022-org.opendaylight.co" + - "ntroller.cluster.raft.test\032\033AppendEntrie" + - "sMessages.proto:a\n\005value\022R.org.opendayli" + - "ght.controller.cluster.raft.AppendEntrie" + - "s.ReplicatedLogEntry.Payload\030\002 \001(\tBW\n@or" + - "g.opendaylight.controller.protobuff.mess" + - "ages.cluster.raft.testB\023MockPayloadMessa" + - "ges" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - value.internalInit(descriptor.getExtensions().get(0)); - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - org.opendaylight.controller.protobuff.messages.cluster.raft.AppendEntriesMessages.getDescriptor(), - }, assigner); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/protobuff/messages/common/SimpleNormalizedNodeMessage.java b/opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/protobuff/messages/common/SimpleNormalizedNodeMessage.java deleted file mode 100644 index 67ab472d0c..0000000000 --- a/opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/protobuff/messages/common/SimpleNormalizedNodeMessage.java +++ /dev/null @@ -1,696 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: SimpleNormalizedNode.proto - -package org.opendaylight.controller.protobuff.messages.common; - -public final class SimpleNormalizedNodeMessage { - private SimpleNormalizedNodeMessage() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - } - public interface NormalizedNodeXmlOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // required string nodeIdentifier = 1; - /** - * required string nodeIdentifier = 1; - */ - boolean hasNodeIdentifier(); - /** - * required string nodeIdentifier = 1; - */ - java.lang.String getNodeIdentifier(); - /** - * required string nodeIdentifier = 1; - */ - com.google.protobuf.ByteString - getNodeIdentifierBytes(); - - // required string xmlString = 2; - /** - * required string xmlString = 2; - */ - boolean hasXmlString(); - /** - * required string xmlString = 2; - */ - java.lang.String getXmlString(); - /** - * required string xmlString = 2; - */ - com.google.protobuf.ByteString - getXmlStringBytes(); - } - /** - * Protobuf type {@code org.opendaylight.controller.mdsal.NormalizedNodeXml} - */ - public static final class NormalizedNodeXml extends - com.google.protobuf.GeneratedMessage - implements NormalizedNodeXmlOrBuilder { - // Use NormalizedNodeXml.newBuilder() to construct. - private NormalizedNodeXml(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private NormalizedNodeXml(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final NormalizedNodeXml defaultInstance; - public static NormalizedNodeXml getDefaultInstance() { - return defaultInstance; - } - - public NormalizedNodeXml getDefaultInstanceForType() { - return defaultInstance; - } - - private final com.google.protobuf.UnknownFieldSet unknownFields; - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private NormalizedNodeXml( - 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; - nodeIdentifier_ = input.readBytes(); - break; - } - case 18: { - bitField0_ |= 0x00000002; - xmlString_ = 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.common.SimpleNormalizedNodeMessage.internal_static_org_opendaylight_controller_mdsal_NormalizedNodeXml_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.internal_static_org_opendaylight_controller_mdsal_NormalizedNodeXml_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml.class, org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml.Builder.class); - } - - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public NormalizedNodeXml parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new NormalizedNodeXml(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - private int bitField0_; - // required string nodeIdentifier = 1; - public static final int NODEIDENTIFIER_FIELD_NUMBER = 1; - private java.lang.Object nodeIdentifier_; - /** - * required string nodeIdentifier = 1; - */ - public boolean hasNodeIdentifier() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * required string nodeIdentifier = 1; - */ - public java.lang.String getNodeIdentifier() { - java.lang.Object ref = nodeIdentifier_; - 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()) { - nodeIdentifier_ = s; - } - return s; - } - } - /** - * required string nodeIdentifier = 1; - */ - public com.google.protobuf.ByteString - getNodeIdentifierBytes() { - java.lang.Object ref = nodeIdentifier_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - nodeIdentifier_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - // required string xmlString = 2; - public static final int XMLSTRING_FIELD_NUMBER = 2; - private java.lang.Object xmlString_; - /** - * required string xmlString = 2; - */ - public boolean hasXmlString() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * required string xmlString = 2; - */ - public java.lang.String getXmlString() { - java.lang.Object ref = xmlString_; - 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()) { - xmlString_ = s; - } - return s; - } - } - /** - * required string xmlString = 2; - */ - public com.google.protobuf.ByteString - getXmlStringBytes() { - java.lang.Object ref = xmlString_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - xmlString_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private void initFields() { - nodeIdentifier_ = ""; - xmlString_ = ""; - } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - - if (!hasNodeIdentifier()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasXmlString()) { - memoizedIsInitialized = 0; - return false; - } - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, getNodeIdentifierBytes()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBytes(2, getXmlStringBytes()); - } - getUnknownFields().writeTo(output); - } - - private int memoizedSerializedSize = -1; - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, getNodeIdentifierBytes()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, getXmlStringBytes()); - } - 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.common.SimpleNormalizedNodeMessage.NormalizedNodeXml parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml 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.common.SimpleNormalizedNodeMessage.NormalizedNodeXml parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml 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.common.SimpleNormalizedNodeMessage.NormalizedNodeXml parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml 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.common.SimpleNormalizedNodeMessage.NormalizedNodeXml parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml 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.common.SimpleNormalizedNodeMessage.NormalizedNodeXml parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml 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(); } - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml prototype) { - return newBuilder().mergeFrom(prototype); - } - 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.NormalizedNodeXml} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXmlOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.internal_static_org_opendaylight_controller_mdsal_NormalizedNodeXml_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.internal_static_org_opendaylight_controller_mdsal_NormalizedNodeXml_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml.class, org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml.Builder.class); - } - - // Construct using org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml.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(); - } - - public Builder clear() { - super.clear(); - nodeIdentifier_ = ""; - bitField0_ = (bitField0_ & ~0x00000001); - xmlString_ = ""; - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.internal_static_org_opendaylight_controller_mdsal_NormalizedNodeXml_descriptor; - } - - public org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml getDefaultInstanceForType() { - return org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml.getDefaultInstance(); - } - - public org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml build() { - org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml buildPartial() { - org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml result = new org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.nodeIdentifier_ = nodeIdentifier_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.xmlString_ = xmlString_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml) { - return mergeFrom((org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml other) { - if (other == org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml.getDefaultInstance()) return this; - if (other.hasNodeIdentifier()) { - bitField0_ |= 0x00000001; - nodeIdentifier_ = other.nodeIdentifier_; - onChanged(); - } - if (other.hasXmlString()) { - bitField0_ |= 0x00000002; - xmlString_ = other.xmlString_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - return this; - } - - public final boolean isInitialized() { - if (!hasNodeIdentifier()) { - - return false; - } - if (!hasXmlString()) { - - return false; - } - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.opendaylight.controller.protobuff.messages.common.SimpleNormalizedNodeMessage.NormalizedNodeXml) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - // required string nodeIdentifier = 1; - private java.lang.Object nodeIdentifier_ = ""; - /** - * required string nodeIdentifier = 1; - */ - public boolean hasNodeIdentifier() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * required string nodeIdentifier = 1; - */ - public java.lang.String getNodeIdentifier() { - java.lang.Object ref = nodeIdentifier_; - if (!(ref instanceof java.lang.String)) { - java.lang.String s = ((com.google.protobuf.ByteString) ref) - .toStringUtf8(); - nodeIdentifier_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * required string nodeIdentifier = 1; - */ - public com.google.protobuf.ByteString - getNodeIdentifierBytes() { - java.lang.Object ref = nodeIdentifier_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - nodeIdentifier_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * required string nodeIdentifier = 1; - */ - public Builder setNodeIdentifier( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - nodeIdentifier_ = value; - onChanged(); - return this; - } - /** - * required string nodeIdentifier = 1; - */ - public Builder clearNodeIdentifier() { - bitField0_ = (bitField0_ & ~0x00000001); - nodeIdentifier_ = getDefaultInstance().getNodeIdentifier(); - onChanged(); - return this; - } - /** - * required string nodeIdentifier = 1; - */ - public Builder setNodeIdentifierBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - nodeIdentifier_ = value; - onChanged(); - return this; - } - - // required string xmlString = 2; - private java.lang.Object xmlString_ = ""; - /** - * required string xmlString = 2; - */ - public boolean hasXmlString() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * required string xmlString = 2; - */ - public java.lang.String getXmlString() { - java.lang.Object ref = xmlString_; - if (!(ref instanceof java.lang.String)) { - java.lang.String s = ((com.google.protobuf.ByteString) ref) - .toStringUtf8(); - xmlString_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * required string xmlString = 2; - */ - public com.google.protobuf.ByteString - getXmlStringBytes() { - java.lang.Object ref = xmlString_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - xmlString_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * required string xmlString = 2; - */ - public Builder setXmlString( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - xmlString_ = value; - onChanged(); - return this; - } - /** - * required string xmlString = 2; - */ - public Builder clearXmlString() { - bitField0_ = (bitField0_ & ~0x00000002); - xmlString_ = getDefaultInstance().getXmlString(); - onChanged(); - return this; - } - /** - * required string xmlString = 2; - */ - public Builder setXmlStringBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - xmlString_ = value; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:org.opendaylight.controller.mdsal.NormalizedNodeXml) - } - - static { - defaultInstance = new NormalizedNodeXml(true); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:org.opendaylight.controller.mdsal.NormalizedNodeXml) - } - - private static com.google.protobuf.Descriptors.Descriptor - internal_static_org_opendaylight_controller_mdsal_NormalizedNodeXml_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_org_opendaylight_controller_mdsal_NormalizedNodeXml_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\032SimpleNormalizedNode.proto\022!org.openda" + - "ylight.controller.mdsal\">\n\021NormalizedNod" + - "eXml\022\026\n\016nodeIdentifier\030\001 \002(\t\022\021\n\txmlStrin" + - "g\030\002 \002(\tBT\n5org.opendaylight.controller.p" + - "rotobuff.messages.commonB\033SimpleNormaliz" + - "edNodeMessage" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - internal_static_org_opendaylight_controller_mdsal_NormalizedNodeXml_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_org_opendaylight_controller_mdsal_NormalizedNodeXml_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_org_opendaylight_controller_mdsal_NormalizedNodeXml_descriptor, - new java.lang.String[] { "NodeIdentifier", "XmlString", }); - 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/shard/ShardManagerMessages.java b/opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/protobuff/messages/shard/ShardManagerMessages.java deleted file mode 100644 index 2324dfc2a2..0000000000 --- a/opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/protobuff/messages/shard/ShardManagerMessages.java +++ /dev/null @@ -1,1513 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: ShardManager.proto - -package org.opendaylight.controller.protobuff.messages.shard; - -public final class ShardManagerMessages { - private ShardManagerMessages() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - } - public interface FindPrimaryOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // required string shardName = 1; - /** - * required string shardName = 1; - */ - boolean hasShardName(); - /** - * required string shardName = 1; - */ - java.lang.String getShardName(); - /** - * required string shardName = 1; - */ - com.google.protobuf.ByteString - getShardNameBytes(); - } - /** - * Protobuf type {@code org.opendaylight.controller.mdsal.FindPrimary} - */ - public static final class FindPrimary extends - com.google.protobuf.GeneratedMessage - implements FindPrimaryOrBuilder { - // Use FindPrimary.newBuilder() to construct. - private FindPrimary(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private FindPrimary(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final FindPrimary defaultInstance; - public static FindPrimary getDefaultInstance() { - return defaultInstance; - } - - public FindPrimary getDefaultInstanceForType() { - return defaultInstance; - } - - private final com.google.protobuf.UnknownFieldSet unknownFields; - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private FindPrimary( - 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; - shardName_ = 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.shard.ShardManagerMessages.internal_static_org_opendaylight_controller_mdsal_FindPrimary_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.opendaylight.controller.protobuff.messages.shard.ShardManagerMessages.internal_static_org_opendaylight_controller_mdsal_FindPrimary_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.opendaylight.controller.protobuff.messages.shard.ShardManagerMessages.FindPrimary.class, org.opendaylight.controller.protobuff.messages.shard.ShardManagerMessages.FindPrimary.Builder.class); - } - - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public FindPrimary parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new FindPrimary(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - private int bitField0_; - // required string shardName = 1; - public static final int SHARDNAME_FIELD_NUMBER = 1; - private java.lang.Object shardName_; - /** - * required string shardName = 1; - */ - public boolean hasShardName() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * required string shardName = 1; - */ - public java.lang.String getShardName() { - java.lang.Object ref = shardName_; - 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()) { - shardName_ = s; - } - return s; - } - } - /** - * required string shardName = 1; - */ - public com.google.protobuf.ByteString - getShardNameBytes() { - java.lang.Object ref = shardName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - shardName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private void initFields() { - shardName_ = ""; - } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - - if (!hasShardName()) { - memoizedIsInitialized = 0; - return false; - } - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, getShardNameBytes()); - } - getUnknownFields().writeTo(output); - } - - private int memoizedSerializedSize = -1; - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, getShardNameBytes()); - } - 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.shard.ShardManagerMessages.FindPrimary parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.opendaylight.controller.protobuff.messages.shard.ShardManagerMessages.FindPrimary 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.shard.ShardManagerMessages.FindPrimary parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.opendaylight.controller.protobuff.messages.shard.ShardManagerMessages.FindPrimary 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.shard.ShardManagerMessages.FindPrimary parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.opendaylight.controller.protobuff.messages.shard.ShardManagerMessages.FindPrimary 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.shard.ShardManagerMessages.FindPrimary parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.opendaylight.controller.protobuff.messages.shard.ShardManagerMessages.FindPrimary 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.shard.ShardManagerMessages.FindPrimary parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.opendaylight.controller.protobuff.messages.shard.ShardManagerMessages.FindPrimary 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(); } - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(org.opendaylight.controller.protobuff.messages.shard.ShardManagerMessages.FindPrimary prototype) { - return newBuilder().mergeFrom(prototype); - } - 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.FindPrimary} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements org.opendaylight.controller.protobuff.messages.shard.ShardManagerMessages.FindPrimaryOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.opendaylight.controller.protobuff.messages.shard.ShardManagerMessages.internal_static_org_opendaylight_controller_mdsal_FindPrimary_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.opendaylight.controller.protobuff.messages.shard.ShardManagerMessages.internal_static_org_opendaylight_controller_mdsal_FindPrimary_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.opendaylight.controller.protobuff.messages.shard.ShardManagerMessages.FindPrimary.class, org.opendaylight.controller.protobuff.messages.shard.ShardManagerMessages.FindPrimary.Builder.class); - } - - // Construct using org.opendaylight.controller.protobuff.messages.shard.ShardManagerMessages.FindPrimary.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(); - } - - public Builder clear() { - super.clear(); - shardName_ = ""; - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return org.opendaylight.controller.protobuff.messages.shard.ShardManagerMessages.internal_static_org_opendaylight_controller_mdsal_FindPrimary_descriptor; - } - - public org.opendaylight.controller.protobuff.messages.shard.ShardManagerMessages.FindPrimary getDefaultInstanceForType() { - return org.opendaylight.controller.protobuff.messages.shard.ShardManagerMessages.FindPrimary.getDefaultInstance(); - } - - public org.opendaylight.controller.protobuff.messages.shard.ShardManagerMessages.FindPrimary build() { - org.opendaylight.controller.protobuff.messages.shard.ShardManagerMessages.FindPrimary result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public org.opendaylight.controller.protobuff.messages.shard.ShardManagerMessages.FindPrimary buildPartial() { - org.opendaylight.controller.protobuff.messages.shard.ShardManagerMessages.FindPrimary result = new org.opendaylight.controller.protobuff.messages.shard.ShardManagerMessages.FindPrimary(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.shardName_ = shardName_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.opendaylight.controller.protobuff.messages.shard.ShardManagerMessages.FindPrimary) { - return mergeFrom((org.opendaylight.controller.protobuff.messages.shard.ShardManagerMessages.FindPrimary)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(org.opendaylight.controller.protobuff.messages.shard.ShardManagerMessages.FindPrimary other) { - if (other == org.opendaylight.controller.protobuff.messages.shard.ShardManagerMessages.FindPrimary.getDefaultInstance()) return this; - if (other.hasShardName()) { - bitField0_ |= 0x00000001; - shardName_ = other.shardName_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - return this; - } - - public final boolean isInitialized() { - if (!hasShardName()) { - - return false; - } - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - org.opendaylight.controller.protobuff.messages.shard.ShardManagerMessages.FindPrimary parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.opendaylight.controller.protobuff.messages.shard.ShardManagerMessages.FindPrimary) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - // required string shardName = 1; - private java.lang.Object shardName_ = ""; - /** - * required string shardName = 1; - */ - public boolean hasShardName() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * required string shardName = 1; - */ - public java.lang.String getShardName() { - java.lang.Object ref = shardName_; - if (!(ref instanceof java.lang.String)) { - java.lang.String s = ((com.google.protobuf.ByteString) ref) - .toStringUtf8(); - shardName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * required string shardName = 1; - */ - public com.google.protobuf.ByteString - getShardNameBytes() { - java.lang.Object ref = shardName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - shardName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * required string shardName = 1; - */ - public Builder setShardName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - shardName_ = value; - onChanged(); - return this; - } - /** - * required string shardName = 1; - */ - public Builder clearShardName() { - bitField0_ = (bitField0_ & ~0x00000001); - shardName_ = getDefaultInstance().getShardName(); - onChanged(); - return this; - } - /** - * required string shardName = 1; - */ - public Builder setShardNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - shardName_ = value; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:org.opendaylight.controller.mdsal.FindPrimary) - } - - static { - defaultInstance = new FindPrimary(true); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:org.opendaylight.controller.mdsal.FindPrimary) - } - - public interface PrimaryFoundOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // required string primaryPath = 1; - /** - * required string primaryPath = 1; - */ - boolean hasPrimaryPath(); - /** - * required string primaryPath = 1; - */ - java.lang.String getPrimaryPath(); - /** - * required string primaryPath = 1; - */ - com.google.protobuf.ByteString - getPrimaryPathBytes(); - } - /** - * Protobuf type {@code org.opendaylight.controller.mdsal.PrimaryFound} - */ - public static final class PrimaryFound extends - com.google.protobuf.GeneratedMessage - implements PrimaryFoundOrBuilder { - // Use PrimaryFound.newBuilder() to construct. - private PrimaryFound(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private PrimaryFound(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final PrimaryFound defaultInstance; - public static PrimaryFound getDefaultInstance() { - return defaultInstance; - } - - public PrimaryFound getDefaultInstanceForType() { - return defaultInstance; - } - - private final com.google.protobuf.UnknownFieldSet unknownFields; - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private PrimaryFound( - 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; - primaryPath_ = 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.shard.ShardManagerMessages.internal_static_org_opendaylight_controller_mdsal_PrimaryFound_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.opendaylight.controller.protobuff.messages.shard.ShardManagerMessages.internal_static_org_opendaylight_controller_mdsal_PrimaryFound_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.opendaylight.controller.protobuff.messages.shard.ShardManagerMessages.PrimaryFound.class, org.opendaylight.controller.protobuff.messages.shard.ShardManagerMessages.PrimaryFound.Builder.class); - } - - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public PrimaryFound parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new PrimaryFound(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - private int bitField0_; - // required string primaryPath = 1; - public static final int PRIMARYPATH_FIELD_NUMBER = 1; - private java.lang.Object primaryPath_; - /** - * required string primaryPath = 1; - */ - public boolean hasPrimaryPath() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * required string primaryPath = 1; - */ - public java.lang.String getPrimaryPath() { - java.lang.Object ref = primaryPath_; - 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()) { - primaryPath_ = s; - } - return s; - } - } - /** - * required string primaryPath = 1; - */ - public com.google.protobuf.ByteString - getPrimaryPathBytes() { - java.lang.Object ref = primaryPath_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - primaryPath_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private void initFields() { - primaryPath_ = ""; - } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - - if (!hasPrimaryPath()) { - memoizedIsInitialized = 0; - return false; - } - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, getPrimaryPathBytes()); - } - getUnknownFields().writeTo(output); - } - - private int memoizedSerializedSize = -1; - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, getPrimaryPathBytes()); - } - 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.shard.ShardManagerMessages.PrimaryFound parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.opendaylight.controller.protobuff.messages.shard.ShardManagerMessages.PrimaryFound 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.shard.ShardManagerMessages.PrimaryFound parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.opendaylight.controller.protobuff.messages.shard.ShardManagerMessages.PrimaryFound 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.shard.ShardManagerMessages.PrimaryFound parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.opendaylight.controller.protobuff.messages.shard.ShardManagerMessages.PrimaryFound 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.shard.ShardManagerMessages.PrimaryFound parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.opendaylight.controller.protobuff.messages.shard.ShardManagerMessages.PrimaryFound 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.shard.ShardManagerMessages.PrimaryFound parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.opendaylight.controller.protobuff.messages.shard.ShardManagerMessages.PrimaryFound 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(); } - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(org.opendaylight.controller.protobuff.messages.shard.ShardManagerMessages.PrimaryFound prototype) { - return newBuilder().mergeFrom(prototype); - } - 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.PrimaryFound} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements org.opendaylight.controller.protobuff.messages.shard.ShardManagerMessages.PrimaryFoundOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.opendaylight.controller.protobuff.messages.shard.ShardManagerMessages.internal_static_org_opendaylight_controller_mdsal_PrimaryFound_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.opendaylight.controller.protobuff.messages.shard.ShardManagerMessages.internal_static_org_opendaylight_controller_mdsal_PrimaryFound_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.opendaylight.controller.protobuff.messages.shard.ShardManagerMessages.PrimaryFound.class, org.opendaylight.controller.protobuff.messages.shard.ShardManagerMessages.PrimaryFound.Builder.class); - } - - // Construct using org.opendaylight.controller.protobuff.messages.shard.ShardManagerMessages.PrimaryFound.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(); - } - - public Builder clear() { - super.clear(); - primaryPath_ = ""; - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return org.opendaylight.controller.protobuff.messages.shard.ShardManagerMessages.internal_static_org_opendaylight_controller_mdsal_PrimaryFound_descriptor; - } - - public org.opendaylight.controller.protobuff.messages.shard.ShardManagerMessages.PrimaryFound getDefaultInstanceForType() { - return org.opendaylight.controller.protobuff.messages.shard.ShardManagerMessages.PrimaryFound.getDefaultInstance(); - } - - public org.opendaylight.controller.protobuff.messages.shard.ShardManagerMessages.PrimaryFound build() { - org.opendaylight.controller.protobuff.messages.shard.ShardManagerMessages.PrimaryFound result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public org.opendaylight.controller.protobuff.messages.shard.ShardManagerMessages.PrimaryFound buildPartial() { - org.opendaylight.controller.protobuff.messages.shard.ShardManagerMessages.PrimaryFound result = new org.opendaylight.controller.protobuff.messages.shard.ShardManagerMessages.PrimaryFound(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.primaryPath_ = primaryPath_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.opendaylight.controller.protobuff.messages.shard.ShardManagerMessages.PrimaryFound) { - return mergeFrom((org.opendaylight.controller.protobuff.messages.shard.ShardManagerMessages.PrimaryFound)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(org.opendaylight.controller.protobuff.messages.shard.ShardManagerMessages.PrimaryFound other) { - if (other == org.opendaylight.controller.protobuff.messages.shard.ShardManagerMessages.PrimaryFound.getDefaultInstance()) return this; - if (other.hasPrimaryPath()) { - bitField0_ |= 0x00000001; - primaryPath_ = other.primaryPath_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - return this; - } - - public final boolean isInitialized() { - if (!hasPrimaryPath()) { - - return false; - } - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - org.opendaylight.controller.protobuff.messages.shard.ShardManagerMessages.PrimaryFound parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.opendaylight.controller.protobuff.messages.shard.ShardManagerMessages.PrimaryFound) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - // required string primaryPath = 1; - private java.lang.Object primaryPath_ = ""; - /** - * required string primaryPath = 1; - */ - public boolean hasPrimaryPath() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * required string primaryPath = 1; - */ - public java.lang.String getPrimaryPath() { - java.lang.Object ref = primaryPath_; - if (!(ref instanceof java.lang.String)) { - java.lang.String s = ((com.google.protobuf.ByteString) ref) - .toStringUtf8(); - primaryPath_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * required string primaryPath = 1; - */ - public com.google.protobuf.ByteString - getPrimaryPathBytes() { - java.lang.Object ref = primaryPath_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - primaryPath_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * required string primaryPath = 1; - */ - public Builder setPrimaryPath( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - primaryPath_ = value; - onChanged(); - return this; - } - /** - * required string primaryPath = 1; - */ - public Builder clearPrimaryPath() { - bitField0_ = (bitField0_ & ~0x00000001); - primaryPath_ = getDefaultInstance().getPrimaryPath(); - onChanged(); - return this; - } - /** - * required string primaryPath = 1; - */ - public Builder setPrimaryPathBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - primaryPath_ = value; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:org.opendaylight.controller.mdsal.PrimaryFound) - } - - static { - defaultInstance = new PrimaryFound(true); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:org.opendaylight.controller.mdsal.PrimaryFound) - } - - public interface PrimaryNotFoundOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // required string shardName = 1; - /** - * required string shardName = 1; - */ - boolean hasShardName(); - /** - * required string shardName = 1; - */ - java.lang.String getShardName(); - /** - * required string shardName = 1; - */ - com.google.protobuf.ByteString - getShardNameBytes(); - } - /** - * Protobuf type {@code org.opendaylight.controller.mdsal.PrimaryNotFound} - */ - public static final class PrimaryNotFound extends - com.google.protobuf.GeneratedMessage - implements PrimaryNotFoundOrBuilder { - // Use PrimaryNotFound.newBuilder() to construct. - private PrimaryNotFound(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private PrimaryNotFound(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final PrimaryNotFound defaultInstance; - public static PrimaryNotFound getDefaultInstance() { - return defaultInstance; - } - - public PrimaryNotFound getDefaultInstanceForType() { - return defaultInstance; - } - - private final com.google.protobuf.UnknownFieldSet unknownFields; - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private PrimaryNotFound( - 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; - shardName_ = 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.shard.ShardManagerMessages.internal_static_org_opendaylight_controller_mdsal_PrimaryNotFound_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.opendaylight.controller.protobuff.messages.shard.ShardManagerMessages.internal_static_org_opendaylight_controller_mdsal_PrimaryNotFound_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.opendaylight.controller.protobuff.messages.shard.ShardManagerMessages.PrimaryNotFound.class, org.opendaylight.controller.protobuff.messages.shard.ShardManagerMessages.PrimaryNotFound.Builder.class); - } - - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public PrimaryNotFound parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new PrimaryNotFound(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - private int bitField0_; - // required string shardName = 1; - public static final int SHARDNAME_FIELD_NUMBER = 1; - private java.lang.Object shardName_; - /** - * required string shardName = 1; - */ - public boolean hasShardName() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * required string shardName = 1; - */ - public java.lang.String getShardName() { - java.lang.Object ref = shardName_; - 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()) { - shardName_ = s; - } - return s; - } - } - /** - * required string shardName = 1; - */ - public com.google.protobuf.ByteString - getShardNameBytes() { - java.lang.Object ref = shardName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - shardName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private void initFields() { - shardName_ = ""; - } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - - if (!hasShardName()) { - memoizedIsInitialized = 0; - return false; - } - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, getShardNameBytes()); - } - getUnknownFields().writeTo(output); - } - - private int memoizedSerializedSize = -1; - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, getShardNameBytes()); - } - 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.shard.ShardManagerMessages.PrimaryNotFound parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.opendaylight.controller.protobuff.messages.shard.ShardManagerMessages.PrimaryNotFound 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.shard.ShardManagerMessages.PrimaryNotFound parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.opendaylight.controller.protobuff.messages.shard.ShardManagerMessages.PrimaryNotFound 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.shard.ShardManagerMessages.PrimaryNotFound parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.opendaylight.controller.protobuff.messages.shard.ShardManagerMessages.PrimaryNotFound 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.shard.ShardManagerMessages.PrimaryNotFound parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.opendaylight.controller.protobuff.messages.shard.ShardManagerMessages.PrimaryNotFound 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.shard.ShardManagerMessages.PrimaryNotFound parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.opendaylight.controller.protobuff.messages.shard.ShardManagerMessages.PrimaryNotFound 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(); } - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(org.opendaylight.controller.protobuff.messages.shard.ShardManagerMessages.PrimaryNotFound prototype) { - return newBuilder().mergeFrom(prototype); - } - 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.PrimaryNotFound} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements org.opendaylight.controller.protobuff.messages.shard.ShardManagerMessages.PrimaryNotFoundOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.opendaylight.controller.protobuff.messages.shard.ShardManagerMessages.internal_static_org_opendaylight_controller_mdsal_PrimaryNotFound_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.opendaylight.controller.protobuff.messages.shard.ShardManagerMessages.internal_static_org_opendaylight_controller_mdsal_PrimaryNotFound_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.opendaylight.controller.protobuff.messages.shard.ShardManagerMessages.PrimaryNotFound.class, org.opendaylight.controller.protobuff.messages.shard.ShardManagerMessages.PrimaryNotFound.Builder.class); - } - - // Construct using org.opendaylight.controller.protobuff.messages.shard.ShardManagerMessages.PrimaryNotFound.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(); - } - - public Builder clear() { - super.clear(); - shardName_ = ""; - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return org.opendaylight.controller.protobuff.messages.shard.ShardManagerMessages.internal_static_org_opendaylight_controller_mdsal_PrimaryNotFound_descriptor; - } - - public org.opendaylight.controller.protobuff.messages.shard.ShardManagerMessages.PrimaryNotFound getDefaultInstanceForType() { - return org.opendaylight.controller.protobuff.messages.shard.ShardManagerMessages.PrimaryNotFound.getDefaultInstance(); - } - - public org.opendaylight.controller.protobuff.messages.shard.ShardManagerMessages.PrimaryNotFound build() { - org.opendaylight.controller.protobuff.messages.shard.ShardManagerMessages.PrimaryNotFound result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public org.opendaylight.controller.protobuff.messages.shard.ShardManagerMessages.PrimaryNotFound buildPartial() { - org.opendaylight.controller.protobuff.messages.shard.ShardManagerMessages.PrimaryNotFound result = new org.opendaylight.controller.protobuff.messages.shard.ShardManagerMessages.PrimaryNotFound(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.shardName_ = shardName_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.opendaylight.controller.protobuff.messages.shard.ShardManagerMessages.PrimaryNotFound) { - return mergeFrom((org.opendaylight.controller.protobuff.messages.shard.ShardManagerMessages.PrimaryNotFound)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(org.opendaylight.controller.protobuff.messages.shard.ShardManagerMessages.PrimaryNotFound other) { - if (other == org.opendaylight.controller.protobuff.messages.shard.ShardManagerMessages.PrimaryNotFound.getDefaultInstance()) return this; - if (other.hasShardName()) { - bitField0_ |= 0x00000001; - shardName_ = other.shardName_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - return this; - } - - public final boolean isInitialized() { - if (!hasShardName()) { - - return false; - } - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - org.opendaylight.controller.protobuff.messages.shard.ShardManagerMessages.PrimaryNotFound parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.opendaylight.controller.protobuff.messages.shard.ShardManagerMessages.PrimaryNotFound) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - // required string shardName = 1; - private java.lang.Object shardName_ = ""; - /** - * required string shardName = 1; - */ - public boolean hasShardName() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * required string shardName = 1; - */ - public java.lang.String getShardName() { - java.lang.Object ref = shardName_; - if (!(ref instanceof java.lang.String)) { - java.lang.String s = ((com.google.protobuf.ByteString) ref) - .toStringUtf8(); - shardName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * required string shardName = 1; - */ - public com.google.protobuf.ByteString - getShardNameBytes() { - java.lang.Object ref = shardName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - shardName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * required string shardName = 1; - */ - public Builder setShardName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - shardName_ = value; - onChanged(); - return this; - } - /** - * required string shardName = 1; - */ - public Builder clearShardName() { - bitField0_ = (bitField0_ & ~0x00000001); - shardName_ = getDefaultInstance().getShardName(); - onChanged(); - return this; - } - /** - * required string shardName = 1; - */ - public Builder setShardNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - shardName_ = value; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:org.opendaylight.controller.mdsal.PrimaryNotFound) - } - - static { - defaultInstance = new PrimaryNotFound(true); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:org.opendaylight.controller.mdsal.PrimaryNotFound) - } - - private static com.google.protobuf.Descriptors.Descriptor - internal_static_org_opendaylight_controller_mdsal_FindPrimary_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_org_opendaylight_controller_mdsal_FindPrimary_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_org_opendaylight_controller_mdsal_PrimaryFound_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_org_opendaylight_controller_mdsal_PrimaryFound_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_org_opendaylight_controller_mdsal_PrimaryNotFound_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_org_opendaylight_controller_mdsal_PrimaryNotFound_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\022ShardManager.proto\022!org.opendaylight.c" + - "ontroller.mdsal\" \n\013FindPrimary\022\021\n\tshardN" + - "ame\030\001 \002(\t\"#\n\014PrimaryFound\022\023\n\013primaryPath" + - "\030\001 \002(\t\"$\n\017PrimaryNotFound\022\021\n\tshardName\030\001" + - " \002(\tBL\n4org.opendaylight.controller.prot" + - "obuff.messages.shardB\024ShardManagerMessag" + - "es" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - internal_static_org_opendaylight_controller_mdsal_FindPrimary_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_org_opendaylight_controller_mdsal_FindPrimary_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_org_opendaylight_controller_mdsal_FindPrimary_descriptor, - new java.lang.String[] { "ShardName", }); - internal_static_org_opendaylight_controller_mdsal_PrimaryFound_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_org_opendaylight_controller_mdsal_PrimaryFound_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_org_opendaylight_controller_mdsal_PrimaryFound_descriptor, - new java.lang.String[] { "PrimaryPath", }); - internal_static_org_opendaylight_controller_mdsal_PrimaryNotFound_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_org_opendaylight_controller_mdsal_PrimaryNotFound_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_org_opendaylight_controller_mdsal_PrimaryNotFound_descriptor, - new java.lang.String[] { "ShardName", }); - 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/resources/KeyValueMessages.proto b/opendaylight/md-sal/sal-clustering-commons/src/main/resources/KeyValueMessages.proto deleted file mode 100644 index 8dc790b3dd..0000000000 --- a/opendaylight/md-sal/sal-clustering-commons/src/main/resources/KeyValueMessages.proto +++ /dev/null @@ -1,13 +0,0 @@ -package org.opendaylight.controller.cluster.raft; - -import "AppendEntriesMessages.proto"; - -option java_package = "org.opendaylight.controller.protobuff.messages.cluster.example"; -option java_outer_classname = "KeyValueMessages"; -option optimize_for = SPEED; - -// proto file for the payload of Example, extending AppendEntries -extend AppendEntries.ReplicatedLogEntry.Payload { - optional string key = 2; - optional string value = 3; -} diff --git a/opendaylight/md-sal/sal-clustering-commons/src/main/resources/MockPayload.proto b/opendaylight/md-sal/sal-clustering-commons/src/main/resources/MockPayload.proto deleted file mode 100644 index ce29db4e3f..0000000000 --- a/opendaylight/md-sal/sal-clustering-commons/src/main/resources/MockPayload.proto +++ /dev/null @@ -1,10 +0,0 @@ -import "AppendEntriesMessages.proto"; - -package org.opendaylight.controller.cluster.raft.test; - -option java_package = "org.opendaylight.controller.protobuff.messages.cluster.raft.test"; -option java_outer_classname = "MockPayloadMessages"; - -extend AppendEntries.ReplicatedLogEntry.Payload { - optional string value = 2; -} diff --git a/opendaylight/md-sal/sal-clustering-commons/src/main/resources/ShardManager.proto b/opendaylight/md-sal/sal-clustering-commons/src/main/resources/ShardManager.proto deleted file mode 100644 index abd6fcc109..0000000000 --- a/opendaylight/md-sal/sal-clustering-commons/src/main/resources/ShardManager.proto +++ /dev/null @@ -1,16 +0,0 @@ -package org.opendaylight.controller.mdsal; - -option java_package = "org.opendaylight.controller.protobuff.messages.shard"; -option java_outer_classname = "ShardManagerMessages"; - -message FindPrimary { - required string shardName = 1; -} - -message PrimaryFound { - required string primaryPath =1; -} - -message PrimaryNotFound { - required string shardName =1; -} diff --git a/opendaylight/md-sal/sal-clustering-commons/src/main/resources/SimpleNormalizedNode.proto b/opendaylight/md-sal/sal-clustering-commons/src/main/resources/SimpleNormalizedNode.proto deleted file mode 100644 index e0b21d3011..0000000000 --- a/opendaylight/md-sal/sal-clustering-commons/src/main/resources/SimpleNormalizedNode.proto +++ /dev/null @@ -1,10 +0,0 @@ -package org.opendaylight.controller.mdsal; - -option java_package = "org.opendaylight.controller.protobuff.messages.common"; -option java_outer_classname = "SimpleNormalizedNodeMessage"; - -message NormalizedNodeXml { - required string nodeIdentifier=1; - required string xmlString = 2; -} - diff --git a/opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/protobuff/messages/shard/ShardManagerMessagesTest.java b/opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/protobuff/messages/shard/ShardManagerMessagesTest.java deleted file mode 100644 index 2e73fdcbdf..0000000000 --- a/opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/protobuff/messages/shard/ShardManagerMessagesTest.java +++ /dev/null @@ -1,61 +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.shard; - -/** - * This test case is present to ensure that if others have used proper version of protocol buffer - * for the ShardManager.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 - * - */ - -import org.junit.Assert; -import org.junit.Test; -import org.opendaylight.controller.protobuff.messages.AbstractMessagesTest; - -public class ShardManagerMessagesTest extends AbstractMessagesTest { - - @Test - public void verifySerialization() throws Exception { - ShardManagerMessages.FindPrimary.Builder builder = - ShardManagerMessages.FindPrimary.newBuilder(); - builder.setShardName("Inventory"); - - writeToFile(builder); - - - // Here we will read the same and check we got back what we had saved - ShardManagerMessages.FindPrimary findPrimaryNew = - (ShardManagerMessages.FindPrimary) readFromFile(ShardManagerMessages.FindPrimary.PARSER); - - Assert.assertEquals("Inventory", findPrimaryNew.getShardName()); - - // Here we compare with the version we had shipped to catch any protobuff compiler version - // changes - ShardManagerMessages.FindPrimary findPrimaryOriginal = - (ShardManagerMessages.FindPrimary) readFromTestDataFile(ShardManagerMessages.FindPrimary.PARSER); - - Assert.assertEquals(findPrimaryNew.getShardName(), - findPrimaryOriginal.getShardName()); - - } - - @Override - public String getTestFileName() { - return ShardManagerMessagesTest.class.getSimpleName(); - } - -} -- 2.36.6