| // Generated by the protocol buffer compiler. DO NOT EDIT! |
| // source: src/main/proto/DataFormats.proto |
| |
| package org.apache.bookkeeper.proto; |
| |
| public final class DataFormats { |
| private DataFormats() {} |
| public static void registerAllExtensions( |
| com.google.protobuf.ExtensionRegistry registry) { |
| } |
| public interface LedgerMetadataFormatOrBuilder |
| extends com.google.protobuf.MessageOrBuilder { |
| |
| // required int32 quorumSize = 1; |
| boolean hasQuorumSize(); |
| int getQuorumSize(); |
| |
| // required int32 ensembleSize = 2; |
| boolean hasEnsembleSize(); |
| int getEnsembleSize(); |
| |
| // required int64 length = 3; |
| boolean hasLength(); |
| long getLength(); |
| |
| // optional int64 lastEntryId = 4; |
| boolean hasLastEntryId(); |
| long getLastEntryId(); |
| |
| // required .LedgerMetadataFormat.State state = 5 [default = OPEN]; |
| boolean hasState(); |
| org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.State getState(); |
| |
| // repeated .LedgerMetadataFormat.Segment segment = 6; |
| java.util.List<org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.Segment> |
| getSegmentList(); |
| org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.Segment getSegment(int index); |
| int getSegmentCount(); |
| java.util.List<? extends org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.SegmentOrBuilder> |
| getSegmentOrBuilderList(); |
| org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.SegmentOrBuilder getSegmentOrBuilder( |
| int index); |
| |
| // optional .LedgerMetadataFormat.DigestType digestType = 7; |
| boolean hasDigestType(); |
| org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.DigestType getDigestType(); |
| |
| // optional bytes password = 8; |
| boolean hasPassword(); |
| com.google.protobuf.ByteString getPassword(); |
| |
| // optional int32 ackQuorumSize = 9; |
| boolean hasAckQuorumSize(); |
| int getAckQuorumSize(); |
| } |
| public static final class LedgerMetadataFormat extends |
| com.google.protobuf.GeneratedMessage |
| implements LedgerMetadataFormatOrBuilder { |
| // Use LedgerMetadataFormat.newBuilder() to construct. |
| private LedgerMetadataFormat(Builder builder) { |
| super(builder); |
| } |
| private LedgerMetadataFormat(boolean noInit) {} |
| |
| private static final LedgerMetadataFormat defaultInstance; |
| public static LedgerMetadataFormat getDefaultInstance() { |
| return defaultInstance; |
| } |
| |
| public LedgerMetadataFormat getDefaultInstanceForType() { |
| return defaultInstance; |
| } |
| |
| public static final com.google.protobuf.Descriptors.Descriptor |
| getDescriptor() { |
| return org.apache.bookkeeper.proto.DataFormats.internal_static_LedgerMetadataFormat_descriptor; |
| } |
| |
| protected com.google.protobuf.GeneratedMessage.FieldAccessorTable |
| internalGetFieldAccessorTable() { |
| return org.apache.bookkeeper.proto.DataFormats.internal_static_LedgerMetadataFormat_fieldAccessorTable; |
| } |
| |
| public enum State |
| implements com.google.protobuf.ProtocolMessageEnum { |
| OPEN(0, 1), |
| IN_RECOVERY(1, 2), |
| CLOSED(2, 3), |
| ; |
| |
| public static final int OPEN_VALUE = 1; |
| public static final int IN_RECOVERY_VALUE = 2; |
| public static final int CLOSED_VALUE = 3; |
| |
| |
| public final int getNumber() { return value; } |
| |
| public static State valueOf(int value) { |
| switch (value) { |
| case 1: return OPEN; |
| case 2: return IN_RECOVERY; |
| case 3: return CLOSED; |
| default: return null; |
| } |
| } |
| |
| public static com.google.protobuf.Internal.EnumLiteMap<State> |
| internalGetValueMap() { |
| return internalValueMap; |
| } |
| private static com.google.protobuf.Internal.EnumLiteMap<State> |
| internalValueMap = |
| new com.google.protobuf.Internal.EnumLiteMap<State>() { |
| public State findValueByNumber(int number) { |
| return State.valueOf(number); |
| } |
| }; |
| |
| public final com.google.protobuf.Descriptors.EnumValueDescriptor |
| getValueDescriptor() { |
| return getDescriptor().getValues().get(index); |
| } |
| public final com.google.protobuf.Descriptors.EnumDescriptor |
| getDescriptorForType() { |
| return getDescriptor(); |
| } |
| public static final com.google.protobuf.Descriptors.EnumDescriptor |
| getDescriptor() { |
| return org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.getDescriptor().getEnumTypes().get(0); |
| } |
| |
| private static final State[] VALUES = { |
| OPEN, IN_RECOVERY, CLOSED, |
| }; |
| |
| public static State valueOf( |
| com.google.protobuf.Descriptors.EnumValueDescriptor desc) { |
| if (desc.getType() != getDescriptor()) { |
| throw new java.lang.IllegalArgumentException( |
| "EnumValueDescriptor is not for this type."); |
| } |
| return VALUES[desc.getIndex()]; |
| } |
| |
| private final int index; |
| private final int value; |
| |
| private State(int index, int value) { |
| this.index = index; |
| this.value = value; |
| } |
| |
| // @@protoc_insertion_point(enum_scope:LedgerMetadataFormat.State) |
| } |
| |
| public enum DigestType |
| implements com.google.protobuf.ProtocolMessageEnum { |
| CRC32(0, 1), |
| HMAC(1, 2), |
| ; |
| |
| public static final int CRC32_VALUE = 1; |
| public static final int HMAC_VALUE = 2; |
| |
| |
| public final int getNumber() { return value; } |
| |
| public static DigestType valueOf(int value) { |
| switch (value) { |
| case 1: return CRC32; |
| case 2: return HMAC; |
| default: return null; |
| } |
| } |
| |
| public static com.google.protobuf.Internal.EnumLiteMap<DigestType> |
| internalGetValueMap() { |
| return internalValueMap; |
| } |
| private static com.google.protobuf.Internal.EnumLiteMap<DigestType> |
| internalValueMap = |
| new com.google.protobuf.Internal.EnumLiteMap<DigestType>() { |
| public DigestType findValueByNumber(int number) { |
| return DigestType.valueOf(number); |
| } |
| }; |
| |
| public final com.google.protobuf.Descriptors.EnumValueDescriptor |
| getValueDescriptor() { |
| return getDescriptor().getValues().get(index); |
| } |
| public final com.google.protobuf.Descriptors.EnumDescriptor |
| getDescriptorForType() { |
| return getDescriptor(); |
| } |
| public static final com.google.protobuf.Descriptors.EnumDescriptor |
| getDescriptor() { |
| return org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.getDescriptor().getEnumTypes().get(1); |
| } |
| |
| private static final DigestType[] VALUES = { |
| CRC32, HMAC, |
| }; |
| |
| public static DigestType valueOf( |
| com.google.protobuf.Descriptors.EnumValueDescriptor desc) { |
| if (desc.getType() != getDescriptor()) { |
| throw new java.lang.IllegalArgumentException( |
| "EnumValueDescriptor is not for this type."); |
| } |
| return VALUES[desc.getIndex()]; |
| } |
| |
| private final int index; |
| private final int value; |
| |
| private DigestType(int index, int value) { |
| this.index = index; |
| this.value = value; |
| } |
| |
| // @@protoc_insertion_point(enum_scope:LedgerMetadataFormat.DigestType) |
| } |
| |
| public interface SegmentOrBuilder |
| extends com.google.protobuf.MessageOrBuilder { |
| |
| // repeated string ensembleMember = 1; |
| java.util.List<String> getEnsembleMemberList(); |
| int getEnsembleMemberCount(); |
| String getEnsembleMember(int index); |
| |
| // required int64 firstEntryId = 2; |
| boolean hasFirstEntryId(); |
| long getFirstEntryId(); |
| } |
| public static final class Segment extends |
| com.google.protobuf.GeneratedMessage |
| implements SegmentOrBuilder { |
| // Use Segment.newBuilder() to construct. |
| private Segment(Builder builder) { |
| super(builder); |
| } |
| private Segment(boolean noInit) {} |
| |
| private static final Segment defaultInstance; |
| public static Segment getDefaultInstance() { |
| return defaultInstance; |
| } |
| |
| public Segment getDefaultInstanceForType() { |
| return defaultInstance; |
| } |
| |
| public static final com.google.protobuf.Descriptors.Descriptor |
| getDescriptor() { |
| return org.apache.bookkeeper.proto.DataFormats.internal_static_LedgerMetadataFormat_Segment_descriptor; |
| } |
| |
| protected com.google.protobuf.GeneratedMessage.FieldAccessorTable |
| internalGetFieldAccessorTable() { |
| return org.apache.bookkeeper.proto.DataFormats.internal_static_LedgerMetadataFormat_Segment_fieldAccessorTable; |
| } |
| |
| private int bitField0_; |
| // repeated string ensembleMember = 1; |
| public static final int ENSEMBLEMEMBER_FIELD_NUMBER = 1; |
| private com.google.protobuf.LazyStringList ensembleMember_; |
| public java.util.List<String> |
| getEnsembleMemberList() { |
| return ensembleMember_; |
| } |
| public int getEnsembleMemberCount() { |
| return ensembleMember_.size(); |
| } |
| public String getEnsembleMember(int index) { |
| return ensembleMember_.get(index); |
| } |
| |
| // required int64 firstEntryId = 2; |
| public static final int FIRSTENTRYID_FIELD_NUMBER = 2; |
| private long firstEntryId_; |
| public boolean hasFirstEntryId() { |
| return ((bitField0_ & 0x00000001) == 0x00000001); |
| } |
| public long getFirstEntryId() { |
| return firstEntryId_; |
| } |
| |
| private void initFields() { |
| ensembleMember_ = com.google.protobuf.LazyStringArrayList.EMPTY; |
| firstEntryId_ = 0L; |
| } |
| private byte memoizedIsInitialized = -1; |
| public final boolean isInitialized() { |
| byte isInitialized = memoizedIsInitialized; |
| if (isInitialized != -1) return isInitialized == 1; |
| |
| if (!hasFirstEntryId()) { |
| memoizedIsInitialized = 0; |
| return false; |
| } |
| memoizedIsInitialized = 1; |
| return true; |
| } |
| |
| public void writeTo(com.google.protobuf.CodedOutputStream output) |
| throws java.io.IOException { |
| getSerializedSize(); |
| for (int i = 0; i < ensembleMember_.size(); i++) { |
| output.writeBytes(1, ensembleMember_.getByteString(i)); |
| } |
| if (((bitField0_ & 0x00000001) == 0x00000001)) { |
| output.writeInt64(2, firstEntryId_); |
| } |
| getUnknownFields().writeTo(output); |
| } |
| |
| private int memoizedSerializedSize = -1; |
| public int getSerializedSize() { |
| int size = memoizedSerializedSize; |
| if (size != -1) return size; |
| |
| size = 0; |
| { |
| int dataSize = 0; |
| for (int i = 0; i < ensembleMember_.size(); i++) { |
| dataSize += com.google.protobuf.CodedOutputStream |
| .computeBytesSizeNoTag(ensembleMember_.getByteString(i)); |
| } |
| size += dataSize; |
| size += 1 * getEnsembleMemberList().size(); |
| } |
| if (((bitField0_ & 0x00000001) == 0x00000001)) { |
| size += com.google.protobuf.CodedOutputStream |
| .computeInt64Size(2, firstEntryId_); |
| } |
| 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.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.Segment parseFrom( |
| com.google.protobuf.ByteString data) |
| throws com.google.protobuf.InvalidProtocolBufferException { |
| return newBuilder().mergeFrom(data).buildParsed(); |
| } |
| public static org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.Segment parseFrom( |
| com.google.protobuf.ByteString data, |
| com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
| throws com.google.protobuf.InvalidProtocolBufferException { |
| return newBuilder().mergeFrom(data, extensionRegistry) |
| .buildParsed(); |
| } |
| public static org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.Segment parseFrom(byte[] data) |
| throws com.google.protobuf.InvalidProtocolBufferException { |
| return newBuilder().mergeFrom(data).buildParsed(); |
| } |
| public static org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.Segment parseFrom( |
| byte[] data, |
| com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
| throws com.google.protobuf.InvalidProtocolBufferException { |
| return newBuilder().mergeFrom(data, extensionRegistry) |
| .buildParsed(); |
| } |
| public static org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.Segment parseFrom(java.io.InputStream input) |
| throws java.io.IOException { |
| return newBuilder().mergeFrom(input).buildParsed(); |
| } |
| public static org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.Segment parseFrom( |
| java.io.InputStream input, |
| com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
| throws java.io.IOException { |
| return newBuilder().mergeFrom(input, extensionRegistry) |
| .buildParsed(); |
| } |
| public static org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.Segment parseDelimitedFrom(java.io.InputStream input) |
| throws java.io.IOException { |
| Builder builder = newBuilder(); |
| if (builder.mergeDelimitedFrom(input)) { |
| return builder.buildParsed(); |
| } else { |
| return null; |
| } |
| } |
| public static org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.Segment parseDelimitedFrom( |
| java.io.InputStream input, |
| com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
| throws java.io.IOException { |
| Builder builder = newBuilder(); |
| if (builder.mergeDelimitedFrom(input, extensionRegistry)) { |
| return builder.buildParsed(); |
| } else { |
| return null; |
| } |
| } |
| public static org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.Segment parseFrom( |
| com.google.protobuf.CodedInputStream input) |
| throws java.io.IOException { |
| return newBuilder().mergeFrom(input).buildParsed(); |
| } |
| public static org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.Segment parseFrom( |
| com.google.protobuf.CodedInputStream input, |
| com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
| throws java.io.IOException { |
| return newBuilder().mergeFrom(input, extensionRegistry) |
| .buildParsed(); |
| } |
| |
| public static Builder newBuilder() { return Builder.create(); } |
| public Builder newBuilderForType() { return newBuilder(); } |
| public static Builder newBuilder(org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.Segment 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; |
| } |
| public static final class Builder extends |
| com.google.protobuf.GeneratedMessage.Builder<Builder> |
| implements org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.SegmentOrBuilder { |
| public static final com.google.protobuf.Descriptors.Descriptor |
| getDescriptor() { |
| return org.apache.bookkeeper.proto.DataFormats.internal_static_LedgerMetadataFormat_Segment_descriptor; |
| } |
| |
| protected com.google.protobuf.GeneratedMessage.FieldAccessorTable |
| internalGetFieldAccessorTable() { |
| return org.apache.bookkeeper.proto.DataFormats.internal_static_LedgerMetadataFormat_Segment_fieldAccessorTable; |
| } |
| |
| // Construct using org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.Segment.newBuilder() |
| private Builder() { |
| maybeForceBuilderInitialization(); |
| } |
| |
| private Builder(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(); |
| ensembleMember_ = com.google.protobuf.LazyStringArrayList.EMPTY; |
| bitField0_ = (bitField0_ & ~0x00000001); |
| firstEntryId_ = 0L; |
| bitField0_ = (bitField0_ & ~0x00000002); |
| return this; |
| } |
| |
| public Builder clone() { |
| return create().mergeFrom(buildPartial()); |
| } |
| |
| public com.google.protobuf.Descriptors.Descriptor |
| getDescriptorForType() { |
| return org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.Segment.getDescriptor(); |
| } |
| |
| public org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.Segment getDefaultInstanceForType() { |
| return org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.Segment.getDefaultInstance(); |
| } |
| |
| public org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.Segment build() { |
| org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.Segment result = buildPartial(); |
| if (!result.isInitialized()) { |
| throw newUninitializedMessageException(result); |
| } |
| return result; |
| } |
| |
| private org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.Segment buildParsed() |
| throws com.google.protobuf.InvalidProtocolBufferException { |
| org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.Segment result = buildPartial(); |
| if (!result.isInitialized()) { |
| throw newUninitializedMessageException( |
| result).asInvalidProtocolBufferException(); |
| } |
| return result; |
| } |
| |
| public org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.Segment buildPartial() { |
| org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.Segment result = new org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.Segment(this); |
| int from_bitField0_ = bitField0_; |
| int to_bitField0_ = 0; |
| if (((bitField0_ & 0x00000001) == 0x00000001)) { |
| ensembleMember_ = new com.google.protobuf.UnmodifiableLazyStringList( |
| ensembleMember_); |
| bitField0_ = (bitField0_ & ~0x00000001); |
| } |
| result.ensembleMember_ = ensembleMember_; |
| if (((from_bitField0_ & 0x00000002) == 0x00000002)) { |
| to_bitField0_ |= 0x00000001; |
| } |
| result.firstEntryId_ = firstEntryId_; |
| result.bitField0_ = to_bitField0_; |
| onBuilt(); |
| return result; |
| } |
| |
| public Builder mergeFrom(com.google.protobuf.Message other) { |
| if (other instanceof org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.Segment) { |
| return mergeFrom((org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.Segment)other); |
| } else { |
| super.mergeFrom(other); |
| return this; |
| } |
| } |
| |
| public Builder mergeFrom(org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.Segment other) { |
| if (other == org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.Segment.getDefaultInstance()) return this; |
| if (!other.ensembleMember_.isEmpty()) { |
| if (ensembleMember_.isEmpty()) { |
| ensembleMember_ = other.ensembleMember_; |
| bitField0_ = (bitField0_ & ~0x00000001); |
| } else { |
| ensureEnsembleMemberIsMutable(); |
| ensembleMember_.addAll(other.ensembleMember_); |
| } |
| onChanged(); |
| } |
| if (other.hasFirstEntryId()) { |
| setFirstEntryId(other.getFirstEntryId()); |
| } |
| this.mergeUnknownFields(other.getUnknownFields()); |
| return this; |
| } |
| |
| public final boolean isInitialized() { |
| if (!hasFirstEntryId()) { |
| |
| return false; |
| } |
| return true; |
| } |
| |
| public Builder mergeFrom( |
| com.google.protobuf.CodedInputStream input, |
| com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
| throws java.io.IOException { |
| com.google.protobuf.UnknownFieldSet.Builder unknownFields = |
| com.google.protobuf.UnknownFieldSet.newBuilder( |
| this.getUnknownFields()); |
| while (true) { |
| int tag = input.readTag(); |
| switch (tag) { |
| case 0: |
| this.setUnknownFields(unknownFields.build()); |
| onChanged(); |
| return this; |
| default: { |
| if (!parseUnknownField(input, unknownFields, |
| extensionRegistry, tag)) { |
| this.setUnknownFields(unknownFields.build()); |
| onChanged(); |
| return this; |
| } |
| break; |
| } |
| case 10: { |
| ensureEnsembleMemberIsMutable(); |
| ensembleMember_.add(input.readBytes()); |
| break; |
| } |
| case 16: { |
| bitField0_ |= 0x00000002; |
| firstEntryId_ = input.readInt64(); |
| break; |
| } |
| } |
| } |
| } |
| |
| private int bitField0_; |
| |
| // repeated string ensembleMember = 1; |
| private com.google.protobuf.LazyStringList ensembleMember_ = com.google.protobuf.LazyStringArrayList.EMPTY; |
| private void ensureEnsembleMemberIsMutable() { |
| if (!((bitField0_ & 0x00000001) == 0x00000001)) { |
| ensembleMember_ = new com.google.protobuf.LazyStringArrayList(ensembleMember_); |
| bitField0_ |= 0x00000001; |
| } |
| } |
| public java.util.List<String> |
| getEnsembleMemberList() { |
| return java.util.Collections.unmodifiableList(ensembleMember_); |
| } |
| public int getEnsembleMemberCount() { |
| return ensembleMember_.size(); |
| } |
| public String getEnsembleMember(int index) { |
| return ensembleMember_.get(index); |
| } |
| public Builder setEnsembleMember( |
| int index, String value) { |
| if (value == null) { |
| throw new NullPointerException(); |
| } |
| ensureEnsembleMemberIsMutable(); |
| ensembleMember_.set(index, value); |
| onChanged(); |
| return this; |
| } |
| public Builder addEnsembleMember(String value) { |
| if (value == null) { |
| throw new NullPointerException(); |
| } |
| ensureEnsembleMemberIsMutable(); |
| ensembleMember_.add(value); |
| onChanged(); |
| return this; |
| } |
| public Builder addAllEnsembleMember( |
| java.lang.Iterable<String> values) { |
| ensureEnsembleMemberIsMutable(); |
| super.addAll(values, ensembleMember_); |
| onChanged(); |
| return this; |
| } |
| public Builder clearEnsembleMember() { |
| ensembleMember_ = com.google.protobuf.LazyStringArrayList.EMPTY; |
| bitField0_ = (bitField0_ & ~0x00000001); |
| onChanged(); |
| return this; |
| } |
| void addEnsembleMember(com.google.protobuf.ByteString value) { |
| ensureEnsembleMemberIsMutable(); |
| ensembleMember_.add(value); |
| onChanged(); |
| } |
| |
| // required int64 firstEntryId = 2; |
| private long firstEntryId_ ; |
| public boolean hasFirstEntryId() { |
| return ((bitField0_ & 0x00000002) == 0x00000002); |
| } |
| public long getFirstEntryId() { |
| return firstEntryId_; |
| } |
| public Builder setFirstEntryId(long value) { |
| bitField0_ |= 0x00000002; |
| firstEntryId_ = value; |
| onChanged(); |
| return this; |
| } |
| public Builder clearFirstEntryId() { |
| bitField0_ = (bitField0_ & ~0x00000002); |
| firstEntryId_ = 0L; |
| onChanged(); |
| return this; |
| } |
| |
| // @@protoc_insertion_point(builder_scope:LedgerMetadataFormat.Segment) |
| } |
| |
| static { |
| defaultInstance = new Segment(true); |
| defaultInstance.initFields(); |
| } |
| |
| // @@protoc_insertion_point(class_scope:LedgerMetadataFormat.Segment) |
| } |
| |
| private int bitField0_; |
| // required int32 quorumSize = 1; |
| public static final int QUORUMSIZE_FIELD_NUMBER = 1; |
| private int quorumSize_; |
| public boolean hasQuorumSize() { |
| return ((bitField0_ & 0x00000001) == 0x00000001); |
| } |
| public int getQuorumSize() { |
| return quorumSize_; |
| } |
| |
| // required int32 ensembleSize = 2; |
| public static final int ENSEMBLESIZE_FIELD_NUMBER = 2; |
| private int ensembleSize_; |
| public boolean hasEnsembleSize() { |
| return ((bitField0_ & 0x00000002) == 0x00000002); |
| } |
| public int getEnsembleSize() { |
| return ensembleSize_; |
| } |
| |
| // required int64 length = 3; |
| public static final int LENGTH_FIELD_NUMBER = 3; |
| private long length_; |
| public boolean hasLength() { |
| return ((bitField0_ & 0x00000004) == 0x00000004); |
| } |
| public long getLength() { |
| return length_; |
| } |
| |
| // optional int64 lastEntryId = 4; |
| public static final int LASTENTRYID_FIELD_NUMBER = 4; |
| private long lastEntryId_; |
| public boolean hasLastEntryId() { |
| return ((bitField0_ & 0x00000008) == 0x00000008); |
| } |
| public long getLastEntryId() { |
| return lastEntryId_; |
| } |
| |
| // required .LedgerMetadataFormat.State state = 5 [default = OPEN]; |
| public static final int STATE_FIELD_NUMBER = 5; |
| private org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.State state_; |
| public boolean hasState() { |
| return ((bitField0_ & 0x00000010) == 0x00000010); |
| } |
| public org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.State getState() { |
| return state_; |
| } |
| |
| // repeated .LedgerMetadataFormat.Segment segment = 6; |
| public static final int SEGMENT_FIELD_NUMBER = 6; |
| private java.util.List<org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.Segment> segment_; |
| public java.util.List<org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.Segment> getSegmentList() { |
| return segment_; |
| } |
| public java.util.List<? extends org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.SegmentOrBuilder> |
| getSegmentOrBuilderList() { |
| return segment_; |
| } |
| public int getSegmentCount() { |
| return segment_.size(); |
| } |
| public org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.Segment getSegment(int index) { |
| return segment_.get(index); |
| } |
| public org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.SegmentOrBuilder getSegmentOrBuilder( |
| int index) { |
| return segment_.get(index); |
| } |
| |
| // optional .LedgerMetadataFormat.DigestType digestType = 7; |
| public static final int DIGESTTYPE_FIELD_NUMBER = 7; |
| private org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.DigestType digestType_; |
| public boolean hasDigestType() { |
| return ((bitField0_ & 0x00000020) == 0x00000020); |
| } |
| public org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.DigestType getDigestType() { |
| return digestType_; |
| } |
| |
| // optional bytes password = 8; |
| public static final int PASSWORD_FIELD_NUMBER = 8; |
| private com.google.protobuf.ByteString password_; |
| public boolean hasPassword() { |
| return ((bitField0_ & 0x00000040) == 0x00000040); |
| } |
| public com.google.protobuf.ByteString getPassword() { |
| return password_; |
| } |
| |
| // optional int32 ackQuorumSize = 9; |
| public static final int ACKQUORUMSIZE_FIELD_NUMBER = 9; |
| private int ackQuorumSize_; |
| public boolean hasAckQuorumSize() { |
| return ((bitField0_ & 0x00000080) == 0x00000080); |
| } |
| public int getAckQuorumSize() { |
| return ackQuorumSize_; |
| } |
| |
| private void initFields() { |
| quorumSize_ = 0; |
| ensembleSize_ = 0; |
| length_ = 0L; |
| lastEntryId_ = 0L; |
| state_ = org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.State.OPEN; |
| segment_ = java.util.Collections.emptyList(); |
| digestType_ = org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.DigestType.CRC32; |
| password_ = com.google.protobuf.ByteString.EMPTY; |
| ackQuorumSize_ = 0; |
| } |
| private byte memoizedIsInitialized = -1; |
| public final boolean isInitialized() { |
| byte isInitialized = memoizedIsInitialized; |
| if (isInitialized != -1) return isInitialized == 1; |
| |
| if (!hasQuorumSize()) { |
| memoizedIsInitialized = 0; |
| return false; |
| } |
| if (!hasEnsembleSize()) { |
| memoizedIsInitialized = 0; |
| return false; |
| } |
| if (!hasLength()) { |
| memoizedIsInitialized = 0; |
| return false; |
| } |
| if (!hasState()) { |
| memoizedIsInitialized = 0; |
| return false; |
| } |
| for (int i = 0; i < getSegmentCount(); i++) { |
| if (!getSegment(i).isInitialized()) { |
| 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.writeInt32(1, quorumSize_); |
| } |
| if (((bitField0_ & 0x00000002) == 0x00000002)) { |
| output.writeInt32(2, ensembleSize_); |
| } |
| if (((bitField0_ & 0x00000004) == 0x00000004)) { |
| output.writeInt64(3, length_); |
| } |
| if (((bitField0_ & 0x00000008) == 0x00000008)) { |
| output.writeInt64(4, lastEntryId_); |
| } |
| if (((bitField0_ & 0x00000010) == 0x00000010)) { |
| output.writeEnum(5, state_.getNumber()); |
| } |
| for (int i = 0; i < segment_.size(); i++) { |
| output.writeMessage(6, segment_.get(i)); |
| } |
| if (((bitField0_ & 0x00000020) == 0x00000020)) { |
| output.writeEnum(7, digestType_.getNumber()); |
| } |
| if (((bitField0_ & 0x00000040) == 0x00000040)) { |
| output.writeBytes(8, password_); |
| } |
| if (((bitField0_ & 0x00000080) == 0x00000080)) { |
| output.writeInt32(9, ackQuorumSize_); |
| } |
| 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 |
| .computeInt32Size(1, quorumSize_); |
| } |
| if (((bitField0_ & 0x00000002) == 0x00000002)) { |
| size += com.google.protobuf.CodedOutputStream |
| .computeInt32Size(2, ensembleSize_); |
| } |
| if (((bitField0_ & 0x00000004) == 0x00000004)) { |
| size += com.google.protobuf.CodedOutputStream |
| .computeInt64Size(3, length_); |
| } |
| if (((bitField0_ & 0x00000008) == 0x00000008)) { |
| size += com.google.protobuf.CodedOutputStream |
| .computeInt64Size(4, lastEntryId_); |
| } |
| if (((bitField0_ & 0x00000010) == 0x00000010)) { |
| size += com.google.protobuf.CodedOutputStream |
| .computeEnumSize(5, state_.getNumber()); |
| } |
| for (int i = 0; i < segment_.size(); i++) { |
| size += com.google.protobuf.CodedOutputStream |
| .computeMessageSize(6, segment_.get(i)); |
| } |
| if (((bitField0_ & 0x00000020) == 0x00000020)) { |
| size += com.google.protobuf.CodedOutputStream |
| .computeEnumSize(7, digestType_.getNumber()); |
| } |
| if (((bitField0_ & 0x00000040) == 0x00000040)) { |
| size += com.google.protobuf.CodedOutputStream |
| .computeBytesSize(8, password_); |
| } |
| if (((bitField0_ & 0x00000080) == 0x00000080)) { |
| size += com.google.protobuf.CodedOutputStream |
| .computeInt32Size(9, ackQuorumSize_); |
| } |
| 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.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat parseFrom( |
| com.google.protobuf.ByteString data) |
| throws com.google.protobuf.InvalidProtocolBufferException { |
| return newBuilder().mergeFrom(data).buildParsed(); |
| } |
| public static org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat parseFrom( |
| com.google.protobuf.ByteString data, |
| com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
| throws com.google.protobuf.InvalidProtocolBufferException { |
| return newBuilder().mergeFrom(data, extensionRegistry) |
| .buildParsed(); |
| } |
| public static org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat parseFrom(byte[] data) |
| throws com.google.protobuf.InvalidProtocolBufferException { |
| return newBuilder().mergeFrom(data).buildParsed(); |
| } |
| public static org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat parseFrom( |
| byte[] data, |
| com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
| throws com.google.protobuf.InvalidProtocolBufferException { |
| return newBuilder().mergeFrom(data, extensionRegistry) |
| .buildParsed(); |
| } |
| public static org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat parseFrom(java.io.InputStream input) |
| throws java.io.IOException { |
| return newBuilder().mergeFrom(input).buildParsed(); |
| } |
| public static org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat parseFrom( |
| java.io.InputStream input, |
| com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
| throws java.io.IOException { |
| return newBuilder().mergeFrom(input, extensionRegistry) |
| .buildParsed(); |
| } |
| public static org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat parseDelimitedFrom(java.io.InputStream input) |
| throws java.io.IOException { |
| Builder builder = newBuilder(); |
| if (builder.mergeDelimitedFrom(input)) { |
| return builder.buildParsed(); |
| } else { |
| return null; |
| } |
| } |
| public static org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat parseDelimitedFrom( |
| java.io.InputStream input, |
| com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
| throws java.io.IOException { |
| Builder builder = newBuilder(); |
| if (builder.mergeDelimitedFrom(input, extensionRegistry)) { |
| return builder.buildParsed(); |
| } else { |
| return null; |
| } |
| } |
| public static org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat parseFrom( |
| com.google.protobuf.CodedInputStream input) |
| throws java.io.IOException { |
| return newBuilder().mergeFrom(input).buildParsed(); |
| } |
| public static org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat parseFrom( |
| com.google.protobuf.CodedInputStream input, |
| com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
| throws java.io.IOException { |
| return newBuilder().mergeFrom(input, extensionRegistry) |
| .buildParsed(); |
| } |
| |
| public static Builder newBuilder() { return Builder.create(); } |
| public Builder newBuilderForType() { return newBuilder(); } |
| public static Builder newBuilder(org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat 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; |
| } |
| public static final class Builder extends |
| com.google.protobuf.GeneratedMessage.Builder<Builder> |
| implements org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormatOrBuilder { |
| public static final com.google.protobuf.Descriptors.Descriptor |
| getDescriptor() { |
| return org.apache.bookkeeper.proto.DataFormats.internal_static_LedgerMetadataFormat_descriptor; |
| } |
| |
| protected com.google.protobuf.GeneratedMessage.FieldAccessorTable |
| internalGetFieldAccessorTable() { |
| return org.apache.bookkeeper.proto.DataFormats.internal_static_LedgerMetadataFormat_fieldAccessorTable; |
| } |
| |
| // Construct using org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.newBuilder() |
| private Builder() { |
| maybeForceBuilderInitialization(); |
| } |
| |
| private Builder(BuilderParent parent) { |
| super(parent); |
| maybeForceBuilderInitialization(); |
| } |
| private void maybeForceBuilderInitialization() { |
| if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { |
| getSegmentFieldBuilder(); |
| } |
| } |
| private static Builder create() { |
| return new Builder(); |
| } |
| |
| public Builder clear() { |
| super.clear(); |
| quorumSize_ = 0; |
| bitField0_ = (bitField0_ & ~0x00000001); |
| ensembleSize_ = 0; |
| bitField0_ = (bitField0_ & ~0x00000002); |
| length_ = 0L; |
| bitField0_ = (bitField0_ & ~0x00000004); |
| lastEntryId_ = 0L; |
| bitField0_ = (bitField0_ & ~0x00000008); |
| state_ = org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.State.OPEN; |
| bitField0_ = (bitField0_ & ~0x00000010); |
| if (segmentBuilder_ == null) { |
| segment_ = java.util.Collections.emptyList(); |
| bitField0_ = (bitField0_ & ~0x00000020); |
| } else { |
| segmentBuilder_.clear(); |
| } |
| digestType_ = org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.DigestType.CRC32; |
| bitField0_ = (bitField0_ & ~0x00000040); |
| password_ = com.google.protobuf.ByteString.EMPTY; |
| bitField0_ = (bitField0_ & ~0x00000080); |
| ackQuorumSize_ = 0; |
| bitField0_ = (bitField0_ & ~0x00000100); |
| return this; |
| } |
| |
| public Builder clone() { |
| return create().mergeFrom(buildPartial()); |
| } |
| |
| public com.google.protobuf.Descriptors.Descriptor |
| getDescriptorForType() { |
| return org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.getDescriptor(); |
| } |
| |
| public org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat getDefaultInstanceForType() { |
| return org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.getDefaultInstance(); |
| } |
| |
| public org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat build() { |
| org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat result = buildPartial(); |
| if (!result.isInitialized()) { |
| throw newUninitializedMessageException(result); |
| } |
| return result; |
| } |
| |
| private org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat buildParsed() |
| throws com.google.protobuf.InvalidProtocolBufferException { |
| org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat result = buildPartial(); |
| if (!result.isInitialized()) { |
| throw newUninitializedMessageException( |
| result).asInvalidProtocolBufferException(); |
| } |
| return result; |
| } |
| |
| public org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat buildPartial() { |
| org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat result = new org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat(this); |
| int from_bitField0_ = bitField0_; |
| int to_bitField0_ = 0; |
| if (((from_bitField0_ & 0x00000001) == 0x00000001)) { |
| to_bitField0_ |= 0x00000001; |
| } |
| result.quorumSize_ = quorumSize_; |
| if (((from_bitField0_ & 0x00000002) == 0x00000002)) { |
| to_bitField0_ |= 0x00000002; |
| } |
| result.ensembleSize_ = ensembleSize_; |
| if (((from_bitField0_ & 0x00000004) == 0x00000004)) { |
| to_bitField0_ |= 0x00000004; |
| } |
| result.length_ = length_; |
| if (((from_bitField0_ & 0x00000008) == 0x00000008)) { |
| to_bitField0_ |= 0x00000008; |
| } |
| result.lastEntryId_ = lastEntryId_; |
| if (((from_bitField0_ & 0x00000010) == 0x00000010)) { |
| to_bitField0_ |= 0x00000010; |
| } |
| result.state_ = state_; |
| if (segmentBuilder_ == null) { |
| if (((bitField0_ & 0x00000020) == 0x00000020)) { |
| segment_ = java.util.Collections.unmodifiableList(segment_); |
| bitField0_ = (bitField0_ & ~0x00000020); |
| } |
| result.segment_ = segment_; |
| } else { |
| result.segment_ = segmentBuilder_.build(); |
| } |
| if (((from_bitField0_ & 0x00000040) == 0x00000040)) { |
| to_bitField0_ |= 0x00000020; |
| } |
| result.digestType_ = digestType_; |
| if (((from_bitField0_ & 0x00000080) == 0x00000080)) { |
| to_bitField0_ |= 0x00000040; |
| } |
| result.password_ = password_; |
| if (((from_bitField0_ & 0x00000100) == 0x00000100)) { |
| to_bitField0_ |= 0x00000080; |
| } |
| result.ackQuorumSize_ = ackQuorumSize_; |
| result.bitField0_ = to_bitField0_; |
| onBuilt(); |
| return result; |
| } |
| |
| public Builder mergeFrom(com.google.protobuf.Message other) { |
| if (other instanceof org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat) { |
| return mergeFrom((org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat)other); |
| } else { |
| super.mergeFrom(other); |
| return this; |
| } |
| } |
| |
| public Builder mergeFrom(org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat other) { |
| if (other == org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.getDefaultInstance()) return this; |
| if (other.hasQuorumSize()) { |
| setQuorumSize(other.getQuorumSize()); |
| } |
| if (other.hasEnsembleSize()) { |
| setEnsembleSize(other.getEnsembleSize()); |
| } |
| if (other.hasLength()) { |
| setLength(other.getLength()); |
| } |
| if (other.hasLastEntryId()) { |
| setLastEntryId(other.getLastEntryId()); |
| } |
| if (other.hasState()) { |
| setState(other.getState()); |
| } |
| if (segmentBuilder_ == null) { |
| if (!other.segment_.isEmpty()) { |
| if (segment_.isEmpty()) { |
| segment_ = other.segment_; |
| bitField0_ = (bitField0_ & ~0x00000020); |
| } else { |
| ensureSegmentIsMutable(); |
| segment_.addAll(other.segment_); |
| } |
| onChanged(); |
| } |
| } else { |
| if (!other.segment_.isEmpty()) { |
| if (segmentBuilder_.isEmpty()) { |
| segmentBuilder_.dispose(); |
| segmentBuilder_ = null; |
| segment_ = other.segment_; |
| bitField0_ = (bitField0_ & ~0x00000020); |
| segmentBuilder_ = |
| com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? |
| getSegmentFieldBuilder() : null; |
| } else { |
| segmentBuilder_.addAllMessages(other.segment_); |
| } |
| } |
| } |
| if (other.hasDigestType()) { |
| setDigestType(other.getDigestType()); |
| } |
| if (other.hasPassword()) { |
| setPassword(other.getPassword()); |
| } |
| if (other.hasAckQuorumSize()) { |
| setAckQuorumSize(other.getAckQuorumSize()); |
| } |
| this.mergeUnknownFields(other.getUnknownFields()); |
| return this; |
| } |
| |
| public final boolean isInitialized() { |
| if (!hasQuorumSize()) { |
| |
| return false; |
| } |
| if (!hasEnsembleSize()) { |
| |
| return false; |
| } |
| if (!hasLength()) { |
| |
| return false; |
| } |
| if (!hasState()) { |
| |
| return false; |
| } |
| for (int i = 0; i < getSegmentCount(); i++) { |
| if (!getSegment(i).isInitialized()) { |
| |
| return false; |
| } |
| } |
| return true; |
| } |
| |
| public Builder mergeFrom( |
| com.google.protobuf.CodedInputStream input, |
| com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
| throws java.io.IOException { |
| com.google.protobuf.UnknownFieldSet.Builder unknownFields = |
| com.google.protobuf.UnknownFieldSet.newBuilder( |
| this.getUnknownFields()); |
| while (true) { |
| int tag = input.readTag(); |
| switch (tag) { |
| case 0: |
| this.setUnknownFields(unknownFields.build()); |
| onChanged(); |
| return this; |
| default: { |
| if (!parseUnknownField(input, unknownFields, |
| extensionRegistry, tag)) { |
| this.setUnknownFields(unknownFields.build()); |
| onChanged(); |
| return this; |
| } |
| break; |
| } |
| case 8: { |
| bitField0_ |= 0x00000001; |
| quorumSize_ = input.readInt32(); |
| break; |
| } |
| case 16: { |
| bitField0_ |= 0x00000002; |
| ensembleSize_ = input.readInt32(); |
| break; |
| } |
| case 24: { |
| bitField0_ |= 0x00000004; |
| length_ = input.readInt64(); |
| break; |
| } |
| case 32: { |
| bitField0_ |= 0x00000008; |
| lastEntryId_ = input.readInt64(); |
| break; |
| } |
| case 40: { |
| int rawValue = input.readEnum(); |
| org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.State value = org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.State.valueOf(rawValue); |
| if (value == null) { |
| unknownFields.mergeVarintField(5, rawValue); |
| } else { |
| bitField0_ |= 0x00000010; |
| state_ = value; |
| } |
| break; |
| } |
| case 50: { |
| org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.Segment.Builder subBuilder = org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.Segment.newBuilder(); |
| input.readMessage(subBuilder, extensionRegistry); |
| addSegment(subBuilder.buildPartial()); |
| break; |
| } |
| case 56: { |
| int rawValue = input.readEnum(); |
| org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.DigestType value = org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.DigestType.valueOf(rawValue); |
| if (value == null) { |
| unknownFields.mergeVarintField(7, rawValue); |
| } else { |
| bitField0_ |= 0x00000040; |
| digestType_ = value; |
| } |
| break; |
| } |
| case 66: { |
| bitField0_ |= 0x00000080; |
| password_ = input.readBytes(); |
| break; |
| } |
| case 72: { |
| bitField0_ |= 0x00000100; |
| ackQuorumSize_ = input.readInt32(); |
| break; |
| } |
| } |
| } |
| } |
| |
| private int bitField0_; |
| |
| // required int32 quorumSize = 1; |
| private int quorumSize_ ; |
| public boolean hasQuorumSize() { |
| return ((bitField0_ & 0x00000001) == 0x00000001); |
| } |
| public int getQuorumSize() { |
| return quorumSize_; |
| } |
| public Builder setQuorumSize(int value) { |
| bitField0_ |= 0x00000001; |
| quorumSize_ = value; |
| onChanged(); |
| return this; |
| } |
| public Builder clearQuorumSize() { |
| bitField0_ = (bitField0_ & ~0x00000001); |
| quorumSize_ = 0; |
| onChanged(); |
| return this; |
| } |
| |
| // required int32 ensembleSize = 2; |
| private int ensembleSize_ ; |
| public boolean hasEnsembleSize() { |
| return ((bitField0_ & 0x00000002) == 0x00000002); |
| } |
| public int getEnsembleSize() { |
| return ensembleSize_; |
| } |
| public Builder setEnsembleSize(int value) { |
| bitField0_ |= 0x00000002; |
| ensembleSize_ = value; |
| onChanged(); |
| return this; |
| } |
| public Builder clearEnsembleSize() { |
| bitField0_ = (bitField0_ & ~0x00000002); |
| ensembleSize_ = 0; |
| onChanged(); |
| return this; |
| } |
| |
| // required int64 length = 3; |
| private long length_ ; |
| public boolean hasLength() { |
| return ((bitField0_ & 0x00000004) == 0x00000004); |
| } |
| public long getLength() { |
| return length_; |
| } |
| public Builder setLength(long value) { |
| bitField0_ |= 0x00000004; |
| length_ = value; |
| onChanged(); |
| return this; |
| } |
| public Builder clearLength() { |
| bitField0_ = (bitField0_ & ~0x00000004); |
| length_ = 0L; |
| onChanged(); |
| return this; |
| } |
| |
| // optional int64 lastEntryId = 4; |
| private long lastEntryId_ ; |
| public boolean hasLastEntryId() { |
| return ((bitField0_ & 0x00000008) == 0x00000008); |
| } |
| public long getLastEntryId() { |
| return lastEntryId_; |
| } |
| public Builder setLastEntryId(long value) { |
| bitField0_ |= 0x00000008; |
| lastEntryId_ = value; |
| onChanged(); |
| return this; |
| } |
| public Builder clearLastEntryId() { |
| bitField0_ = (bitField0_ & ~0x00000008); |
| lastEntryId_ = 0L; |
| onChanged(); |
| return this; |
| } |
| |
| // required .LedgerMetadataFormat.State state = 5 [default = OPEN]; |
| private org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.State state_ = org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.State.OPEN; |
| public boolean hasState() { |
| return ((bitField0_ & 0x00000010) == 0x00000010); |
| } |
| public org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.State getState() { |
| return state_; |
| } |
| public Builder setState(org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.State value) { |
| if (value == null) { |
| throw new NullPointerException(); |
| } |
| bitField0_ |= 0x00000010; |
| state_ = value; |
| onChanged(); |
| return this; |
| } |
| public Builder clearState() { |
| bitField0_ = (bitField0_ & ~0x00000010); |
| state_ = org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.State.OPEN; |
| onChanged(); |
| return this; |
| } |
| |
| // repeated .LedgerMetadataFormat.Segment segment = 6; |
| private java.util.List<org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.Segment> segment_ = |
| java.util.Collections.emptyList(); |
| private void ensureSegmentIsMutable() { |
| if (!((bitField0_ & 0x00000020) == 0x00000020)) { |
| segment_ = new java.util.ArrayList<org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.Segment>(segment_); |
| bitField0_ |= 0x00000020; |
| } |
| } |
| |
| private com.google.protobuf.RepeatedFieldBuilder< |
| org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.Segment, org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.Segment.Builder, org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.SegmentOrBuilder> segmentBuilder_; |
| |
| public java.util.List<org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.Segment> getSegmentList() { |
| if (segmentBuilder_ == null) { |
| return java.util.Collections.unmodifiableList(segment_); |
| } else { |
| return segmentBuilder_.getMessageList(); |
| } |
| } |
| public int getSegmentCount() { |
| if (segmentBuilder_ == null) { |
| return segment_.size(); |
| } else { |
| return segmentBuilder_.getCount(); |
| } |
| } |
| public org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.Segment getSegment(int index) { |
| if (segmentBuilder_ == null) { |
| return segment_.get(index); |
| } else { |
| return segmentBuilder_.getMessage(index); |
| } |
| } |
| public Builder setSegment( |
| int index, org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.Segment value) { |
| if (segmentBuilder_ == null) { |
| if (value == null) { |
| throw new NullPointerException(); |
| } |
| ensureSegmentIsMutable(); |
| segment_.set(index, value); |
| onChanged(); |
| } else { |
| segmentBuilder_.setMessage(index, value); |
| } |
| return this; |
| } |
| public Builder setSegment( |
| int index, org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.Segment.Builder builderForValue) { |
| if (segmentBuilder_ == null) { |
| ensureSegmentIsMutable(); |
| segment_.set(index, builderForValue.build()); |
| onChanged(); |
| } else { |
| segmentBuilder_.setMessage(index, builderForValue.build()); |
| } |
| return this; |
| } |
| public Builder addSegment(org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.Segment value) { |
| if (segmentBuilder_ == null) { |
| if (value == null) { |
| throw new NullPointerException(); |
| } |
| ensureSegmentIsMutable(); |
| segment_.add(value); |
| onChanged(); |
| } else { |
| segmentBuilder_.addMessage(value); |
| } |
| return this; |
| } |
| public Builder addSegment( |
| int index, org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.Segment value) { |
| if (segmentBuilder_ == null) { |
| if (value == null) { |
| throw new NullPointerException(); |
| } |
| ensureSegmentIsMutable(); |
| segment_.add(index, value); |
| onChanged(); |
| } else { |
| segmentBuilder_.addMessage(index, value); |
| } |
| return this; |
| } |
| public Builder addSegment( |
| org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.Segment.Builder builderForValue) { |
| if (segmentBuilder_ == null) { |
| ensureSegmentIsMutable(); |
| segment_.add(builderForValue.build()); |
| onChanged(); |
| } else { |
| segmentBuilder_.addMessage(builderForValue.build()); |
| } |
| return this; |
| } |
| public Builder addSegment( |
| int index, org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.Segment.Builder builderForValue) { |
| if (segmentBuilder_ == null) { |
| ensureSegmentIsMutable(); |
| segment_.add(index, builderForValue.build()); |
| onChanged(); |
| } else { |
| segmentBuilder_.addMessage(index, builderForValue.build()); |
| } |
| return this; |
| } |
| public Builder addAllSegment( |
| java.lang.Iterable<? extends org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.Segment> values) { |
| if (segmentBuilder_ == null) { |
| ensureSegmentIsMutable(); |
| super.addAll(values, segment_); |
| onChanged(); |
| } else { |
| segmentBuilder_.addAllMessages(values); |
| } |
| return this; |
| } |
| public Builder clearSegment() { |
| if (segmentBuilder_ == null) { |
| segment_ = java.util.Collections.emptyList(); |
| bitField0_ = (bitField0_ & ~0x00000020); |
| onChanged(); |
| } else { |
| segmentBuilder_.clear(); |
| } |
| return this; |
| } |
| public Builder removeSegment(int index) { |
| if (segmentBuilder_ == null) { |
| ensureSegmentIsMutable(); |
| segment_.remove(index); |
| onChanged(); |
| } else { |
| segmentBuilder_.remove(index); |
| } |
| return this; |
| } |
| public org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.Segment.Builder getSegmentBuilder( |
| int index) { |
| return getSegmentFieldBuilder().getBuilder(index); |
| } |
| public org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.SegmentOrBuilder getSegmentOrBuilder( |
| int index) { |
| if (segmentBuilder_ == null) { |
| return segment_.get(index); } else { |
| return segmentBuilder_.getMessageOrBuilder(index); |
| } |
| } |
| public java.util.List<? extends org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.SegmentOrBuilder> |
| getSegmentOrBuilderList() { |
| if (segmentBuilder_ != null) { |
| return segmentBuilder_.getMessageOrBuilderList(); |
| } else { |
| return java.util.Collections.unmodifiableList(segment_); |
| } |
| } |
| public org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.Segment.Builder addSegmentBuilder() { |
| return getSegmentFieldBuilder().addBuilder( |
| org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.Segment.getDefaultInstance()); |
| } |
| public org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.Segment.Builder addSegmentBuilder( |
| int index) { |
| return getSegmentFieldBuilder().addBuilder( |
| index, org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.Segment.getDefaultInstance()); |
| } |
| public java.util.List<org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.Segment.Builder> |
| getSegmentBuilderList() { |
| return getSegmentFieldBuilder().getBuilderList(); |
| } |
| private com.google.protobuf.RepeatedFieldBuilder< |
| org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.Segment, org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.Segment.Builder, org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.SegmentOrBuilder> |
| getSegmentFieldBuilder() { |
| if (segmentBuilder_ == null) { |
| segmentBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< |
| org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.Segment, org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.Segment.Builder, org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.SegmentOrBuilder>( |
| segment_, |
| ((bitField0_ & 0x00000020) == 0x00000020), |
| getParentForChildren(), |
| isClean()); |
| segment_ = null; |
| } |
| return segmentBuilder_; |
| } |
| |
| // optional .LedgerMetadataFormat.DigestType digestType = 7; |
| private org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.DigestType digestType_ = org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.DigestType.CRC32; |
| public boolean hasDigestType() { |
| return ((bitField0_ & 0x00000040) == 0x00000040); |
| } |
| public org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.DigestType getDigestType() { |
| return digestType_; |
| } |
| public Builder setDigestType(org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.DigestType value) { |
| if (value == null) { |
| throw new NullPointerException(); |
| } |
| bitField0_ |= 0x00000040; |
| digestType_ = value; |
| onChanged(); |
| return this; |
| } |
| public Builder clearDigestType() { |
| bitField0_ = (bitField0_ & ~0x00000040); |
| digestType_ = org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.DigestType.CRC32; |
| onChanged(); |
| return this; |
| } |
| |
| // optional bytes password = 8; |
| private com.google.protobuf.ByteString password_ = com.google.protobuf.ByteString.EMPTY; |
| public boolean hasPassword() { |
| return ((bitField0_ & 0x00000080) == 0x00000080); |
| } |
| public com.google.protobuf.ByteString getPassword() { |
| return password_; |
| } |
| public Builder setPassword(com.google.protobuf.ByteString value) { |
| if (value == null) { |
| throw new NullPointerException(); |
| } |
| bitField0_ |= 0x00000080; |
| password_ = value; |
| onChanged(); |
| return this; |
| } |
| public Builder clearPassword() { |
| bitField0_ = (bitField0_ & ~0x00000080); |
| password_ = getDefaultInstance().getPassword(); |
| onChanged(); |
| return this; |
| } |
| |
| // optional int32 ackQuorumSize = 9; |
| private int ackQuorumSize_ ; |
| public boolean hasAckQuorumSize() { |
| return ((bitField0_ & 0x00000100) == 0x00000100); |
| } |
| public int getAckQuorumSize() { |
| return ackQuorumSize_; |
| } |
| public Builder setAckQuorumSize(int value) { |
| bitField0_ |= 0x00000100; |
| ackQuorumSize_ = value; |
| onChanged(); |
| return this; |
| } |
| public Builder clearAckQuorumSize() { |
| bitField0_ = (bitField0_ & ~0x00000100); |
| ackQuorumSize_ = 0; |
| onChanged(); |
| return this; |
| } |
| |
| // @@protoc_insertion_point(builder_scope:LedgerMetadataFormat) |
| } |
| |
| static { |
| defaultInstance = new LedgerMetadataFormat(true); |
| defaultInstance.initFields(); |
| } |
| |
| // @@protoc_insertion_point(class_scope:LedgerMetadataFormat) |
| } |
| |
| public interface LedgerRereplicationLayoutFormatOrBuilder |
| extends com.google.protobuf.MessageOrBuilder { |
| |
| // required string type = 1; |
| boolean hasType(); |
| String getType(); |
| |
| // required int32 version = 2; |
| boolean hasVersion(); |
| int getVersion(); |
| } |
| public static final class LedgerRereplicationLayoutFormat extends |
| com.google.protobuf.GeneratedMessage |
| implements LedgerRereplicationLayoutFormatOrBuilder { |
| // Use LedgerRereplicationLayoutFormat.newBuilder() to construct. |
| private LedgerRereplicationLayoutFormat(Builder builder) { |
| super(builder); |
| } |
| private LedgerRereplicationLayoutFormat(boolean noInit) {} |
| |
| private static final LedgerRereplicationLayoutFormat defaultInstance; |
| public static LedgerRereplicationLayoutFormat getDefaultInstance() { |
| return defaultInstance; |
| } |
| |
| public LedgerRereplicationLayoutFormat getDefaultInstanceForType() { |
| return defaultInstance; |
| } |
| |
| public static final com.google.protobuf.Descriptors.Descriptor |
| getDescriptor() { |
| return org.apache.bookkeeper.proto.DataFormats.internal_static_LedgerRereplicationLayoutFormat_descriptor; |
| } |
| |
| protected com.google.protobuf.GeneratedMessage.FieldAccessorTable |
| internalGetFieldAccessorTable() { |
| return org.apache.bookkeeper.proto.DataFormats.internal_static_LedgerRereplicationLayoutFormat_fieldAccessorTable; |
| } |
| |
| private int bitField0_; |
| // required string type = 1; |
| public static final int TYPE_FIELD_NUMBER = 1; |
| private java.lang.Object type_; |
| public boolean hasType() { |
| return ((bitField0_ & 0x00000001) == 0x00000001); |
| } |
| public String getType() { |
| java.lang.Object ref = type_; |
| if (ref instanceof String) { |
| return (String) ref; |
| } else { |
| com.google.protobuf.ByteString bs = |
| (com.google.protobuf.ByteString) ref; |
| String s = bs.toStringUtf8(); |
| if (com.google.protobuf.Internal.isValidUtf8(bs)) { |
| type_ = s; |
| } |
| return s; |
| } |
| } |
| private com.google.protobuf.ByteString getTypeBytes() { |
| java.lang.Object ref = type_; |
| if (ref instanceof String) { |
| com.google.protobuf.ByteString b = |
| com.google.protobuf.ByteString.copyFromUtf8((String) ref); |
| type_ = b; |
| return b; |
| } else { |
| return (com.google.protobuf.ByteString) ref; |
| } |
| } |
| |
| // required int32 version = 2; |
| public static final int VERSION_FIELD_NUMBER = 2; |
| private int version_; |
| public boolean hasVersion() { |
| return ((bitField0_ & 0x00000002) == 0x00000002); |
| } |
| public int getVersion() { |
| return version_; |
| } |
| |
| private void initFields() { |
| type_ = ""; |
| version_ = 0; |
| } |
| private byte memoizedIsInitialized = -1; |
| public final boolean isInitialized() { |
| byte isInitialized = memoizedIsInitialized; |
| if (isInitialized != -1) return isInitialized == 1; |
| |
| if (!hasType()) { |
| memoizedIsInitialized = 0; |
| return false; |
| } |
| if (!hasVersion()) { |
| 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, getTypeBytes()); |
| } |
| if (((bitField0_ & 0x00000002) == 0x00000002)) { |
| output.writeInt32(2, version_); |
| } |
| 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, getTypeBytes()); |
| } |
| if (((bitField0_ & 0x00000002) == 0x00000002)) { |
| size += com.google.protobuf.CodedOutputStream |
| .computeInt32Size(2, version_); |
| } |
| 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.apache.bookkeeper.proto.DataFormats.LedgerRereplicationLayoutFormat parseFrom( |
| com.google.protobuf.ByteString data) |
| throws com.google.protobuf.InvalidProtocolBufferException { |
| return newBuilder().mergeFrom(data).buildParsed(); |
| } |
| public static org.apache.bookkeeper.proto.DataFormats.LedgerRereplicationLayoutFormat parseFrom( |
| com.google.protobuf.ByteString data, |
| com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
| throws com.google.protobuf.InvalidProtocolBufferException { |
| return newBuilder().mergeFrom(data, extensionRegistry) |
| .buildParsed(); |
| } |
| public static org.apache.bookkeeper.proto.DataFormats.LedgerRereplicationLayoutFormat parseFrom(byte[] data) |
| throws com.google.protobuf.InvalidProtocolBufferException { |
| return newBuilder().mergeFrom(data).buildParsed(); |
| } |
| public static org.apache.bookkeeper.proto.DataFormats.LedgerRereplicationLayoutFormat parseFrom( |
| byte[] data, |
| com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
| throws com.google.protobuf.InvalidProtocolBufferException { |
| return newBuilder().mergeFrom(data, extensionRegistry) |
| .buildParsed(); |
| } |
| public static org.apache.bookkeeper.proto.DataFormats.LedgerRereplicationLayoutFormat parseFrom(java.io.InputStream input) |
| throws java.io.IOException { |
| return newBuilder().mergeFrom(input).buildParsed(); |
| } |
| public static org.apache.bookkeeper.proto.DataFormats.LedgerRereplicationLayoutFormat parseFrom( |
| java.io.InputStream input, |
| com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
| throws java.io.IOException { |
| return newBuilder().mergeFrom(input, extensionRegistry) |
| .buildParsed(); |
| } |
| public static org.apache.bookkeeper.proto.DataFormats.LedgerRereplicationLayoutFormat parseDelimitedFrom(java.io.InputStream input) |
| throws java.io.IOException { |
| Builder builder = newBuilder(); |
| if (builder.mergeDelimitedFrom(input)) { |
| return builder.buildParsed(); |
| } else { |
| return null; |
| } |
| } |
| public static org.apache.bookkeeper.proto.DataFormats.LedgerRereplicationLayoutFormat parseDelimitedFrom( |
| java.io.InputStream input, |
| com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
| throws java.io.IOException { |
| Builder builder = newBuilder(); |
| if (builder.mergeDelimitedFrom(input, extensionRegistry)) { |
| return builder.buildParsed(); |
| } else { |
| return null; |
| } |
| } |
| public static org.apache.bookkeeper.proto.DataFormats.LedgerRereplicationLayoutFormat parseFrom( |
| com.google.protobuf.CodedInputStream input) |
| throws java.io.IOException { |
| return newBuilder().mergeFrom(input).buildParsed(); |
| } |
| public static org.apache.bookkeeper.proto.DataFormats.LedgerRereplicationLayoutFormat parseFrom( |
| com.google.protobuf.CodedInputStream input, |
| com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
| throws java.io.IOException { |
| return newBuilder().mergeFrom(input, extensionRegistry) |
| .buildParsed(); |
| } |
| |
| public static Builder newBuilder() { return Builder.create(); } |
| public Builder newBuilderForType() { return newBuilder(); } |
| public static Builder newBuilder(org.apache.bookkeeper.proto.DataFormats.LedgerRereplicationLayoutFormat 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; |
| } |
| public static final class Builder extends |
| com.google.protobuf.GeneratedMessage.Builder<Builder> |
| implements org.apache.bookkeeper.proto.DataFormats.LedgerRereplicationLayoutFormatOrBuilder { |
| public static final com.google.protobuf.Descriptors.Descriptor |
| getDescriptor() { |
| return org.apache.bookkeeper.proto.DataFormats.internal_static_LedgerRereplicationLayoutFormat_descriptor; |
| } |
| |
| protected com.google.protobuf.GeneratedMessage.FieldAccessorTable |
| internalGetFieldAccessorTable() { |
| return org.apache.bookkeeper.proto.DataFormats.internal_static_LedgerRereplicationLayoutFormat_fieldAccessorTable; |
| } |
| |
| // Construct using org.apache.bookkeeper.proto.DataFormats.LedgerRereplicationLayoutFormat.newBuilder() |
| private Builder() { |
| maybeForceBuilderInitialization(); |
| } |
| |
| private Builder(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(); |
| type_ = ""; |
| bitField0_ = (bitField0_ & ~0x00000001); |
| version_ = 0; |
| bitField0_ = (bitField0_ & ~0x00000002); |
| return this; |
| } |
| |
| public Builder clone() { |
| return create().mergeFrom(buildPartial()); |
| } |
| |
| public com.google.protobuf.Descriptors.Descriptor |
| getDescriptorForType() { |
| return org.apache.bookkeeper.proto.DataFormats.LedgerRereplicationLayoutFormat.getDescriptor(); |
| } |
| |
| public org.apache.bookkeeper.proto.DataFormats.LedgerRereplicationLayoutFormat getDefaultInstanceForType() { |
| return org.apache.bookkeeper.proto.DataFormats.LedgerRereplicationLayoutFormat.getDefaultInstance(); |
| } |
| |
| public org.apache.bookkeeper.proto.DataFormats.LedgerRereplicationLayoutFormat build() { |
| org.apache.bookkeeper.proto.DataFormats.LedgerRereplicationLayoutFormat result = buildPartial(); |
| if (!result.isInitialized()) { |
| throw newUninitializedMessageException(result); |
| } |
| return result; |
| } |
| |
| private org.apache.bookkeeper.proto.DataFormats.LedgerRereplicationLayoutFormat buildParsed() |
| throws com.google.protobuf.InvalidProtocolBufferException { |
| org.apache.bookkeeper.proto.DataFormats.LedgerRereplicationLayoutFormat result = buildPartial(); |
| if (!result.isInitialized()) { |
| throw newUninitializedMessageException( |
| result).asInvalidProtocolBufferException(); |
| } |
| return result; |
| } |
| |
| public org.apache.bookkeeper.proto.DataFormats.LedgerRereplicationLayoutFormat buildPartial() { |
| org.apache.bookkeeper.proto.DataFormats.LedgerRereplicationLayoutFormat result = new org.apache.bookkeeper.proto.DataFormats.LedgerRereplicationLayoutFormat(this); |
| int from_bitField0_ = bitField0_; |
| int to_bitField0_ = 0; |
| if (((from_bitField0_ & 0x00000001) == 0x00000001)) { |
| to_bitField0_ |= 0x00000001; |
| } |
| result.type_ = type_; |
| if (((from_bitField0_ & 0x00000002) == 0x00000002)) { |
| to_bitField0_ |= 0x00000002; |
| } |
| result.version_ = version_; |
| result.bitField0_ = to_bitField0_; |
| onBuilt(); |
| return result; |
| } |
| |
| public Builder mergeFrom(com.google.protobuf.Message other) { |
| if (other instanceof org.apache.bookkeeper.proto.DataFormats.LedgerRereplicationLayoutFormat) { |
| return mergeFrom((org.apache.bookkeeper.proto.DataFormats.LedgerRereplicationLayoutFormat)other); |
| } else { |
| super.mergeFrom(other); |
| return this; |
| } |
| } |
| |
| public Builder mergeFrom(org.apache.bookkeeper.proto.DataFormats.LedgerRereplicationLayoutFormat other) { |
| if (other == org.apache.bookkeeper.proto.DataFormats.LedgerRereplicationLayoutFormat.getDefaultInstance()) return this; |
| if (other.hasType()) { |
| setType(other.getType()); |
| } |
| if (other.hasVersion()) { |
| setVersion(other.getVersion()); |
| } |
| this.mergeUnknownFields(other.getUnknownFields()); |
| return this; |
| } |
| |
| public final boolean isInitialized() { |
| if (!hasType()) { |
| |
| return false; |
| } |
| if (!hasVersion()) { |
| |
| return false; |
| } |
| return true; |
| } |
| |
| public Builder mergeFrom( |
| com.google.protobuf.CodedInputStream input, |
| com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
| throws java.io.IOException { |
| com.google.protobuf.UnknownFieldSet.Builder unknownFields = |
| com.google.protobuf.UnknownFieldSet.newBuilder( |
| this.getUnknownFields()); |
| while (true) { |
| int tag = input.readTag(); |
| switch (tag) { |
| case 0: |
| this.setUnknownFields(unknownFields.build()); |
| onChanged(); |
| return this; |
| default: { |
| if (!parseUnknownField(input, unknownFields, |
| extensionRegistry, tag)) { |
| this.setUnknownFields(unknownFields.build()); |
| onChanged(); |
| return this; |
| } |
| break; |
| } |
| case 10: { |
| bitField0_ |= 0x00000001; |
| type_ = input.readBytes(); |
| break; |
| } |
| case 16: { |
| bitField0_ |= 0x00000002; |
| version_ = input.readInt32(); |
| break; |
| } |
| } |
| } |
| } |
| |
| private int bitField0_; |
| |
| // required string type = 1; |
| private java.lang.Object type_ = ""; |
| public boolean hasType() { |
| return ((bitField0_ & 0x00000001) == 0x00000001); |
| } |
| public String getType() { |
| java.lang.Object ref = type_; |
| if (!(ref instanceof String)) { |
| String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); |
| type_ = s; |
| return s; |
| } else { |
| return (String) ref; |
| } |
| } |
| public Builder setType(String value) { |
| if (value == null) { |
| throw new NullPointerException(); |
| } |
| bitField0_ |= 0x00000001; |
| type_ = value; |
| onChanged(); |
| return this; |
| } |
| public Builder clearType() { |
| bitField0_ = (bitField0_ & ~0x00000001); |
| type_ = getDefaultInstance().getType(); |
| onChanged(); |
| return this; |
| } |
| void setType(com.google.protobuf.ByteString value) { |
| bitField0_ |= 0x00000001; |
| type_ = value; |
| onChanged(); |
| } |
| |
| // required int32 version = 2; |
| private int version_ ; |
| public boolean hasVersion() { |
| return ((bitField0_ & 0x00000002) == 0x00000002); |
| } |
| public int getVersion() { |
| return version_; |
| } |
| public Builder setVersion(int value) { |
| bitField0_ |= 0x00000002; |
| version_ = value; |
| onChanged(); |
| return this; |
| } |
| public Builder clearVersion() { |
| bitField0_ = (bitField0_ & ~0x00000002); |
| version_ = 0; |
| onChanged(); |
| return this; |
| } |
| |
| // @@protoc_insertion_point(builder_scope:LedgerRereplicationLayoutFormat) |
| } |
| |
| static { |
| defaultInstance = new LedgerRereplicationLayoutFormat(true); |
| defaultInstance.initFields(); |
| } |
| |
| // @@protoc_insertion_point(class_scope:LedgerRereplicationLayoutFormat) |
| } |
| |
| public interface UnderreplicatedLedgerFormatOrBuilder |
| extends com.google.protobuf.MessageOrBuilder { |
| |
| // repeated string replica = 1; |
| java.util.List<String> getReplicaList(); |
| int getReplicaCount(); |
| String getReplica(int index); |
| } |
| public static final class UnderreplicatedLedgerFormat extends |
| com.google.protobuf.GeneratedMessage |
| implements UnderreplicatedLedgerFormatOrBuilder { |
| // Use UnderreplicatedLedgerFormat.newBuilder() to construct. |
| private UnderreplicatedLedgerFormat(Builder builder) { |
| super(builder); |
| } |
| private UnderreplicatedLedgerFormat(boolean noInit) {} |
| |
| private static final UnderreplicatedLedgerFormat defaultInstance; |
| public static UnderreplicatedLedgerFormat getDefaultInstance() { |
| return defaultInstance; |
| } |
| |
| public UnderreplicatedLedgerFormat getDefaultInstanceForType() { |
| return defaultInstance; |
| } |
| |
| public static final com.google.protobuf.Descriptors.Descriptor |
| getDescriptor() { |
| return org.apache.bookkeeper.proto.DataFormats.internal_static_UnderreplicatedLedgerFormat_descriptor; |
| } |
| |
| protected com.google.protobuf.GeneratedMessage.FieldAccessorTable |
| internalGetFieldAccessorTable() { |
| return org.apache.bookkeeper.proto.DataFormats.internal_static_UnderreplicatedLedgerFormat_fieldAccessorTable; |
| } |
| |
| // repeated string replica = 1; |
| public static final int REPLICA_FIELD_NUMBER = 1; |
| private com.google.protobuf.LazyStringList replica_; |
| public java.util.List<String> |
| getReplicaList() { |
| return replica_; |
| } |
| public int getReplicaCount() { |
| return replica_.size(); |
| } |
| public String getReplica(int index) { |
| return replica_.get(index); |
| } |
| |
| private void initFields() { |
| replica_ = com.google.protobuf.LazyStringArrayList.EMPTY; |
| } |
| private byte memoizedIsInitialized = -1; |
| public final boolean isInitialized() { |
| byte isInitialized = memoizedIsInitialized; |
| if (isInitialized != -1) return isInitialized == 1; |
| |
| memoizedIsInitialized = 1; |
| return true; |
| } |
| |
| public void writeTo(com.google.protobuf.CodedOutputStream output) |
| throws java.io.IOException { |
| getSerializedSize(); |
| for (int i = 0; i < replica_.size(); i++) { |
| output.writeBytes(1, replica_.getByteString(i)); |
| } |
| getUnknownFields().writeTo(output); |
| } |
| |
| private int memoizedSerializedSize = -1; |
| public int getSerializedSize() { |
| int size = memoizedSerializedSize; |
| if (size != -1) return size; |
| |
| size = 0; |
| { |
| int dataSize = 0; |
| for (int i = 0; i < replica_.size(); i++) { |
| dataSize += com.google.protobuf.CodedOutputStream |
| .computeBytesSizeNoTag(replica_.getByteString(i)); |
| } |
| size += dataSize; |
| size += 1 * getReplicaList().size(); |
| } |
| 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.apache.bookkeeper.proto.DataFormats.UnderreplicatedLedgerFormat parseFrom( |
| com.google.protobuf.ByteString data) |
| throws com.google.protobuf.InvalidProtocolBufferException { |
| return newBuilder().mergeFrom(data).buildParsed(); |
| } |
| public static org.apache.bookkeeper.proto.DataFormats.UnderreplicatedLedgerFormat parseFrom( |
| com.google.protobuf.ByteString data, |
| com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
| throws com.google.protobuf.InvalidProtocolBufferException { |
| return newBuilder().mergeFrom(data, extensionRegistry) |
| .buildParsed(); |
| } |
| public static org.apache.bookkeeper.proto.DataFormats.UnderreplicatedLedgerFormat parseFrom(byte[] data) |
| throws com.google.protobuf.InvalidProtocolBufferException { |
| return newBuilder().mergeFrom(data).buildParsed(); |
| } |
| public static org.apache.bookkeeper.proto.DataFormats.UnderreplicatedLedgerFormat parseFrom( |
| byte[] data, |
| com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
| throws com.google.protobuf.InvalidProtocolBufferException { |
| return newBuilder().mergeFrom(data, extensionRegistry) |
| .buildParsed(); |
| } |
| public static org.apache.bookkeeper.proto.DataFormats.UnderreplicatedLedgerFormat parseFrom(java.io.InputStream input) |
| throws java.io.IOException { |
| return newBuilder().mergeFrom(input).buildParsed(); |
| } |
| public static org.apache.bookkeeper.proto.DataFormats.UnderreplicatedLedgerFormat parseFrom( |
| java.io.InputStream input, |
| com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
| throws java.io.IOException { |
| return newBuilder().mergeFrom(input, extensionRegistry) |
| .buildParsed(); |
| } |
| public static org.apache.bookkeeper.proto.DataFormats.UnderreplicatedLedgerFormat parseDelimitedFrom(java.io.InputStream input) |
| throws java.io.IOException { |
| Builder builder = newBuilder(); |
| if (builder.mergeDelimitedFrom(input)) { |
| return builder.buildParsed(); |
| } else { |
| return null; |
| } |
| } |
| public static org.apache.bookkeeper.proto.DataFormats.UnderreplicatedLedgerFormat parseDelimitedFrom( |
| java.io.InputStream input, |
| com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
| throws java.io.IOException { |
| Builder builder = newBuilder(); |
| if (builder.mergeDelimitedFrom(input, extensionRegistry)) { |
| return builder.buildParsed(); |
| } else { |
| return null; |
| } |
| } |
| public static org.apache.bookkeeper.proto.DataFormats.UnderreplicatedLedgerFormat parseFrom( |
| com.google.protobuf.CodedInputStream input) |
| throws java.io.IOException { |
| return newBuilder().mergeFrom(input).buildParsed(); |
| } |
| public static org.apache.bookkeeper.proto.DataFormats.UnderreplicatedLedgerFormat parseFrom( |
| com.google.protobuf.CodedInputStream input, |
| com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
| throws java.io.IOException { |
| return newBuilder().mergeFrom(input, extensionRegistry) |
| .buildParsed(); |
| } |
| |
| public static Builder newBuilder() { return Builder.create(); } |
| public Builder newBuilderForType() { return newBuilder(); } |
| public static Builder newBuilder(org.apache.bookkeeper.proto.DataFormats.UnderreplicatedLedgerFormat 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; |
| } |
| public static final class Builder extends |
| com.google.protobuf.GeneratedMessage.Builder<Builder> |
| implements org.apache.bookkeeper.proto.DataFormats.UnderreplicatedLedgerFormatOrBuilder { |
| public static final com.google.protobuf.Descriptors.Descriptor |
| getDescriptor() { |
| return org.apache.bookkeeper.proto.DataFormats.internal_static_UnderreplicatedLedgerFormat_descriptor; |
| } |
| |
| protected com.google.protobuf.GeneratedMessage.FieldAccessorTable |
| internalGetFieldAccessorTable() { |
| return org.apache.bookkeeper.proto.DataFormats.internal_static_UnderreplicatedLedgerFormat_fieldAccessorTable; |
| } |
| |
| // Construct using org.apache.bookkeeper.proto.DataFormats.UnderreplicatedLedgerFormat.newBuilder() |
| private Builder() { |
| maybeForceBuilderInitialization(); |
| } |
| |
| private Builder(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(); |
| replica_ = com.google.protobuf.LazyStringArrayList.EMPTY; |
| bitField0_ = (bitField0_ & ~0x00000001); |
| return this; |
| } |
| |
| public Builder clone() { |
| return create().mergeFrom(buildPartial()); |
| } |
| |
| public com.google.protobuf.Descriptors.Descriptor |
| getDescriptorForType() { |
| return org.apache.bookkeeper.proto.DataFormats.UnderreplicatedLedgerFormat.getDescriptor(); |
| } |
| |
| public org.apache.bookkeeper.proto.DataFormats.UnderreplicatedLedgerFormat getDefaultInstanceForType() { |
| return org.apache.bookkeeper.proto.DataFormats.UnderreplicatedLedgerFormat.getDefaultInstance(); |
| } |
| |
| public org.apache.bookkeeper.proto.DataFormats.UnderreplicatedLedgerFormat build() { |
| org.apache.bookkeeper.proto.DataFormats.UnderreplicatedLedgerFormat result = buildPartial(); |
| if (!result.isInitialized()) { |
| throw newUninitializedMessageException(result); |
| } |
| return result; |
| } |
| |
| private org.apache.bookkeeper.proto.DataFormats.UnderreplicatedLedgerFormat buildParsed() |
| throws com.google.protobuf.InvalidProtocolBufferException { |
| org.apache.bookkeeper.proto.DataFormats.UnderreplicatedLedgerFormat result = buildPartial(); |
| if (!result.isInitialized()) { |
| throw newUninitializedMessageException( |
| result).asInvalidProtocolBufferException(); |
| } |
| return result; |
| } |
| |
| public org.apache.bookkeeper.proto.DataFormats.UnderreplicatedLedgerFormat buildPartial() { |
| org.apache.bookkeeper.proto.DataFormats.UnderreplicatedLedgerFormat result = new org.apache.bookkeeper.proto.DataFormats.UnderreplicatedLedgerFormat(this); |
| int from_bitField0_ = bitField0_; |
| if (((bitField0_ & 0x00000001) == 0x00000001)) { |
| replica_ = new com.google.protobuf.UnmodifiableLazyStringList( |
| replica_); |
| bitField0_ = (bitField0_ & ~0x00000001); |
| } |
| result.replica_ = replica_; |
| onBuilt(); |
| return result; |
| } |
| |
| public Builder mergeFrom(com.google.protobuf.Message other) { |
| if (other instanceof org.apache.bookkeeper.proto.DataFormats.UnderreplicatedLedgerFormat) { |
| return mergeFrom((org.apache.bookkeeper.proto.DataFormats.UnderreplicatedLedgerFormat)other); |
| } else { |
| super.mergeFrom(other); |
| return this; |
| } |
| } |
| |
| public Builder mergeFrom(org.apache.bookkeeper.proto.DataFormats.UnderreplicatedLedgerFormat other) { |
| if (other == org.apache.bookkeeper.proto.DataFormats.UnderreplicatedLedgerFormat.getDefaultInstance()) return this; |
| if (!other.replica_.isEmpty()) { |
| if (replica_.isEmpty()) { |
| replica_ = other.replica_; |
| bitField0_ = (bitField0_ & ~0x00000001); |
| } else { |
| ensureReplicaIsMutable(); |
| replica_.addAll(other.replica_); |
| } |
| onChanged(); |
| } |
| this.mergeUnknownFields(other.getUnknownFields()); |
| return this; |
| } |
| |
| public final boolean isInitialized() { |
| return true; |
| } |
| |
| public Builder mergeFrom( |
| com.google.protobuf.CodedInputStream input, |
| com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
| throws java.io.IOException { |
| com.google.protobuf.UnknownFieldSet.Builder unknownFields = |
| com.google.protobuf.UnknownFieldSet.newBuilder( |
| this.getUnknownFields()); |
| while (true) { |
| int tag = input.readTag(); |
| switch (tag) { |
| case 0: |
| this.setUnknownFields(unknownFields.build()); |
| onChanged(); |
| return this; |
| default: { |
| if (!parseUnknownField(input, unknownFields, |
| extensionRegistry, tag)) { |
| this.setUnknownFields(unknownFields.build()); |
| onChanged(); |
| return this; |
| } |
| break; |
| } |
| case 10: { |
| ensureReplicaIsMutable(); |
| replica_.add(input.readBytes()); |
| break; |
| } |
| } |
| } |
| } |
| |
| private int bitField0_; |
| |
| // repeated string replica = 1; |
| private com.google.protobuf.LazyStringList replica_ = com.google.protobuf.LazyStringArrayList.EMPTY; |
| private void ensureReplicaIsMutable() { |
| if (!((bitField0_ & 0x00000001) == 0x00000001)) { |
| replica_ = new com.google.protobuf.LazyStringArrayList(replica_); |
| bitField0_ |= 0x00000001; |
| } |
| } |
| public java.util.List<String> |
| getReplicaList() { |
| return java.util.Collections.unmodifiableList(replica_); |
| } |
| public int getReplicaCount() { |
| return replica_.size(); |
| } |
| public String getReplica(int index) { |
| return replica_.get(index); |
| } |
| public Builder setReplica( |
| int index, String value) { |
| if (value == null) { |
| throw new NullPointerException(); |
| } |
| ensureReplicaIsMutable(); |
| replica_.set(index, value); |
| onChanged(); |
| return this; |
| } |
| public Builder addReplica(String value) { |
| if (value == null) { |
| throw new NullPointerException(); |
| } |
| ensureReplicaIsMutable(); |
| replica_.add(value); |
| onChanged(); |
| return this; |
| } |
| public Builder addAllReplica( |
| java.lang.Iterable<String> values) { |
| ensureReplicaIsMutable(); |
| super.addAll(values, replica_); |
| onChanged(); |
| return this; |
| } |
| public Builder clearReplica() { |
| replica_ = com.google.protobuf.LazyStringArrayList.EMPTY; |
| bitField0_ = (bitField0_ & ~0x00000001); |
| onChanged(); |
| return this; |
| } |
| void addReplica(com.google.protobuf.ByteString value) { |
| ensureReplicaIsMutable(); |
| replica_.add(value); |
| onChanged(); |
| } |
| |
| // @@protoc_insertion_point(builder_scope:UnderreplicatedLedgerFormat) |
| } |
| |
| static { |
| defaultInstance = new UnderreplicatedLedgerFormat(true); |
| defaultInstance.initFields(); |
| } |
| |
| // @@protoc_insertion_point(class_scope:UnderreplicatedLedgerFormat) |
| } |
| |
| public interface CookieFormatOrBuilder |
| extends com.google.protobuf.MessageOrBuilder { |
| |
| // required string bookieHost = 1; |
| boolean hasBookieHost(); |
| String getBookieHost(); |
| |
| // required string journalDir = 2; |
| boolean hasJournalDir(); |
| String getJournalDir(); |
| |
| // required string ledgerDirs = 3; |
| boolean hasLedgerDirs(); |
| String getLedgerDirs(); |
| |
| // optional string instanceId = 4; |
| boolean hasInstanceId(); |
| String getInstanceId(); |
| } |
| public static final class CookieFormat extends |
| com.google.protobuf.GeneratedMessage |
| implements CookieFormatOrBuilder { |
| // Use CookieFormat.newBuilder() to construct. |
| private CookieFormat(Builder builder) { |
| super(builder); |
| } |
| private CookieFormat(boolean noInit) {} |
| |
| private static final CookieFormat defaultInstance; |
| public static CookieFormat getDefaultInstance() { |
| return defaultInstance; |
| } |
| |
| public CookieFormat getDefaultInstanceForType() { |
| return defaultInstance; |
| } |
| |
| public static final com.google.protobuf.Descriptors.Descriptor |
| getDescriptor() { |
| return org.apache.bookkeeper.proto.DataFormats.internal_static_CookieFormat_descriptor; |
| } |
| |
| protected com.google.protobuf.GeneratedMessage.FieldAccessorTable |
| internalGetFieldAccessorTable() { |
| return org.apache.bookkeeper.proto.DataFormats.internal_static_CookieFormat_fieldAccessorTable; |
| } |
| |
| private int bitField0_; |
| // required string bookieHost = 1; |
| public static final int BOOKIEHOST_FIELD_NUMBER = 1; |
| private java.lang.Object bookieHost_; |
| public boolean hasBookieHost() { |
| return ((bitField0_ & 0x00000001) == 0x00000001); |
| } |
| public String getBookieHost() { |
| java.lang.Object ref = bookieHost_; |
| if (ref instanceof String) { |
| return (String) ref; |
| } else { |
| com.google.protobuf.ByteString bs = |
| (com.google.protobuf.ByteString) ref; |
| String s = bs.toStringUtf8(); |
| if (com.google.protobuf.Internal.isValidUtf8(bs)) { |
| bookieHost_ = s; |
| } |
| return s; |
| } |
| } |
| private com.google.protobuf.ByteString getBookieHostBytes() { |
| java.lang.Object ref = bookieHost_; |
| if (ref instanceof String) { |
| com.google.protobuf.ByteString b = |
| com.google.protobuf.ByteString.copyFromUtf8((String) ref); |
| bookieHost_ = b; |
| return b; |
| } else { |
| return (com.google.protobuf.ByteString) ref; |
| } |
| } |
| |
| // required string journalDir = 2; |
| public static final int JOURNALDIR_FIELD_NUMBER = 2; |
| private java.lang.Object journalDir_; |
| public boolean hasJournalDir() { |
| return ((bitField0_ & 0x00000002) == 0x00000002); |
| } |
| public String getJournalDir() { |
| java.lang.Object ref = journalDir_; |
| if (ref instanceof String) { |
| return (String) ref; |
| } else { |
| com.google.protobuf.ByteString bs = |
| (com.google.protobuf.ByteString) ref; |
| String s = bs.toStringUtf8(); |
| if (com.google.protobuf.Internal.isValidUtf8(bs)) { |
| journalDir_ = s; |
| } |
| return s; |
| } |
| } |
| private com.google.protobuf.ByteString getJournalDirBytes() { |
| java.lang.Object ref = journalDir_; |
| if (ref instanceof String) { |
| com.google.protobuf.ByteString b = |
| com.google.protobuf.ByteString.copyFromUtf8((String) ref); |
| journalDir_ = b; |
| return b; |
| } else { |
| return (com.google.protobuf.ByteString) ref; |
| } |
| } |
| |
| // required string ledgerDirs = 3; |
| public static final int LEDGERDIRS_FIELD_NUMBER = 3; |
| private java.lang.Object ledgerDirs_; |
| public boolean hasLedgerDirs() { |
| return ((bitField0_ & 0x00000004) == 0x00000004); |
| } |
| public String getLedgerDirs() { |
| java.lang.Object ref = ledgerDirs_; |
| if (ref instanceof String) { |
| return (String) ref; |
| } else { |
| com.google.protobuf.ByteString bs = |
| (com.google.protobuf.ByteString) ref; |
| String s = bs.toStringUtf8(); |
| if (com.google.protobuf.Internal.isValidUtf8(bs)) { |
| ledgerDirs_ = s; |
| } |
| return s; |
| } |
| } |
| private com.google.protobuf.ByteString getLedgerDirsBytes() { |
| java.lang.Object ref = ledgerDirs_; |
| if (ref instanceof String) { |
| com.google.protobuf.ByteString b = |
| com.google.protobuf.ByteString.copyFromUtf8((String) ref); |
| ledgerDirs_ = b; |
| return b; |
| } else { |
| return (com.google.protobuf.ByteString) ref; |
| } |
| } |
| |
| // optional string instanceId = 4; |
| public static final int INSTANCEID_FIELD_NUMBER = 4; |
| private java.lang.Object instanceId_; |
| public boolean hasInstanceId() { |
| return ((bitField0_ & 0x00000008) == 0x00000008); |
| } |
| public String getInstanceId() { |
| java.lang.Object ref = instanceId_; |
| if (ref instanceof String) { |
| return (String) ref; |
| } else { |
| com.google.protobuf.ByteString bs = |
| (com.google.protobuf.ByteString) ref; |
| String s = bs.toStringUtf8(); |
| if (com.google.protobuf.Internal.isValidUtf8(bs)) { |
| instanceId_ = s; |
| } |
| return s; |
| } |
| } |
| private com.google.protobuf.ByteString getInstanceIdBytes() { |
| java.lang.Object ref = instanceId_; |
| if (ref instanceof String) { |
| com.google.protobuf.ByteString b = |
| com.google.protobuf.ByteString.copyFromUtf8((String) ref); |
| instanceId_ = b; |
| return b; |
| } else { |
| return (com.google.protobuf.ByteString) ref; |
| } |
| } |
| |
| private void initFields() { |
| bookieHost_ = ""; |
| journalDir_ = ""; |
| ledgerDirs_ = ""; |
| instanceId_ = ""; |
| } |
| private byte memoizedIsInitialized = -1; |
| public final boolean isInitialized() { |
| byte isInitialized = memoizedIsInitialized; |
| if (isInitialized != -1) return isInitialized == 1; |
| |
| if (!hasBookieHost()) { |
| memoizedIsInitialized = 0; |
| return false; |
| } |
| if (!hasJournalDir()) { |
| memoizedIsInitialized = 0; |
| return false; |
| } |
| if (!hasLedgerDirs()) { |
| 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, getBookieHostBytes()); |
| } |
| if (((bitField0_ & 0x00000002) == 0x00000002)) { |
| output.writeBytes(2, getJournalDirBytes()); |
| } |
| if (((bitField0_ & 0x00000004) == 0x00000004)) { |
| output.writeBytes(3, getLedgerDirsBytes()); |
| } |
| if (((bitField0_ & 0x00000008) == 0x00000008)) { |
| output.writeBytes(4, getInstanceIdBytes()); |
| } |
| 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, getBookieHostBytes()); |
| } |
| if (((bitField0_ & 0x00000002) == 0x00000002)) { |
| size += com.google.protobuf.CodedOutputStream |
| .computeBytesSize(2, getJournalDirBytes()); |
| } |
| if (((bitField0_ & 0x00000004) == 0x00000004)) { |
| size += com.google.protobuf.CodedOutputStream |
| .computeBytesSize(3, getLedgerDirsBytes()); |
| } |
| if (((bitField0_ & 0x00000008) == 0x00000008)) { |
| size += com.google.protobuf.CodedOutputStream |
| .computeBytesSize(4, getInstanceIdBytes()); |
| } |
| 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.apache.bookkeeper.proto.DataFormats.CookieFormat parseFrom( |
| com.google.protobuf.ByteString data) |
| throws com.google.protobuf.InvalidProtocolBufferException { |
| return newBuilder().mergeFrom(data).buildParsed(); |
| } |
| public static org.apache.bookkeeper.proto.DataFormats.CookieFormat parseFrom( |
| com.google.protobuf.ByteString data, |
| com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
| throws com.google.protobuf.InvalidProtocolBufferException { |
| return newBuilder().mergeFrom(data, extensionRegistry) |
| .buildParsed(); |
| } |
| public static org.apache.bookkeeper.proto.DataFormats.CookieFormat parseFrom(byte[] data) |
| throws com.google.protobuf.InvalidProtocolBufferException { |
| return newBuilder().mergeFrom(data).buildParsed(); |
| } |
| public static org.apache.bookkeeper.proto.DataFormats.CookieFormat parseFrom( |
| byte[] data, |
| com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
| throws com.google.protobuf.InvalidProtocolBufferException { |
| return newBuilder().mergeFrom(data, extensionRegistry) |
| .buildParsed(); |
| } |
| public static org.apache.bookkeeper.proto.DataFormats.CookieFormat parseFrom(java.io.InputStream input) |
| throws java.io.IOException { |
| return newBuilder().mergeFrom(input).buildParsed(); |
| } |
| public static org.apache.bookkeeper.proto.DataFormats.CookieFormat parseFrom( |
| java.io.InputStream input, |
| com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
| throws java.io.IOException { |
| return newBuilder().mergeFrom(input, extensionRegistry) |
| .buildParsed(); |
| } |
| public static org.apache.bookkeeper.proto.DataFormats.CookieFormat parseDelimitedFrom(java.io.InputStream input) |
| throws java.io.IOException { |
| Builder builder = newBuilder(); |
| if (builder.mergeDelimitedFrom(input)) { |
| return builder.buildParsed(); |
| } else { |
| return null; |
| } |
| } |
| public static org.apache.bookkeeper.proto.DataFormats.CookieFormat parseDelimitedFrom( |
| java.io.InputStream input, |
| com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
| throws java.io.IOException { |
| Builder builder = newBuilder(); |
| if (builder.mergeDelimitedFrom(input, extensionRegistry)) { |
| return builder.buildParsed(); |
| } else { |
| return null; |
| } |
| } |
| public static org.apache.bookkeeper.proto.DataFormats.CookieFormat parseFrom( |
| com.google.protobuf.CodedInputStream input) |
| throws java.io.IOException { |
| return newBuilder().mergeFrom(input).buildParsed(); |
| } |
| public static org.apache.bookkeeper.proto.DataFormats.CookieFormat parseFrom( |
| com.google.protobuf.CodedInputStream input, |
| com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
| throws java.io.IOException { |
| return newBuilder().mergeFrom(input, extensionRegistry) |
| .buildParsed(); |
| } |
| |
| public static Builder newBuilder() { return Builder.create(); } |
| public Builder newBuilderForType() { return newBuilder(); } |
| public static Builder newBuilder(org.apache.bookkeeper.proto.DataFormats.CookieFormat 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; |
| } |
| public static final class Builder extends |
| com.google.protobuf.GeneratedMessage.Builder<Builder> |
| implements org.apache.bookkeeper.proto.DataFormats.CookieFormatOrBuilder { |
| public static final com.google.protobuf.Descriptors.Descriptor |
| getDescriptor() { |
| return org.apache.bookkeeper.proto.DataFormats.internal_static_CookieFormat_descriptor; |
| } |
| |
| protected com.google.protobuf.GeneratedMessage.FieldAccessorTable |
| internalGetFieldAccessorTable() { |
| return org.apache.bookkeeper.proto.DataFormats.internal_static_CookieFormat_fieldAccessorTable; |
| } |
| |
| // Construct using org.apache.bookkeeper.proto.DataFormats.CookieFormat.newBuilder() |
| private Builder() { |
| maybeForceBuilderInitialization(); |
| } |
| |
| private Builder(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(); |
| bookieHost_ = ""; |
| bitField0_ = (bitField0_ & ~0x00000001); |
| journalDir_ = ""; |
| bitField0_ = (bitField0_ & ~0x00000002); |
| ledgerDirs_ = ""; |
| bitField0_ = (bitField0_ & ~0x00000004); |
| instanceId_ = ""; |
| bitField0_ = (bitField0_ & ~0x00000008); |
| return this; |
| } |
| |
| public Builder clone() { |
| return create().mergeFrom(buildPartial()); |
| } |
| |
| public com.google.protobuf.Descriptors.Descriptor |
| getDescriptorForType() { |
| return org.apache.bookkeeper.proto.DataFormats.CookieFormat.getDescriptor(); |
| } |
| |
| public org.apache.bookkeeper.proto.DataFormats.CookieFormat getDefaultInstanceForType() { |
| return org.apache.bookkeeper.proto.DataFormats.CookieFormat.getDefaultInstance(); |
| } |
| |
| public org.apache.bookkeeper.proto.DataFormats.CookieFormat build() { |
| org.apache.bookkeeper.proto.DataFormats.CookieFormat result = buildPartial(); |
| if (!result.isInitialized()) { |
| throw newUninitializedMessageException(result); |
| } |
| return result; |
| } |
| |
| private org.apache.bookkeeper.proto.DataFormats.CookieFormat buildParsed() |
| throws com.google.protobuf.InvalidProtocolBufferException { |
| org.apache.bookkeeper.proto.DataFormats.CookieFormat result = buildPartial(); |
| if (!result.isInitialized()) { |
| throw newUninitializedMessageException( |
| result).asInvalidProtocolBufferException(); |
| } |
| return result; |
| } |
| |
| public org.apache.bookkeeper.proto.DataFormats.CookieFormat buildPartial() { |
| org.apache.bookkeeper.proto.DataFormats.CookieFormat result = new org.apache.bookkeeper.proto.DataFormats.CookieFormat(this); |
| int from_bitField0_ = bitField0_; |
| int to_bitField0_ = 0; |
| if (((from_bitField0_ & 0x00000001) == 0x00000001)) { |
| to_bitField0_ |= 0x00000001; |
| } |
| result.bookieHost_ = bookieHost_; |
| if (((from_bitField0_ & 0x00000002) == 0x00000002)) { |
| to_bitField0_ |= 0x00000002; |
| } |
| result.journalDir_ = journalDir_; |
| if (((from_bitField0_ & 0x00000004) == 0x00000004)) { |
| to_bitField0_ |= 0x00000004; |
| } |
| result.ledgerDirs_ = ledgerDirs_; |
| if (((from_bitField0_ & 0x00000008) == 0x00000008)) { |
| to_bitField0_ |= 0x00000008; |
| } |
| result.instanceId_ = instanceId_; |
| result.bitField0_ = to_bitField0_; |
| onBuilt(); |
| return result; |
| } |
| |
| public Builder mergeFrom(com.google.protobuf.Message other) { |
| if (other instanceof org.apache.bookkeeper.proto.DataFormats.CookieFormat) { |
| return mergeFrom((org.apache.bookkeeper.proto.DataFormats.CookieFormat)other); |
| } else { |
| super.mergeFrom(other); |
| return this; |
| } |
| } |
| |
| public Builder mergeFrom(org.apache.bookkeeper.proto.DataFormats.CookieFormat other) { |
| if (other == org.apache.bookkeeper.proto.DataFormats.CookieFormat.getDefaultInstance()) return this; |
| if (other.hasBookieHost()) { |
| setBookieHost(other.getBookieHost()); |
| } |
| if (other.hasJournalDir()) { |
| setJournalDir(other.getJournalDir()); |
| } |
| if (other.hasLedgerDirs()) { |
| setLedgerDirs(other.getLedgerDirs()); |
| } |
| if (other.hasInstanceId()) { |
| setInstanceId(other.getInstanceId()); |
| } |
| this.mergeUnknownFields(other.getUnknownFields()); |
| return this; |
| } |
| |
| public final boolean isInitialized() { |
| if (!hasBookieHost()) { |
| |
| return false; |
| } |
| if (!hasJournalDir()) { |
| |
| return false; |
| } |
| if (!hasLedgerDirs()) { |
| |
| return false; |
| } |
| return true; |
| } |
| |
| public Builder mergeFrom( |
| com.google.protobuf.CodedInputStream input, |
| com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
| throws java.io.IOException { |
| com.google.protobuf.UnknownFieldSet.Builder unknownFields = |
| com.google.protobuf.UnknownFieldSet.newBuilder( |
| this.getUnknownFields()); |
| while (true) { |
| int tag = input.readTag(); |
| switch (tag) { |
| case 0: |
| this.setUnknownFields(unknownFields.build()); |
| onChanged(); |
| return this; |
| default: { |
| if (!parseUnknownField(input, unknownFields, |
| extensionRegistry, tag)) { |
| this.setUnknownFields(unknownFields.build()); |
| onChanged(); |
| return this; |
| } |
| break; |
| } |
| case 10: { |
| bitField0_ |= 0x00000001; |
| bookieHost_ = input.readBytes(); |
| break; |
| } |
| case 18: { |
| bitField0_ |= 0x00000002; |
| journalDir_ = input.readBytes(); |
| break; |
| } |
| case 26: { |
| bitField0_ |= 0x00000004; |
| ledgerDirs_ = input.readBytes(); |
| break; |
| } |
| case 34: { |
| bitField0_ |= 0x00000008; |
| instanceId_ = input.readBytes(); |
| break; |
| } |
| } |
| } |
| } |
| |
| private int bitField0_; |
| |
| // required string bookieHost = 1; |
| private java.lang.Object bookieHost_ = ""; |
| public boolean hasBookieHost() { |
| return ((bitField0_ & 0x00000001) == 0x00000001); |
| } |
| public String getBookieHost() { |
| java.lang.Object ref = bookieHost_; |
| if (!(ref instanceof String)) { |
| String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); |
| bookieHost_ = s; |
| return s; |
| } else { |
| return (String) ref; |
| } |
| } |
| public Builder setBookieHost(String value) { |
| if (value == null) { |
| throw new NullPointerException(); |
| } |
| bitField0_ |= 0x00000001; |
| bookieHost_ = value; |
| onChanged(); |
| return this; |
| } |
| public Builder clearBookieHost() { |
| bitField0_ = (bitField0_ & ~0x00000001); |
| bookieHost_ = getDefaultInstance().getBookieHost(); |
| onChanged(); |
| return this; |
| } |
| void setBookieHost(com.google.protobuf.ByteString value) { |
| bitField0_ |= 0x00000001; |
| bookieHost_ = value; |
| onChanged(); |
| } |
| |
| // required string journalDir = 2; |
| private java.lang.Object journalDir_ = ""; |
| public boolean hasJournalDir() { |
| return ((bitField0_ & 0x00000002) == 0x00000002); |
| } |
| public String getJournalDir() { |
| java.lang.Object ref = journalDir_; |
| if (!(ref instanceof String)) { |
| String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); |
| journalDir_ = s; |
| return s; |
| } else { |
| return (String) ref; |
| } |
| } |
| public Builder setJournalDir(String value) { |
| if (value == null) { |
| throw new NullPointerException(); |
| } |
| bitField0_ |= 0x00000002; |
| journalDir_ = value; |
| onChanged(); |
| return this; |
| } |
| public Builder clearJournalDir() { |
| bitField0_ = (bitField0_ & ~0x00000002); |
| journalDir_ = getDefaultInstance().getJournalDir(); |
| onChanged(); |
| return this; |
| } |
| void setJournalDir(com.google.protobuf.ByteString value) { |
| bitField0_ |= 0x00000002; |
| journalDir_ = value; |
| onChanged(); |
| } |
| |
| // required string ledgerDirs = 3; |
| private java.lang.Object ledgerDirs_ = ""; |
| public boolean hasLedgerDirs() { |
| return ((bitField0_ & 0x00000004) == 0x00000004); |
| } |
| public String getLedgerDirs() { |
| java.lang.Object ref = ledgerDirs_; |
| if (!(ref instanceof String)) { |
| String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); |
| ledgerDirs_ = s; |
| return s; |
| } else { |
| return (String) ref; |
| } |
| } |
| public Builder setLedgerDirs(String value) { |
| if (value == null) { |
| throw new NullPointerException(); |
| } |
| bitField0_ |= 0x00000004; |
| ledgerDirs_ = value; |
| onChanged(); |
| return this; |
| } |
| public Builder clearLedgerDirs() { |
| bitField0_ = (bitField0_ & ~0x00000004); |
| ledgerDirs_ = getDefaultInstance().getLedgerDirs(); |
| onChanged(); |
| return this; |
| } |
| void setLedgerDirs(com.google.protobuf.ByteString value) { |
| bitField0_ |= 0x00000004; |
| ledgerDirs_ = value; |
| onChanged(); |
| } |
| |
| // optional string instanceId = 4; |
| private java.lang.Object instanceId_ = ""; |
| public boolean hasInstanceId() { |
| return ((bitField0_ & 0x00000008) == 0x00000008); |
| } |
| public String getInstanceId() { |
| java.lang.Object ref = instanceId_; |
| if (!(ref instanceof String)) { |
| String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); |
| instanceId_ = s; |
| return s; |
| } else { |
| return (String) ref; |
| } |
| } |
| public Builder setInstanceId(String value) { |
| if (value == null) { |
| throw new NullPointerException(); |
| } |
| bitField0_ |= 0x00000008; |
| instanceId_ = value; |
| onChanged(); |
| return this; |
| } |
| public Builder clearInstanceId() { |
| bitField0_ = (bitField0_ & ~0x00000008); |
| instanceId_ = getDefaultInstance().getInstanceId(); |
| onChanged(); |
| return this; |
| } |
| void setInstanceId(com.google.protobuf.ByteString value) { |
| bitField0_ |= 0x00000008; |
| instanceId_ = value; |
| onChanged(); |
| } |
| |
| // @@protoc_insertion_point(builder_scope:CookieFormat) |
| } |
| |
| static { |
| defaultInstance = new CookieFormat(true); |
| defaultInstance.initFields(); |
| } |
| |
| // @@protoc_insertion_point(class_scope:CookieFormat) |
| } |
| |
| public interface LockDataFormatOrBuilder |
| extends com.google.protobuf.MessageOrBuilder { |
| |
| // optional string bookieId = 1; |
| boolean hasBookieId(); |
| String getBookieId(); |
| } |
| public static final class LockDataFormat extends |
| com.google.protobuf.GeneratedMessage |
| implements LockDataFormatOrBuilder { |
| // Use LockDataFormat.newBuilder() to construct. |
| private LockDataFormat(Builder builder) { |
| super(builder); |
| } |
| private LockDataFormat(boolean noInit) {} |
| |
| private static final LockDataFormat defaultInstance; |
| public static LockDataFormat getDefaultInstance() { |
| return defaultInstance; |
| } |
| |
| public LockDataFormat getDefaultInstanceForType() { |
| return defaultInstance; |
| } |
| |
| public static final com.google.protobuf.Descriptors.Descriptor |
| getDescriptor() { |
| return org.apache.bookkeeper.proto.DataFormats.internal_static_LockDataFormat_descriptor; |
| } |
| |
| protected com.google.protobuf.GeneratedMessage.FieldAccessorTable |
| internalGetFieldAccessorTable() { |
| return org.apache.bookkeeper.proto.DataFormats.internal_static_LockDataFormat_fieldAccessorTable; |
| } |
| |
| private int bitField0_; |
| // optional string bookieId = 1; |
| public static final int BOOKIEID_FIELD_NUMBER = 1; |
| private java.lang.Object bookieId_; |
| public boolean hasBookieId() { |
| return ((bitField0_ & 0x00000001) == 0x00000001); |
| } |
| public String getBookieId() { |
| java.lang.Object ref = bookieId_; |
| if (ref instanceof String) { |
| return (String) ref; |
| } else { |
| com.google.protobuf.ByteString bs = |
| (com.google.protobuf.ByteString) ref; |
| String s = bs.toStringUtf8(); |
| if (com.google.protobuf.Internal.isValidUtf8(bs)) { |
| bookieId_ = s; |
| } |
| return s; |
| } |
| } |
| private com.google.protobuf.ByteString getBookieIdBytes() { |
| java.lang.Object ref = bookieId_; |
| if (ref instanceof String) { |
| com.google.protobuf.ByteString b = |
| com.google.protobuf.ByteString.copyFromUtf8((String) ref); |
| bookieId_ = b; |
| return b; |
| } else { |
| return (com.google.protobuf.ByteString) ref; |
| } |
| } |
| |
| private void initFields() { |
| bookieId_ = ""; |
| } |
| private byte memoizedIsInitialized = -1; |
| public final boolean isInitialized() { |
| byte isInitialized = memoizedIsInitialized; |
| if (isInitialized != -1) return isInitialized == 1; |
| |
| memoizedIsInitialized = 1; |
| return true; |
| } |
| |
| public void writeTo(com.google.protobuf.CodedOutputStream output) |
| throws java.io.IOException { |
| getSerializedSize(); |
| if (((bitField0_ & 0x00000001) == 0x00000001)) { |
| output.writeBytes(1, getBookieIdBytes()); |
| } |
| 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, getBookieIdBytes()); |
| } |
| 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.apache.bookkeeper.proto.DataFormats.LockDataFormat parseFrom( |
| com.google.protobuf.ByteString data) |
| throws com.google.protobuf.InvalidProtocolBufferException { |
| return newBuilder().mergeFrom(data).buildParsed(); |
| } |
| public static org.apache.bookkeeper.proto.DataFormats.LockDataFormat parseFrom( |
| com.google.protobuf.ByteString data, |
| com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
| throws com.google.protobuf.InvalidProtocolBufferException { |
| return newBuilder().mergeFrom(data, extensionRegistry) |
| .buildParsed(); |
| } |
| public static org.apache.bookkeeper.proto.DataFormats.LockDataFormat parseFrom(byte[] data) |
| throws com.google.protobuf.InvalidProtocolBufferException { |
| return newBuilder().mergeFrom(data).buildParsed(); |
| } |
| public static org.apache.bookkeeper.proto.DataFormats.LockDataFormat parseFrom( |
| byte[] data, |
| com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
| throws com.google.protobuf.InvalidProtocolBufferException { |
| return newBuilder().mergeFrom(data, extensionRegistry) |
| .buildParsed(); |
| } |
| public static org.apache.bookkeeper.proto.DataFormats.LockDataFormat parseFrom(java.io.InputStream input) |
| throws java.io.IOException { |
| return newBuilder().mergeFrom(input).buildParsed(); |
| } |
| public static org.apache.bookkeeper.proto.DataFormats.LockDataFormat parseFrom( |
| java.io.InputStream input, |
| com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
| throws java.io.IOException { |
| return newBuilder().mergeFrom(input, extensionRegistry) |
| .buildParsed(); |
| } |
| public static org.apache.bookkeeper.proto.DataFormats.LockDataFormat parseDelimitedFrom(java.io.InputStream input) |
| throws java.io.IOException { |
| Builder builder = newBuilder(); |
| if (builder.mergeDelimitedFrom(input)) { |
| return builder.buildParsed(); |
| } else { |
| return null; |
| } |
| } |
| public static org.apache.bookkeeper.proto.DataFormats.LockDataFormat parseDelimitedFrom( |
| java.io.InputStream input, |
| com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
| throws java.io.IOException { |
| Builder builder = newBuilder(); |
| if (builder.mergeDelimitedFrom(input, extensionRegistry)) { |
| return builder.buildParsed(); |
| } else { |
| return null; |
| } |
| } |
| public static org.apache.bookkeeper.proto.DataFormats.LockDataFormat parseFrom( |
| com.google.protobuf.CodedInputStream input) |
| throws java.io.IOException { |
| return newBuilder().mergeFrom(input).buildParsed(); |
| } |
| public static org.apache.bookkeeper.proto.DataFormats.LockDataFormat parseFrom( |
| com.google.protobuf.CodedInputStream input, |
| com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
| throws java.io.IOException { |
| return newBuilder().mergeFrom(input, extensionRegistry) |
| .buildParsed(); |
| } |
| |
| public static Builder newBuilder() { return Builder.create(); } |
| public Builder newBuilderForType() { return newBuilder(); } |
| public static Builder newBuilder(org.apache.bookkeeper.proto.DataFormats.LockDataFormat 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; |
| } |
| public static final class Builder extends |
| com.google.protobuf.GeneratedMessage.Builder<Builder> |
| implements org.apache.bookkeeper.proto.DataFormats.LockDataFormatOrBuilder { |
| public static final com.google.protobuf.Descriptors.Descriptor |
| getDescriptor() { |
| return org.apache.bookkeeper.proto.DataFormats.internal_static_LockDataFormat_descriptor; |
| } |
| |
| protected com.google.protobuf.GeneratedMessage.FieldAccessorTable |
| internalGetFieldAccessorTable() { |
| return org.apache.bookkeeper.proto.DataFormats.internal_static_LockDataFormat_fieldAccessorTable; |
| } |
| |
| // Construct using org.apache.bookkeeper.proto.DataFormats.LockDataFormat.newBuilder() |
| private Builder() { |
| maybeForceBuilderInitialization(); |
| } |
| |
| private Builder(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(); |
| bookieId_ = ""; |
| bitField0_ = (bitField0_ & ~0x00000001); |
| return this; |
| } |
| |
| public Builder clone() { |
| return create().mergeFrom(buildPartial()); |
| } |
| |
| public com.google.protobuf.Descriptors.Descriptor |
| getDescriptorForType() { |
| return org.apache.bookkeeper.proto.DataFormats.LockDataFormat.getDescriptor(); |
| } |
| |
| public org.apache.bookkeeper.proto.DataFormats.LockDataFormat getDefaultInstanceForType() { |
| return org.apache.bookkeeper.proto.DataFormats.LockDataFormat.getDefaultInstance(); |
| } |
| |
| public org.apache.bookkeeper.proto.DataFormats.LockDataFormat build() { |
| org.apache.bookkeeper.proto.DataFormats.LockDataFormat result = buildPartial(); |
| if (!result.isInitialized()) { |
| throw newUninitializedMessageException(result); |
| } |
| return result; |
| } |
| |
| private org.apache.bookkeeper.proto.DataFormats.LockDataFormat buildParsed() |
| throws com.google.protobuf.InvalidProtocolBufferException { |
| org.apache.bookkeeper.proto.DataFormats.LockDataFormat result = buildPartial(); |
| if (!result.isInitialized()) { |
| throw newUninitializedMessageException( |
| result).asInvalidProtocolBufferException(); |
| } |
| return result; |
| } |
| |
| public org.apache.bookkeeper.proto.DataFormats.LockDataFormat buildPartial() { |
| org.apache.bookkeeper.proto.DataFormats.LockDataFormat result = new org.apache.bookkeeper.proto.DataFormats.LockDataFormat(this); |
| int from_bitField0_ = bitField0_; |
| int to_bitField0_ = 0; |
| if (((from_bitField0_ & 0x00000001) == 0x00000001)) { |
| to_bitField0_ |= 0x00000001; |
| } |
| result.bookieId_ = bookieId_; |
| result.bitField0_ = to_bitField0_; |
| onBuilt(); |
| return result; |
| } |
| |
| public Builder mergeFrom(com.google.protobuf.Message other) { |
| if (other instanceof org.apache.bookkeeper.proto.DataFormats.LockDataFormat) { |
| return mergeFrom((org.apache.bookkeeper.proto.DataFormats.LockDataFormat)other); |
| } else { |
| super.mergeFrom(other); |
| return this; |
| } |
| } |
| |
| public Builder mergeFrom(org.apache.bookkeeper.proto.DataFormats.LockDataFormat other) { |
| if (other == org.apache.bookkeeper.proto.DataFormats.LockDataFormat.getDefaultInstance()) return this; |
| if (other.hasBookieId()) { |
| setBookieId(other.getBookieId()); |
| } |
| this.mergeUnknownFields(other.getUnknownFields()); |
| return this; |
| } |
| |
| public final boolean isInitialized() { |
| return true; |
| } |
| |
| public Builder mergeFrom( |
| com.google.protobuf.CodedInputStream input, |
| com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
| throws java.io.IOException { |
| com.google.protobuf.UnknownFieldSet.Builder unknownFields = |
| com.google.protobuf.UnknownFieldSet.newBuilder( |
| this.getUnknownFields()); |
| while (true) { |
| int tag = input.readTag(); |
| switch (tag) { |
| case 0: |
| this.setUnknownFields(unknownFields.build()); |
| onChanged(); |
| return this; |
| default: { |
| if (!parseUnknownField(input, unknownFields, |
| extensionRegistry, tag)) { |
| this.setUnknownFields(unknownFields.build()); |
| onChanged(); |
| return this; |
| } |
| break; |
| } |
| case 10: { |
| bitField0_ |= 0x00000001; |
| bookieId_ = input.readBytes(); |
| break; |
| } |
| } |
| } |
| } |
| |
| private int bitField0_; |
| |
| // optional string bookieId = 1; |
| private java.lang.Object bookieId_ = ""; |
| public boolean hasBookieId() { |
| return ((bitField0_ & 0x00000001) == 0x00000001); |
| } |
| public String getBookieId() { |
| java.lang.Object ref = bookieId_; |
| if (!(ref instanceof String)) { |
| String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); |
| bookieId_ = s; |
| return s; |
| } else { |
| return (String) ref; |
| } |
| } |
| public Builder setBookieId(String value) { |
| if (value == null) { |
| throw new NullPointerException(); |
| } |
| bitField0_ |= 0x00000001; |
| bookieId_ = value; |
| onChanged(); |
| return this; |
| } |
| public Builder clearBookieId() { |
| bitField0_ = (bitField0_ & ~0x00000001); |
| bookieId_ = getDefaultInstance().getBookieId(); |
| onChanged(); |
| return this; |
| } |
| void setBookieId(com.google.protobuf.ByteString value) { |
| bitField0_ |= 0x00000001; |
| bookieId_ = value; |
| onChanged(); |
| } |
| |
| // @@protoc_insertion_point(builder_scope:LockDataFormat) |
| } |
| |
| static { |
| defaultInstance = new LockDataFormat(true); |
| defaultInstance.initFields(); |
| } |
| |
| // @@protoc_insertion_point(class_scope:LockDataFormat) |
| } |
| |
| public interface AuditorVoteFormatOrBuilder |
| extends com.google.protobuf.MessageOrBuilder { |
| |
| // optional string bookieId = 1; |
| boolean hasBookieId(); |
| String getBookieId(); |
| } |
| public static final class AuditorVoteFormat extends |
| com.google.protobuf.GeneratedMessage |
| implements AuditorVoteFormatOrBuilder { |
| // Use AuditorVoteFormat.newBuilder() to construct. |
| private AuditorVoteFormat(Builder builder) { |
| super(builder); |
| } |
| private AuditorVoteFormat(boolean noInit) {} |
| |
| private static final AuditorVoteFormat defaultInstance; |
| public static AuditorVoteFormat getDefaultInstance() { |
| return defaultInstance; |
| } |
| |
| public AuditorVoteFormat getDefaultInstanceForType() { |
| return defaultInstance; |
| } |
| |
| public static final com.google.protobuf.Descriptors.Descriptor |
| getDescriptor() { |
| return org.apache.bookkeeper.proto.DataFormats.internal_static_AuditorVoteFormat_descriptor; |
| } |
| |
| protected com.google.protobuf.GeneratedMessage.FieldAccessorTable |
| internalGetFieldAccessorTable() { |
| return org.apache.bookkeeper.proto.DataFormats.internal_static_AuditorVoteFormat_fieldAccessorTable; |
| } |
| |
| private int bitField0_; |
| // optional string bookieId = 1; |
| public static final int BOOKIEID_FIELD_NUMBER = 1; |
| private java.lang.Object bookieId_; |
| public boolean hasBookieId() { |
| return ((bitField0_ & 0x00000001) == 0x00000001); |
| } |
| public String getBookieId() { |
| java.lang.Object ref = bookieId_; |
| if (ref instanceof String) { |
| return (String) ref; |
| } else { |
| com.google.protobuf.ByteString bs = |
| (com.google.protobuf.ByteString) ref; |
| String s = bs.toStringUtf8(); |
| if (com.google.protobuf.Internal.isValidUtf8(bs)) { |
| bookieId_ = s; |
| } |
| return s; |
| } |
| } |
| private com.google.protobuf.ByteString getBookieIdBytes() { |
| java.lang.Object ref = bookieId_; |
| if (ref instanceof String) { |
| com.google.protobuf.ByteString b = |
| com.google.protobuf.ByteString.copyFromUtf8((String) ref); |
| bookieId_ = b; |
| return b; |
| } else { |
| return (com.google.protobuf.ByteString) ref; |
| } |
| } |
| |
| private void initFields() { |
| bookieId_ = ""; |
| } |
| private byte memoizedIsInitialized = -1; |
| public final boolean isInitialized() { |
| byte isInitialized = memoizedIsInitialized; |
| if (isInitialized != -1) return isInitialized == 1; |
| |
| memoizedIsInitialized = 1; |
| return true; |
| } |
| |
| public void writeTo(com.google.protobuf.CodedOutputStream output) |
| throws java.io.IOException { |
| getSerializedSize(); |
| if (((bitField0_ & 0x00000001) == 0x00000001)) { |
| output.writeBytes(1, getBookieIdBytes()); |
| } |
| 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, getBookieIdBytes()); |
| } |
| 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.apache.bookkeeper.proto.DataFormats.AuditorVoteFormat parseFrom( |
| com.google.protobuf.ByteString data) |
| throws com.google.protobuf.InvalidProtocolBufferException { |
| return newBuilder().mergeFrom(data).buildParsed(); |
| } |
| public static org.apache.bookkeeper.proto.DataFormats.AuditorVoteFormat parseFrom( |
| com.google.protobuf.ByteString data, |
| com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
| throws com.google.protobuf.InvalidProtocolBufferException { |
| return newBuilder().mergeFrom(data, extensionRegistry) |
| .buildParsed(); |
| } |
| public static org.apache.bookkeeper.proto.DataFormats.AuditorVoteFormat parseFrom(byte[] data) |
| throws com.google.protobuf.InvalidProtocolBufferException { |
| return newBuilder().mergeFrom(data).buildParsed(); |
| } |
| public static org.apache.bookkeeper.proto.DataFormats.AuditorVoteFormat parseFrom( |
| byte[] data, |
| com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
| throws com.google.protobuf.InvalidProtocolBufferException { |
| return newBuilder().mergeFrom(data, extensionRegistry) |
| .buildParsed(); |
| } |
| public static org.apache.bookkeeper.proto.DataFormats.AuditorVoteFormat parseFrom(java.io.InputStream input) |
| throws java.io.IOException { |
| return newBuilder().mergeFrom(input).buildParsed(); |
| } |
| public static org.apache.bookkeeper.proto.DataFormats.AuditorVoteFormat parseFrom( |
| java.io.InputStream input, |
| com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
| throws java.io.IOException { |
| return newBuilder().mergeFrom(input, extensionRegistry) |
| .buildParsed(); |
| } |
| public static org.apache.bookkeeper.proto.DataFormats.AuditorVoteFormat parseDelimitedFrom(java.io.InputStream input) |
| throws java.io.IOException { |
| Builder builder = newBuilder(); |
| if (builder.mergeDelimitedFrom(input)) { |
| return builder.buildParsed(); |
| } else { |
| return null; |
| } |
| } |
| public static org.apache.bookkeeper.proto.DataFormats.AuditorVoteFormat parseDelimitedFrom( |
| java.io.InputStream input, |
| com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
| throws java.io.IOException { |
| Builder builder = newBuilder(); |
| if (builder.mergeDelimitedFrom(input, extensionRegistry)) { |
| return builder.buildParsed(); |
| } else { |
| return null; |
| } |
| } |
| public static org.apache.bookkeeper.proto.DataFormats.AuditorVoteFormat parseFrom( |
| com.google.protobuf.CodedInputStream input) |
| throws java.io.IOException { |
| return newBuilder().mergeFrom(input).buildParsed(); |
| } |
| public static org.apache.bookkeeper.proto.DataFormats.AuditorVoteFormat parseFrom( |
| com.google.protobuf.CodedInputStream input, |
| com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
| throws java.io.IOException { |
| return newBuilder().mergeFrom(input, extensionRegistry) |
| .buildParsed(); |
| } |
| |
| public static Builder newBuilder() { return Builder.create(); } |
| public Builder newBuilderForType() { return newBuilder(); } |
| public static Builder newBuilder(org.apache.bookkeeper.proto.DataFormats.AuditorVoteFormat 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; |
| } |
| public static final class Builder extends |
| com.google.protobuf.GeneratedMessage.Builder<Builder> |
| implements org.apache.bookkeeper.proto.DataFormats.AuditorVoteFormatOrBuilder { |
| public static final com.google.protobuf.Descriptors.Descriptor |
| getDescriptor() { |
| return org.apache.bookkeeper.proto.DataFormats.internal_static_AuditorVoteFormat_descriptor; |
| } |
| |
| protected com.google.protobuf.GeneratedMessage.FieldAccessorTable |
| internalGetFieldAccessorTable() { |
| return org.apache.bookkeeper.proto.DataFormats.internal_static_AuditorVoteFormat_fieldAccessorTable; |
| } |
| |
| // Construct using org.apache.bookkeeper.proto.DataFormats.AuditorVoteFormat.newBuilder() |
| private Builder() { |
| maybeForceBuilderInitialization(); |
| } |
| |
| private Builder(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(); |
| bookieId_ = ""; |
| bitField0_ = (bitField0_ & ~0x00000001); |
| return this; |
| } |
| |
| public Builder clone() { |
| return create().mergeFrom(buildPartial()); |
| } |
| |
| public com.google.protobuf.Descriptors.Descriptor |
| getDescriptorForType() { |
| return org.apache.bookkeeper.proto.DataFormats.AuditorVoteFormat.getDescriptor(); |
| } |
| |
| public org.apache.bookkeeper.proto.DataFormats.AuditorVoteFormat getDefaultInstanceForType() { |
| return org.apache.bookkeeper.proto.DataFormats.AuditorVoteFormat.getDefaultInstance(); |
| } |
| |
| public org.apache.bookkeeper.proto.DataFormats.AuditorVoteFormat build() { |
| org.apache.bookkeeper.proto.DataFormats.AuditorVoteFormat result = buildPartial(); |
| if (!result.isInitialized()) { |
| throw newUninitializedMessageException(result); |
| } |
| return result; |
| } |
| |
| private org.apache.bookkeeper.proto.DataFormats.AuditorVoteFormat buildParsed() |
| throws com.google.protobuf.InvalidProtocolBufferException { |
| org.apache.bookkeeper.proto.DataFormats.AuditorVoteFormat result = buildPartial(); |
| if (!result.isInitialized()) { |
| throw newUninitializedMessageException( |
| result).asInvalidProtocolBufferException(); |
| } |
| return result; |
| } |
| |
| public org.apache.bookkeeper.proto.DataFormats.AuditorVoteFormat buildPartial() { |
| org.apache.bookkeeper.proto.DataFormats.AuditorVoteFormat result = new org.apache.bookkeeper.proto.DataFormats.AuditorVoteFormat(this); |
| int from_bitField0_ = bitField0_; |
| int to_bitField0_ = 0; |
| if (((from_bitField0_ & 0x00000001) == 0x00000001)) { |
| to_bitField0_ |= 0x00000001; |
| } |
| result.bookieId_ = bookieId_; |
| result.bitField0_ = to_bitField0_; |
| onBuilt(); |
| return result; |
| } |
| |
| public Builder mergeFrom(com.google.protobuf.Message other) { |
| if (other instanceof org.apache.bookkeeper.proto.DataFormats.AuditorVoteFormat) { |
| return mergeFrom((org.apache.bookkeeper.proto.DataFormats.AuditorVoteFormat)other); |
| } else { |
| super.mergeFrom(other); |
| return this; |
| } |
| } |
| |
| public Builder mergeFrom(org.apache.bookkeeper.proto.DataFormats.AuditorVoteFormat other) { |
| if (other == org.apache.bookkeeper.proto.DataFormats.AuditorVoteFormat.getDefaultInstance()) return this; |
| if (other.hasBookieId()) { |
| setBookieId(other.getBookieId()); |
| } |
| this.mergeUnknownFields(other.getUnknownFields()); |
| return this; |
| } |
| |
| public final boolean isInitialized() { |
| return true; |
| } |
| |
| public Builder mergeFrom( |
| com.google.protobuf.CodedInputStream input, |
| com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
| throws java.io.IOException { |
| com.google.protobuf.UnknownFieldSet.Builder unknownFields = |
| com.google.protobuf.UnknownFieldSet.newBuilder( |
| this.getUnknownFields()); |
| while (true) { |
| int tag = input.readTag(); |
| switch (tag) { |
| case 0: |
| this.setUnknownFields(unknownFields.build()); |
| onChanged(); |
| return this; |
| default: { |
| if (!parseUnknownField(input, unknownFields, |
| extensionRegistry, tag)) { |
| this.setUnknownFields(unknownFields.build()); |
| onChanged(); |
| return this; |
| } |
| break; |
| } |
| case 10: { |
| bitField0_ |= 0x00000001; |
| bookieId_ = input.readBytes(); |
| break; |
| } |
| } |
| } |
| } |
| |
| private int bitField0_; |
| |
| // optional string bookieId = 1; |
| private java.lang.Object bookieId_ = ""; |
| public boolean hasBookieId() { |
| return ((bitField0_ & 0x00000001) == 0x00000001); |
| } |
| public String getBookieId() { |
| java.lang.Object ref = bookieId_; |
| if (!(ref instanceof String)) { |
| String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); |
| bookieId_ = s; |
| return s; |
| } else { |
| return (String) ref; |
| } |
| } |
| public Builder setBookieId(String value) { |
| if (value == null) { |
| throw new NullPointerException(); |
| } |
| bitField0_ |= 0x00000001; |
| bookieId_ = value; |
| onChanged(); |
| return this; |
| } |
| public Builder clearBookieId() { |
| bitField0_ = (bitField0_ & ~0x00000001); |
| bookieId_ = getDefaultInstance().getBookieId(); |
| onChanged(); |
| return this; |
| } |
| void setBookieId(com.google.protobuf.ByteString value) { |
| bitField0_ |= 0x00000001; |
| bookieId_ = value; |
| onChanged(); |
| } |
| |
| // @@protoc_insertion_point(builder_scope:AuditorVoteFormat) |
| } |
| |
| static { |
| defaultInstance = new AuditorVoteFormat(true); |
| defaultInstance.initFields(); |
| } |
| |
| // @@protoc_insertion_point(class_scope:AuditorVoteFormat) |
| } |
| |
| private static com.google.protobuf.Descriptors.Descriptor |
| internal_static_LedgerMetadataFormat_descriptor; |
| private static |
| com.google.protobuf.GeneratedMessage.FieldAccessorTable |
| internal_static_LedgerMetadataFormat_fieldAccessorTable; |
| private static com.google.protobuf.Descriptors.Descriptor |
| internal_static_LedgerMetadataFormat_Segment_descriptor; |
| private static |
| com.google.protobuf.GeneratedMessage.FieldAccessorTable |
| internal_static_LedgerMetadataFormat_Segment_fieldAccessorTable; |
| private static com.google.protobuf.Descriptors.Descriptor |
| internal_static_LedgerRereplicationLayoutFormat_descriptor; |
| private static |
| com.google.protobuf.GeneratedMessage.FieldAccessorTable |
| internal_static_LedgerRereplicationLayoutFormat_fieldAccessorTable; |
| private static com.google.protobuf.Descriptors.Descriptor |
| internal_static_UnderreplicatedLedgerFormat_descriptor; |
| private static |
| com.google.protobuf.GeneratedMessage.FieldAccessorTable |
| internal_static_UnderreplicatedLedgerFormat_fieldAccessorTable; |
| private static com.google.protobuf.Descriptors.Descriptor |
| internal_static_CookieFormat_descriptor; |
| private static |
| com.google.protobuf.GeneratedMessage.FieldAccessorTable |
| internal_static_CookieFormat_fieldAccessorTable; |
| private static com.google.protobuf.Descriptors.Descriptor |
| internal_static_LockDataFormat_descriptor; |
| private static |
| com.google.protobuf.GeneratedMessage.FieldAccessorTable |
| internal_static_LockDataFormat_fieldAccessorTable; |
| private static com.google.protobuf.Descriptors.Descriptor |
| internal_static_AuditorVoteFormat_descriptor; |
| private static |
| com.google.protobuf.GeneratedMessage.FieldAccessorTable |
| internal_static_AuditorVoteFormat_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 src/main/proto/DataFormats.proto\"\262\003\n\024L" + |
| "edgerMetadataFormat\022\022\n\nquorumSize\030\001 \002(\005\022" + |
| "\024\n\014ensembleSize\030\002 \002(\005\022\016\n\006length\030\003 \002(\003\022\023\n" + |
| "\013lastEntryId\030\004 \001(\003\0220\n\005state\030\005 \002(\0162\033.Ledg" + |
| "erMetadataFormat.State:\004OPEN\022.\n\007segment\030" + |
| "\006 \003(\0132\035.LedgerMetadataFormat.Segment\0224\n\n" + |
| "digestType\030\007 \001(\0162 .LedgerMetadataFormat." + |
| "DigestType\022\020\n\010password\030\010 \001(\014\022\025\n\rackQuoru" + |
| "mSize\030\t \001(\005\0327\n\007Segment\022\026\n\016ensembleMember" + |
| "\030\001 \003(\t\022\024\n\014firstEntryId\030\002 \002(\003\".\n\005State\022\010\n", |
| "\004OPEN\020\001\022\017\n\013IN_RECOVERY\020\002\022\n\n\006CLOSED\020\003\"!\n\n" + |
| "DigestType\022\t\n\005CRC32\020\001\022\010\n\004HMAC\020\002\"@\n\037Ledge" + |
| "rRereplicationLayoutFormat\022\014\n\004type\030\001 \002(\t" + |
| "\022\017\n\007version\030\002 \002(\005\".\n\033UnderreplicatedLedg" + |
| "erFormat\022\017\n\007replica\030\001 \003(\t\"^\n\014CookieForma" + |
| "t\022\022\n\nbookieHost\030\001 \002(\t\022\022\n\njournalDir\030\002 \002(" + |
| "\t\022\022\n\nledgerDirs\030\003 \002(\t\022\022\n\ninstanceId\030\004 \001(" + |
| "\t\"\"\n\016LockDataFormat\022\020\n\010bookieId\030\001 \001(\t\"%\n" + |
| "\021AuditorVoteFormat\022\020\n\010bookieId\030\001 \001(\tB\037\n\033" + |
| "org.apache.bookkeeper.protoH\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; |
| internal_static_LedgerMetadataFormat_descriptor = |
| getDescriptor().getMessageTypes().get(0); |
| internal_static_LedgerMetadataFormat_fieldAccessorTable = new |
| com.google.protobuf.GeneratedMessage.FieldAccessorTable( |
| internal_static_LedgerMetadataFormat_descriptor, |
| new java.lang.String[] { "QuorumSize", "EnsembleSize", "Length", "LastEntryId", "State", "Segment", "DigestType", "Password", "AckQuorumSize", }, |
| org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.class, |
| org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.Builder.class); |
| internal_static_LedgerMetadataFormat_Segment_descriptor = |
| internal_static_LedgerMetadataFormat_descriptor.getNestedTypes().get(0); |
| internal_static_LedgerMetadataFormat_Segment_fieldAccessorTable = new |
| com.google.protobuf.GeneratedMessage.FieldAccessorTable( |
| internal_static_LedgerMetadataFormat_Segment_descriptor, |
| new java.lang.String[] { "EnsembleMember", "FirstEntryId", }, |
| org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.Segment.class, |
| org.apache.bookkeeper.proto.DataFormats.LedgerMetadataFormat.Segment.Builder.class); |
| internal_static_LedgerRereplicationLayoutFormat_descriptor = |
| getDescriptor().getMessageTypes().get(1); |
| internal_static_LedgerRereplicationLayoutFormat_fieldAccessorTable = new |
| com.google.protobuf.GeneratedMessage.FieldAccessorTable( |
| internal_static_LedgerRereplicationLayoutFormat_descriptor, |
| new java.lang.String[] { "Type", "Version", }, |
| org.apache.bookkeeper.proto.DataFormats.LedgerRereplicationLayoutFormat.class, |
| org.apache.bookkeeper.proto.DataFormats.LedgerRereplicationLayoutFormat.Builder.class); |
| internal_static_UnderreplicatedLedgerFormat_descriptor = |
| getDescriptor().getMessageTypes().get(2); |
| internal_static_UnderreplicatedLedgerFormat_fieldAccessorTable = new |
| com.google.protobuf.GeneratedMessage.FieldAccessorTable( |
| internal_static_UnderreplicatedLedgerFormat_descriptor, |
| new java.lang.String[] { "Replica", }, |
| org.apache.bookkeeper.proto.DataFormats.UnderreplicatedLedgerFormat.class, |
| org.apache.bookkeeper.proto.DataFormats.UnderreplicatedLedgerFormat.Builder.class); |
| internal_static_CookieFormat_descriptor = |
| getDescriptor().getMessageTypes().get(3); |
| internal_static_CookieFormat_fieldAccessorTable = new |
| com.google.protobuf.GeneratedMessage.FieldAccessorTable( |
| internal_static_CookieFormat_descriptor, |
| new java.lang.String[] { "BookieHost", "JournalDir", "LedgerDirs", "InstanceId", }, |
| org.apache.bookkeeper.proto.DataFormats.CookieFormat.class, |
| org.apache.bookkeeper.proto.DataFormats.CookieFormat.Builder.class); |
| internal_static_LockDataFormat_descriptor = |
| getDescriptor().getMessageTypes().get(4); |
| internal_static_LockDataFormat_fieldAccessorTable = new |
| com.google.protobuf.GeneratedMessage.FieldAccessorTable( |
| internal_static_LockDataFormat_descriptor, |
| new java.lang.String[] { "BookieId", }, |
| org.apache.bookkeeper.proto.DataFormats.LockDataFormat.class, |
| org.apache.bookkeeper.proto.DataFormats.LockDataFormat.Builder.class); |
| internal_static_AuditorVoteFormat_descriptor = |
| getDescriptor().getMessageTypes().get(5); |
| internal_static_AuditorVoteFormat_fieldAccessorTable = new |
| com.google.protobuf.GeneratedMessage.FieldAccessorTable( |
| internal_static_AuditorVoteFormat_descriptor, |
| new java.lang.String[] { "BookieId", }, |
| org.apache.bookkeeper.proto.DataFormats.AuditorVoteFormat.class, |
| org.apache.bookkeeper.proto.DataFormats.AuditorVoteFormat.Builder.class); |
| return null; |
| } |
| }; |
| com.google.protobuf.Descriptors.FileDescriptor |
| .internalBuildGeneratedFileFrom(descriptorData, |
| new com.google.protobuf.Descriptors.FileDescriptor[] { |
| }, assigner); |
| } |
| |
| // @@protoc_insertion_point(outer_class_scope) |
| } |