zookeeper-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From f..@apache.org
Subject svn commit: r1613315 [2/4] - in /zookeeper/bookkeeper/trunk: ./ bookkeeper-server/ bookkeeper-server/src/main/java/org/apache/bookkeeper/client/ bookkeeper-server/src/main/java/org/apache/bookkeeper/processor/ bookkeeper-server/src/main/java/org/apache...
Date Thu, 24 Jul 2014 22:34:20 GMT
Added: zookeeper/bookkeeper/trunk/bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/BookkeeperProtocol.java
URL: http://svn.apache.org/viewvc/zookeeper/bookkeeper/trunk/bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/BookkeeperProtocol.java?rev=1613315&view=auto
==============================================================================
--- zookeeper/bookkeeper/trunk/bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/BookkeeperProtocol.java (added)
+++ zookeeper/bookkeeper/trunk/bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/BookkeeperProtocol.java Thu Jul 24 22:34:19 2014
@@ -0,0 +1,4774 @@
+// Generated by the protocol buffer compiler.  DO NOT EDIT!
+// source: src/main/proto/BookkeeperProtocol.proto
+
+package org.apache.bookkeeper.proto;
+
+public final class BookkeeperProtocol {
+  private BookkeeperProtocol() {}
+  public static void registerAllExtensions(
+      com.google.protobuf.ExtensionRegistry registry) {
+  }
+  public enum ProtocolVersion
+      implements com.google.protobuf.ProtocolMessageEnum {
+    VERSION_ONE(0, 1),
+    VERSION_TWO(1, 2),
+    VERSION_THREE(2, 3),
+    ;
+    
+    public static final int VERSION_ONE_VALUE = 1;
+    public static final int VERSION_TWO_VALUE = 2;
+    public static final int VERSION_THREE_VALUE = 3;
+    
+    
+    public final int getNumber() { return value; }
+    
+    public static ProtocolVersion valueOf(int value) {
+      switch (value) {
+        case 1: return VERSION_ONE;
+        case 2: return VERSION_TWO;
+        case 3: return VERSION_THREE;
+        default: return null;
+      }
+    }
+    
+    public static com.google.protobuf.Internal.EnumLiteMap<ProtocolVersion>
+        internalGetValueMap() {
+      return internalValueMap;
+    }
+    private static com.google.protobuf.Internal.EnumLiteMap<ProtocolVersion>
+        internalValueMap =
+          new com.google.protobuf.Internal.EnumLiteMap<ProtocolVersion>() {
+            public ProtocolVersion findValueByNumber(int number) {
+              return ProtocolVersion.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.BookkeeperProtocol.getDescriptor().getEnumTypes().get(0);
+    }
+    
+    private static final ProtocolVersion[] VALUES = {
+      VERSION_ONE, VERSION_TWO, VERSION_THREE, 
+    };
+    
+    public static ProtocolVersion 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 ProtocolVersion(int index, int value) {
+      this.index = index;
+      this.value = value;
+    }
+    
+    // @@protoc_insertion_point(enum_scope:ProtocolVersion)
+  }
+  
+  public enum StatusCode
+      implements com.google.protobuf.ProtocolMessageEnum {
+    EOK(0, 0),
+    ENOLEDGER(1, 402),
+    ENOENTRY(2, 403),
+    EBADREQ(3, 404),
+    EIO(4, 501),
+    EUA(5, 502),
+    EBADVERSION(6, 503),
+    EFENCED(7, 504),
+    EREADONLY(8, 505),
+    ;
+    
+    public static final int EOK_VALUE = 0;
+    public static final int ENOLEDGER_VALUE = 402;
+    public static final int ENOENTRY_VALUE = 403;
+    public static final int EBADREQ_VALUE = 404;
+    public static final int EIO_VALUE = 501;
+    public static final int EUA_VALUE = 502;
+    public static final int EBADVERSION_VALUE = 503;
+    public static final int EFENCED_VALUE = 504;
+    public static final int EREADONLY_VALUE = 505;
+    
+    
+    public final int getNumber() { return value; }
+    
+    public static StatusCode valueOf(int value) {
+      switch (value) {
+        case 0: return EOK;
+        case 402: return ENOLEDGER;
+        case 403: return ENOENTRY;
+        case 404: return EBADREQ;
+        case 501: return EIO;
+        case 502: return EUA;
+        case 503: return EBADVERSION;
+        case 504: return EFENCED;
+        case 505: return EREADONLY;
+        default: return null;
+      }
+    }
+    
+    public static com.google.protobuf.Internal.EnumLiteMap<StatusCode>
+        internalGetValueMap() {
+      return internalValueMap;
+    }
+    private static com.google.protobuf.Internal.EnumLiteMap<StatusCode>
+        internalValueMap =
+          new com.google.protobuf.Internal.EnumLiteMap<StatusCode>() {
+            public StatusCode findValueByNumber(int number) {
+              return StatusCode.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.BookkeeperProtocol.getDescriptor().getEnumTypes().get(1);
+    }
+    
+    private static final StatusCode[] VALUES = {
+      EOK, ENOLEDGER, ENOENTRY, EBADREQ, EIO, EUA, EBADVERSION, EFENCED, EREADONLY, 
+    };
+    
+    public static StatusCode 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 StatusCode(int index, int value) {
+      this.index = index;
+      this.value = value;
+    }
+    
+    // @@protoc_insertion_point(enum_scope:StatusCode)
+  }
+  
+  public enum OperationType
+      implements com.google.protobuf.ProtocolMessageEnum {
+    READ_ENTRY(0, 1),
+    ADD_ENTRY(1, 2),
+    RANGE_READ_ENTRY(2, 3),
+    RANGE_ADD_ENTRY(3, 4),
+    ;
+    
+    public static final int READ_ENTRY_VALUE = 1;
+    public static final int ADD_ENTRY_VALUE = 2;
+    public static final int RANGE_READ_ENTRY_VALUE = 3;
+    public static final int RANGE_ADD_ENTRY_VALUE = 4;
+    
+    
+    public final int getNumber() { return value; }
+    
+    public static OperationType valueOf(int value) {
+      switch (value) {
+        case 1: return READ_ENTRY;
+        case 2: return ADD_ENTRY;
+        case 3: return RANGE_READ_ENTRY;
+        case 4: return RANGE_ADD_ENTRY;
+        default: return null;
+      }
+    }
+    
+    public static com.google.protobuf.Internal.EnumLiteMap<OperationType>
+        internalGetValueMap() {
+      return internalValueMap;
+    }
+    private static com.google.protobuf.Internal.EnumLiteMap<OperationType>
+        internalValueMap =
+          new com.google.protobuf.Internal.EnumLiteMap<OperationType>() {
+            public OperationType findValueByNumber(int number) {
+              return OperationType.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.BookkeeperProtocol.getDescriptor().getEnumTypes().get(2);
+    }
+    
+    private static final OperationType[] VALUES = {
+      READ_ENTRY, ADD_ENTRY, RANGE_READ_ENTRY, RANGE_ADD_ENTRY, 
+    };
+    
+    public static OperationType 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 OperationType(int index, int value) {
+      this.index = index;
+      this.value = value;
+    }
+    
+    // @@protoc_insertion_point(enum_scope:OperationType)
+  }
+  
+  public interface BKPacketHeaderOrBuilder
+      extends com.google.protobuf.MessageOrBuilder {
+    
+    // required .ProtocolVersion version = 1;
+    boolean hasVersion();
+    org.apache.bookkeeper.proto.BookkeeperProtocol.ProtocolVersion getVersion();
+    
+    // required .OperationType operation = 2;
+    boolean hasOperation();
+    org.apache.bookkeeper.proto.BookkeeperProtocol.OperationType getOperation();
+    
+    // required uint64 txnId = 3;
+    boolean hasTxnId();
+    long getTxnId();
+  }
+  public static final class BKPacketHeader extends
+      com.google.protobuf.GeneratedMessage
+      implements BKPacketHeaderOrBuilder {
+    // Use BKPacketHeader.newBuilder() to construct.
+    private BKPacketHeader(Builder builder) {
+      super(builder);
+    }
+    private BKPacketHeader(boolean noInit) {}
+    
+    private static final BKPacketHeader defaultInstance;
+    public static BKPacketHeader getDefaultInstance() {
+      return defaultInstance;
+    }
+    
+    public BKPacketHeader getDefaultInstanceForType() {
+      return defaultInstance;
+    }
+    
+    public static final com.google.protobuf.Descriptors.Descriptor
+        getDescriptor() {
+      return org.apache.bookkeeper.proto.BookkeeperProtocol.internal_static_BKPacketHeader_descriptor;
+    }
+    
+    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+        internalGetFieldAccessorTable() {
+      return org.apache.bookkeeper.proto.BookkeeperProtocol.internal_static_BKPacketHeader_fieldAccessorTable;
+    }
+    
+    private int bitField0_;
+    // required .ProtocolVersion version = 1;
+    public static final int VERSION_FIELD_NUMBER = 1;
+    private org.apache.bookkeeper.proto.BookkeeperProtocol.ProtocolVersion version_;
+    public boolean hasVersion() {
+      return ((bitField0_ & 0x00000001) == 0x00000001);
+    }
+    public org.apache.bookkeeper.proto.BookkeeperProtocol.ProtocolVersion getVersion() {
+      return version_;
+    }
+    
+    // required .OperationType operation = 2;
+    public static final int OPERATION_FIELD_NUMBER = 2;
+    private org.apache.bookkeeper.proto.BookkeeperProtocol.OperationType operation_;
+    public boolean hasOperation() {
+      return ((bitField0_ & 0x00000002) == 0x00000002);
+    }
+    public org.apache.bookkeeper.proto.BookkeeperProtocol.OperationType getOperation() {
+      return operation_;
+    }
+    
+    // required uint64 txnId = 3;
+    public static final int TXNID_FIELD_NUMBER = 3;
+    private long txnId_;
+    public boolean hasTxnId() {
+      return ((bitField0_ & 0x00000004) == 0x00000004);
+    }
+    public long getTxnId() {
+      return txnId_;
+    }
+    
+    private void initFields() {
+      version_ = org.apache.bookkeeper.proto.BookkeeperProtocol.ProtocolVersion.VERSION_ONE;
+      operation_ = org.apache.bookkeeper.proto.BookkeeperProtocol.OperationType.READ_ENTRY;
+      txnId_ = 0L;
+    }
+    private byte memoizedIsInitialized = -1;
+    public final boolean isInitialized() {
+      byte isInitialized = memoizedIsInitialized;
+      if (isInitialized != -1) return isInitialized == 1;
+      
+      if (!hasVersion()) {
+        memoizedIsInitialized = 0;
+        return false;
+      }
+      if (!hasOperation()) {
+        memoizedIsInitialized = 0;
+        return false;
+      }
+      if (!hasTxnId()) {
+        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.writeEnum(1, version_.getNumber());
+      }
+      if (((bitField0_ & 0x00000002) == 0x00000002)) {
+        output.writeEnum(2, operation_.getNumber());
+      }
+      if (((bitField0_ & 0x00000004) == 0x00000004)) {
+        output.writeUInt64(3, txnId_);
+      }
+      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
+          .computeEnumSize(1, version_.getNumber());
+      }
+      if (((bitField0_ & 0x00000002) == 0x00000002)) {
+        size += com.google.protobuf.CodedOutputStream
+          .computeEnumSize(2, operation_.getNumber());
+      }
+      if (((bitField0_ & 0x00000004) == 0x00000004)) {
+        size += com.google.protobuf.CodedOutputStream
+          .computeUInt64Size(3, txnId_);
+      }
+      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.BookkeeperProtocol.BKPacketHeader parseFrom(
+        com.google.protobuf.ByteString data)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      return newBuilder().mergeFrom(data).buildParsed();
+    }
+    public static org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader 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.BookkeeperProtocol.BKPacketHeader parseFrom(byte[] data)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      return newBuilder().mergeFrom(data).buildParsed();
+    }
+    public static org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader 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.BookkeeperProtocol.BKPacketHeader parseFrom(java.io.InputStream input)
+        throws java.io.IOException {
+      return newBuilder().mergeFrom(input).buildParsed();
+    }
+    public static org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader 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.BookkeeperProtocol.BKPacketHeader 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.BookkeeperProtocol.BKPacketHeader 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.BookkeeperProtocol.BKPacketHeader parseFrom(
+        com.google.protobuf.CodedInputStream input)
+        throws java.io.IOException {
+      return newBuilder().mergeFrom(input).buildParsed();
+    }
+    public static org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader 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.BookkeeperProtocol.BKPacketHeader 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.BookkeeperProtocol.BKPacketHeaderOrBuilder {
+      public static final com.google.protobuf.Descriptors.Descriptor
+          getDescriptor() {
+        return org.apache.bookkeeper.proto.BookkeeperProtocol.internal_static_BKPacketHeader_descriptor;
+      }
+      
+      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+          internalGetFieldAccessorTable() {
+        return org.apache.bookkeeper.proto.BookkeeperProtocol.internal_static_BKPacketHeader_fieldAccessorTable;
+      }
+      
+      // Construct using org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader.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();
+        version_ = org.apache.bookkeeper.proto.BookkeeperProtocol.ProtocolVersion.VERSION_ONE;
+        bitField0_ = (bitField0_ & ~0x00000001);
+        operation_ = org.apache.bookkeeper.proto.BookkeeperProtocol.OperationType.READ_ENTRY;
+        bitField0_ = (bitField0_ & ~0x00000002);
+        txnId_ = 0L;
+        bitField0_ = (bitField0_ & ~0x00000004);
+        return this;
+      }
+      
+      public Builder clone() {
+        return create().mergeFrom(buildPartial());
+      }
+      
+      public com.google.protobuf.Descriptors.Descriptor
+          getDescriptorForType() {
+        return org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader.getDescriptor();
+      }
+      
+      public org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader getDefaultInstanceForType() {
+        return org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader.getDefaultInstance();
+      }
+      
+      public org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader build() {
+        org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader result = buildPartial();
+        if (!result.isInitialized()) {
+          throw newUninitializedMessageException(result);
+        }
+        return result;
+      }
+      
+      private org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader buildParsed()
+          throws com.google.protobuf.InvalidProtocolBufferException {
+        org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader result = buildPartial();
+        if (!result.isInitialized()) {
+          throw newUninitializedMessageException(
+            result).asInvalidProtocolBufferException();
+        }
+        return result;
+      }
+      
+      public org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader buildPartial() {
+        org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader result = new org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader(this);
+        int from_bitField0_ = bitField0_;
+        int to_bitField0_ = 0;
+        if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
+          to_bitField0_ |= 0x00000001;
+        }
+        result.version_ = version_;
+        if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
+          to_bitField0_ |= 0x00000002;
+        }
+        result.operation_ = operation_;
+        if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
+          to_bitField0_ |= 0x00000004;
+        }
+        result.txnId_ = txnId_;
+        result.bitField0_ = to_bitField0_;
+        onBuilt();
+        return result;
+      }
+      
+      public Builder mergeFrom(com.google.protobuf.Message other) {
+        if (other instanceof org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader) {
+          return mergeFrom((org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader)other);
+        } else {
+          super.mergeFrom(other);
+          return this;
+        }
+      }
+      
+      public Builder mergeFrom(org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader other) {
+        if (other == org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader.getDefaultInstance()) return this;
+        if (other.hasVersion()) {
+          setVersion(other.getVersion());
+        }
+        if (other.hasOperation()) {
+          setOperation(other.getOperation());
+        }
+        if (other.hasTxnId()) {
+          setTxnId(other.getTxnId());
+        }
+        this.mergeUnknownFields(other.getUnknownFields());
+        return this;
+      }
+      
+      public final boolean isInitialized() {
+        if (!hasVersion()) {
+          
+          return false;
+        }
+        if (!hasOperation()) {
+          
+          return false;
+        }
+        if (!hasTxnId()) {
+          
+          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: {
+              int rawValue = input.readEnum();
+              org.apache.bookkeeper.proto.BookkeeperProtocol.ProtocolVersion value = org.apache.bookkeeper.proto.BookkeeperProtocol.ProtocolVersion.valueOf(rawValue);
+              if (value == null) {
+                unknownFields.mergeVarintField(1, rawValue);
+              } else {
+                bitField0_ |= 0x00000001;
+                version_ = value;
+              }
+              break;
+            }
+            case 16: {
+              int rawValue = input.readEnum();
+              org.apache.bookkeeper.proto.BookkeeperProtocol.OperationType value = org.apache.bookkeeper.proto.BookkeeperProtocol.OperationType.valueOf(rawValue);
+              if (value == null) {
+                unknownFields.mergeVarintField(2, rawValue);
+              } else {
+                bitField0_ |= 0x00000002;
+                operation_ = value;
+              }
+              break;
+            }
+            case 24: {
+              bitField0_ |= 0x00000004;
+              txnId_ = input.readUInt64();
+              break;
+            }
+          }
+        }
+      }
+      
+      private int bitField0_;
+      
+      // required .ProtocolVersion version = 1;
+      private org.apache.bookkeeper.proto.BookkeeperProtocol.ProtocolVersion version_ = org.apache.bookkeeper.proto.BookkeeperProtocol.ProtocolVersion.VERSION_ONE;
+      public boolean hasVersion() {
+        return ((bitField0_ & 0x00000001) == 0x00000001);
+      }
+      public org.apache.bookkeeper.proto.BookkeeperProtocol.ProtocolVersion getVersion() {
+        return version_;
+      }
+      public Builder setVersion(org.apache.bookkeeper.proto.BookkeeperProtocol.ProtocolVersion value) {
+        if (value == null) {
+          throw new NullPointerException();
+        }
+        bitField0_ |= 0x00000001;
+        version_ = value;
+        onChanged();
+        return this;
+      }
+      public Builder clearVersion() {
+        bitField0_ = (bitField0_ & ~0x00000001);
+        version_ = org.apache.bookkeeper.proto.BookkeeperProtocol.ProtocolVersion.VERSION_ONE;
+        onChanged();
+        return this;
+      }
+      
+      // required .OperationType operation = 2;
+      private org.apache.bookkeeper.proto.BookkeeperProtocol.OperationType operation_ = org.apache.bookkeeper.proto.BookkeeperProtocol.OperationType.READ_ENTRY;
+      public boolean hasOperation() {
+        return ((bitField0_ & 0x00000002) == 0x00000002);
+      }
+      public org.apache.bookkeeper.proto.BookkeeperProtocol.OperationType getOperation() {
+        return operation_;
+      }
+      public Builder setOperation(org.apache.bookkeeper.proto.BookkeeperProtocol.OperationType value) {
+        if (value == null) {
+          throw new NullPointerException();
+        }
+        bitField0_ |= 0x00000002;
+        operation_ = value;
+        onChanged();
+        return this;
+      }
+      public Builder clearOperation() {
+        bitField0_ = (bitField0_ & ~0x00000002);
+        operation_ = org.apache.bookkeeper.proto.BookkeeperProtocol.OperationType.READ_ENTRY;
+        onChanged();
+        return this;
+      }
+      
+      // required uint64 txnId = 3;
+      private long txnId_ ;
+      public boolean hasTxnId() {
+        return ((bitField0_ & 0x00000004) == 0x00000004);
+      }
+      public long getTxnId() {
+        return txnId_;
+      }
+      public Builder setTxnId(long value) {
+        bitField0_ |= 0x00000004;
+        txnId_ = value;
+        onChanged();
+        return this;
+      }
+      public Builder clearTxnId() {
+        bitField0_ = (bitField0_ & ~0x00000004);
+        txnId_ = 0L;
+        onChanged();
+        return this;
+      }
+      
+      // @@protoc_insertion_point(builder_scope:BKPacketHeader)
+    }
+    
+    static {
+      defaultInstance = new BKPacketHeader(true);
+      defaultInstance.initFields();
+    }
+    
+    // @@protoc_insertion_point(class_scope:BKPacketHeader)
+  }
+  
+  public interface RequestOrBuilder
+      extends com.google.protobuf.MessageOrBuilder {
+    
+    // required .BKPacketHeader header = 1;
+    boolean hasHeader();
+    org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader getHeader();
+    org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeaderOrBuilder getHeaderOrBuilder();
+    
+    // optional .ReadRequest readRequest = 100;
+    boolean hasReadRequest();
+    org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest getReadRequest();
+    org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequestOrBuilder getReadRequestOrBuilder();
+    
+    // optional .AddRequest addRequest = 101;
+    boolean hasAddRequest();
+    org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest getAddRequest();
+    org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequestOrBuilder getAddRequestOrBuilder();
+  }
+  public static final class Request extends
+      com.google.protobuf.GeneratedMessage
+      implements RequestOrBuilder {
+    // Use Request.newBuilder() to construct.
+    private Request(Builder builder) {
+      super(builder);
+    }
+    private Request(boolean noInit) {}
+    
+    private static final Request defaultInstance;
+    public static Request getDefaultInstance() {
+      return defaultInstance;
+    }
+    
+    public Request getDefaultInstanceForType() {
+      return defaultInstance;
+    }
+    
+    public static final com.google.protobuf.Descriptors.Descriptor
+        getDescriptor() {
+      return org.apache.bookkeeper.proto.BookkeeperProtocol.internal_static_Request_descriptor;
+    }
+    
+    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+        internalGetFieldAccessorTable() {
+      return org.apache.bookkeeper.proto.BookkeeperProtocol.internal_static_Request_fieldAccessorTable;
+    }
+    
+    private int bitField0_;
+    // required .BKPacketHeader header = 1;
+    public static final int HEADER_FIELD_NUMBER = 1;
+    private org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader header_;
+    public boolean hasHeader() {
+      return ((bitField0_ & 0x00000001) == 0x00000001);
+    }
+    public org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader getHeader() {
+      return header_;
+    }
+    public org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeaderOrBuilder getHeaderOrBuilder() {
+      return header_;
+    }
+    
+    // optional .ReadRequest readRequest = 100;
+    public static final int READREQUEST_FIELD_NUMBER = 100;
+    private org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest readRequest_;
+    public boolean hasReadRequest() {
+      return ((bitField0_ & 0x00000002) == 0x00000002);
+    }
+    public org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest getReadRequest() {
+      return readRequest_;
+    }
+    public org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequestOrBuilder getReadRequestOrBuilder() {
+      return readRequest_;
+    }
+    
+    // optional .AddRequest addRequest = 101;
+    public static final int ADDREQUEST_FIELD_NUMBER = 101;
+    private org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest addRequest_;
+    public boolean hasAddRequest() {
+      return ((bitField0_ & 0x00000004) == 0x00000004);
+    }
+    public org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest getAddRequest() {
+      return addRequest_;
+    }
+    public org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequestOrBuilder getAddRequestOrBuilder() {
+      return addRequest_;
+    }
+    
+    private void initFields() {
+      header_ = org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader.getDefaultInstance();
+      readRequest_ = org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest.getDefaultInstance();
+      addRequest_ = org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest.getDefaultInstance();
+    }
+    private byte memoizedIsInitialized = -1;
+    public final boolean isInitialized() {
+      byte isInitialized = memoizedIsInitialized;
+      if (isInitialized != -1) return isInitialized == 1;
+      
+      if (!hasHeader()) {
+        memoizedIsInitialized = 0;
+        return false;
+      }
+      if (!getHeader().isInitialized()) {
+        memoizedIsInitialized = 0;
+        return false;
+      }
+      if (hasReadRequest()) {
+        if (!getReadRequest().isInitialized()) {
+          memoizedIsInitialized = 0;
+          return false;
+        }
+      }
+      if (hasAddRequest()) {
+        if (!getAddRequest().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.writeMessage(1, header_);
+      }
+      if (((bitField0_ & 0x00000002) == 0x00000002)) {
+        output.writeMessage(100, readRequest_);
+      }
+      if (((bitField0_ & 0x00000004) == 0x00000004)) {
+        output.writeMessage(101, addRequest_);
+      }
+      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
+          .computeMessageSize(1, header_);
+      }
+      if (((bitField0_ & 0x00000002) == 0x00000002)) {
+        size += com.google.protobuf.CodedOutputStream
+          .computeMessageSize(100, readRequest_);
+      }
+      if (((bitField0_ & 0x00000004) == 0x00000004)) {
+        size += com.google.protobuf.CodedOutputStream
+          .computeMessageSize(101, addRequest_);
+      }
+      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.BookkeeperProtocol.Request parseFrom(
+        com.google.protobuf.ByteString data)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      return newBuilder().mergeFrom(data).buildParsed();
+    }
+    public static org.apache.bookkeeper.proto.BookkeeperProtocol.Request 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.BookkeeperProtocol.Request parseFrom(byte[] data)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      return newBuilder().mergeFrom(data).buildParsed();
+    }
+    public static org.apache.bookkeeper.proto.BookkeeperProtocol.Request 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.BookkeeperProtocol.Request parseFrom(java.io.InputStream input)
+        throws java.io.IOException {
+      return newBuilder().mergeFrom(input).buildParsed();
+    }
+    public static org.apache.bookkeeper.proto.BookkeeperProtocol.Request 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.BookkeeperProtocol.Request 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.BookkeeperProtocol.Request 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.BookkeeperProtocol.Request parseFrom(
+        com.google.protobuf.CodedInputStream input)
+        throws java.io.IOException {
+      return newBuilder().mergeFrom(input).buildParsed();
+    }
+    public static org.apache.bookkeeper.proto.BookkeeperProtocol.Request 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.BookkeeperProtocol.Request 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.BookkeeperProtocol.RequestOrBuilder {
+      public static final com.google.protobuf.Descriptors.Descriptor
+          getDescriptor() {
+        return org.apache.bookkeeper.proto.BookkeeperProtocol.internal_static_Request_descriptor;
+      }
+      
+      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+          internalGetFieldAccessorTable() {
+        return org.apache.bookkeeper.proto.BookkeeperProtocol.internal_static_Request_fieldAccessorTable;
+      }
+      
+      // Construct using org.apache.bookkeeper.proto.BookkeeperProtocol.Request.newBuilder()
+      private Builder() {
+        maybeForceBuilderInitialization();
+      }
+      
+      private Builder(BuilderParent parent) {
+        super(parent);
+        maybeForceBuilderInitialization();
+      }
+      private void maybeForceBuilderInitialization() {
+        if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
+          getHeaderFieldBuilder();
+          getReadRequestFieldBuilder();
+          getAddRequestFieldBuilder();
+        }
+      }
+      private static Builder create() {
+        return new Builder();
+      }
+      
+      public Builder clear() {
+        super.clear();
+        if (headerBuilder_ == null) {
+          header_ = org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader.getDefaultInstance();
+        } else {
+          headerBuilder_.clear();
+        }
+        bitField0_ = (bitField0_ & ~0x00000001);
+        if (readRequestBuilder_ == null) {
+          readRequest_ = org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest.getDefaultInstance();
+        } else {
+          readRequestBuilder_.clear();
+        }
+        bitField0_ = (bitField0_ & ~0x00000002);
+        if (addRequestBuilder_ == null) {
+          addRequest_ = org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest.getDefaultInstance();
+        } else {
+          addRequestBuilder_.clear();
+        }
+        bitField0_ = (bitField0_ & ~0x00000004);
+        return this;
+      }
+      
+      public Builder clone() {
+        return create().mergeFrom(buildPartial());
+      }
+      
+      public com.google.protobuf.Descriptors.Descriptor
+          getDescriptorForType() {
+        return org.apache.bookkeeper.proto.BookkeeperProtocol.Request.getDescriptor();
+      }
+      
+      public org.apache.bookkeeper.proto.BookkeeperProtocol.Request getDefaultInstanceForType() {
+        return org.apache.bookkeeper.proto.BookkeeperProtocol.Request.getDefaultInstance();
+      }
+      
+      public org.apache.bookkeeper.proto.BookkeeperProtocol.Request build() {
+        org.apache.bookkeeper.proto.BookkeeperProtocol.Request result = buildPartial();
+        if (!result.isInitialized()) {
+          throw newUninitializedMessageException(result);
+        }
+        return result;
+      }
+      
+      private org.apache.bookkeeper.proto.BookkeeperProtocol.Request buildParsed()
+          throws com.google.protobuf.InvalidProtocolBufferException {
+        org.apache.bookkeeper.proto.BookkeeperProtocol.Request result = buildPartial();
+        if (!result.isInitialized()) {
+          throw newUninitializedMessageException(
+            result).asInvalidProtocolBufferException();
+        }
+        return result;
+      }
+      
+      public org.apache.bookkeeper.proto.BookkeeperProtocol.Request buildPartial() {
+        org.apache.bookkeeper.proto.BookkeeperProtocol.Request result = new org.apache.bookkeeper.proto.BookkeeperProtocol.Request(this);
+        int from_bitField0_ = bitField0_;
+        int to_bitField0_ = 0;
+        if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
+          to_bitField0_ |= 0x00000001;
+        }
+        if (headerBuilder_ == null) {
+          result.header_ = header_;
+        } else {
+          result.header_ = headerBuilder_.build();
+        }
+        if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
+          to_bitField0_ |= 0x00000002;
+        }
+        if (readRequestBuilder_ == null) {
+          result.readRequest_ = readRequest_;
+        } else {
+          result.readRequest_ = readRequestBuilder_.build();
+        }
+        if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
+          to_bitField0_ |= 0x00000004;
+        }
+        if (addRequestBuilder_ == null) {
+          result.addRequest_ = addRequest_;
+        } else {
+          result.addRequest_ = addRequestBuilder_.build();
+        }
+        result.bitField0_ = to_bitField0_;
+        onBuilt();
+        return result;
+      }
+      
+      public Builder mergeFrom(com.google.protobuf.Message other) {
+        if (other instanceof org.apache.bookkeeper.proto.BookkeeperProtocol.Request) {
+          return mergeFrom((org.apache.bookkeeper.proto.BookkeeperProtocol.Request)other);
+        } else {
+          super.mergeFrom(other);
+          return this;
+        }
+      }
+      
+      public Builder mergeFrom(org.apache.bookkeeper.proto.BookkeeperProtocol.Request other) {
+        if (other == org.apache.bookkeeper.proto.BookkeeperProtocol.Request.getDefaultInstance()) return this;
+        if (other.hasHeader()) {
+          mergeHeader(other.getHeader());
+        }
+        if (other.hasReadRequest()) {
+          mergeReadRequest(other.getReadRequest());
+        }
+        if (other.hasAddRequest()) {
+          mergeAddRequest(other.getAddRequest());
+        }
+        this.mergeUnknownFields(other.getUnknownFields());
+        return this;
+      }
+      
+      public final boolean isInitialized() {
+        if (!hasHeader()) {
+          
+          return false;
+        }
+        if (!getHeader().isInitialized()) {
+          
+          return false;
+        }
+        if (hasReadRequest()) {
+          if (!getReadRequest().isInitialized()) {
+            
+            return false;
+          }
+        }
+        if (hasAddRequest()) {
+          if (!getAddRequest().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 10: {
+              org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader.Builder subBuilder = org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader.newBuilder();
+              if (hasHeader()) {
+                subBuilder.mergeFrom(getHeader());
+              }
+              input.readMessage(subBuilder, extensionRegistry);
+              setHeader(subBuilder.buildPartial());
+              break;
+            }
+            case 802: {
+              org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest.Builder subBuilder = org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest.newBuilder();
+              if (hasReadRequest()) {
+                subBuilder.mergeFrom(getReadRequest());
+              }
+              input.readMessage(subBuilder, extensionRegistry);
+              setReadRequest(subBuilder.buildPartial());
+              break;
+            }
+            case 810: {
+              org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest.Builder subBuilder = org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest.newBuilder();
+              if (hasAddRequest()) {
+                subBuilder.mergeFrom(getAddRequest());
+              }
+              input.readMessage(subBuilder, extensionRegistry);
+              setAddRequest(subBuilder.buildPartial());
+              break;
+            }
+          }
+        }
+      }
+      
+      private int bitField0_;
+      
+      // required .BKPacketHeader header = 1;
+      private org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader header_ = org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader.getDefaultInstance();
+      private com.google.protobuf.SingleFieldBuilder<
+          org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader, org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader.Builder, org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeaderOrBuilder> headerBuilder_;
+      public boolean hasHeader() {
+        return ((bitField0_ & 0x00000001) == 0x00000001);
+      }
+      public org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader getHeader() {
+        if (headerBuilder_ == null) {
+          return header_;
+        } else {
+          return headerBuilder_.getMessage();
+        }
+      }
+      public Builder setHeader(org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader value) {
+        if (headerBuilder_ == null) {
+          if (value == null) {
+            throw new NullPointerException();
+          }
+          header_ = value;
+          onChanged();
+        } else {
+          headerBuilder_.setMessage(value);
+        }
+        bitField0_ |= 0x00000001;
+        return this;
+      }
+      public Builder setHeader(
+          org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader.Builder builderForValue) {
+        if (headerBuilder_ == null) {
+          header_ = builderForValue.build();
+          onChanged();
+        } else {
+          headerBuilder_.setMessage(builderForValue.build());
+        }
+        bitField0_ |= 0x00000001;
+        return this;
+      }
+      public Builder mergeHeader(org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader value) {
+        if (headerBuilder_ == null) {
+          if (((bitField0_ & 0x00000001) == 0x00000001) &&
+              header_ != org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader.getDefaultInstance()) {
+            header_ =
+              org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader.newBuilder(header_).mergeFrom(value).buildPartial();
+          } else {
+            header_ = value;
+          }
+          onChanged();
+        } else {
+          headerBuilder_.mergeFrom(value);
+        }
+        bitField0_ |= 0x00000001;
+        return this;
+      }
+      public Builder clearHeader() {
+        if (headerBuilder_ == null) {
+          header_ = org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader.getDefaultInstance();
+          onChanged();
+        } else {
+          headerBuilder_.clear();
+        }
+        bitField0_ = (bitField0_ & ~0x00000001);
+        return this;
+      }
+      public org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader.Builder getHeaderBuilder() {
+        bitField0_ |= 0x00000001;
+        onChanged();
+        return getHeaderFieldBuilder().getBuilder();
+      }
+      public org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeaderOrBuilder getHeaderOrBuilder() {
+        if (headerBuilder_ != null) {
+          return headerBuilder_.getMessageOrBuilder();
+        } else {
+          return header_;
+        }
+      }
+      private com.google.protobuf.SingleFieldBuilder<
+          org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader, org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader.Builder, org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeaderOrBuilder> 
+          getHeaderFieldBuilder() {
+        if (headerBuilder_ == null) {
+          headerBuilder_ = new com.google.protobuf.SingleFieldBuilder<
+              org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader, org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeader.Builder, org.apache.bookkeeper.proto.BookkeeperProtocol.BKPacketHeaderOrBuilder>(
+                  header_,
+                  getParentForChildren(),
+                  isClean());
+          header_ = null;
+        }
+        return headerBuilder_;
+      }
+      
+      // optional .ReadRequest readRequest = 100;
+      private org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest readRequest_ = org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest.getDefaultInstance();
+      private com.google.protobuf.SingleFieldBuilder<
+          org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest, org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest.Builder, org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequestOrBuilder> readRequestBuilder_;
+      public boolean hasReadRequest() {
+        return ((bitField0_ & 0x00000002) == 0x00000002);
+      }
+      public org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest getReadRequest() {
+        if (readRequestBuilder_ == null) {
+          return readRequest_;
+        } else {
+          return readRequestBuilder_.getMessage();
+        }
+      }
+      public Builder setReadRequest(org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest value) {
+        if (readRequestBuilder_ == null) {
+          if (value == null) {
+            throw new NullPointerException();
+          }
+          readRequest_ = value;
+          onChanged();
+        } else {
+          readRequestBuilder_.setMessage(value);
+        }
+        bitField0_ |= 0x00000002;
+        return this;
+      }
+      public Builder setReadRequest(
+          org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest.Builder builderForValue) {
+        if (readRequestBuilder_ == null) {
+          readRequest_ = builderForValue.build();
+          onChanged();
+        } else {
+          readRequestBuilder_.setMessage(builderForValue.build());
+        }
+        bitField0_ |= 0x00000002;
+        return this;
+      }
+      public Builder mergeReadRequest(org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest value) {
+        if (readRequestBuilder_ == null) {
+          if (((bitField0_ & 0x00000002) == 0x00000002) &&
+              readRequest_ != org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest.getDefaultInstance()) {
+            readRequest_ =
+              org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest.newBuilder(readRequest_).mergeFrom(value).buildPartial();
+          } else {
+            readRequest_ = value;
+          }
+          onChanged();
+        } else {
+          readRequestBuilder_.mergeFrom(value);
+        }
+        bitField0_ |= 0x00000002;
+        return this;
+      }
+      public Builder clearReadRequest() {
+        if (readRequestBuilder_ == null) {
+          readRequest_ = org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest.getDefaultInstance();
+          onChanged();
+        } else {
+          readRequestBuilder_.clear();
+        }
+        bitField0_ = (bitField0_ & ~0x00000002);
+        return this;
+      }
+      public org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest.Builder getReadRequestBuilder() {
+        bitField0_ |= 0x00000002;
+        onChanged();
+        return getReadRequestFieldBuilder().getBuilder();
+      }
+      public org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequestOrBuilder getReadRequestOrBuilder() {
+        if (readRequestBuilder_ != null) {
+          return readRequestBuilder_.getMessageOrBuilder();
+        } else {
+          return readRequest_;
+        }
+      }
+      private com.google.protobuf.SingleFieldBuilder<
+          org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest, org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest.Builder, org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequestOrBuilder> 
+          getReadRequestFieldBuilder() {
+        if (readRequestBuilder_ == null) {
+          readRequestBuilder_ = new com.google.protobuf.SingleFieldBuilder<
+              org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest, org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest.Builder, org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequestOrBuilder>(
+                  readRequest_,
+                  getParentForChildren(),
+                  isClean());
+          readRequest_ = null;
+        }
+        return readRequestBuilder_;
+      }
+      
+      // optional .AddRequest addRequest = 101;
+      private org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest addRequest_ = org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest.getDefaultInstance();
+      private com.google.protobuf.SingleFieldBuilder<
+          org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest, org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest.Builder, org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequestOrBuilder> addRequestBuilder_;
+      public boolean hasAddRequest() {
+        return ((bitField0_ & 0x00000004) == 0x00000004);
+      }
+      public org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest getAddRequest() {
+        if (addRequestBuilder_ == null) {
+          return addRequest_;
+        } else {
+          return addRequestBuilder_.getMessage();
+        }
+      }
+      public Builder setAddRequest(org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest value) {
+        if (addRequestBuilder_ == null) {
+          if (value == null) {
+            throw new NullPointerException();
+          }
+          addRequest_ = value;
+          onChanged();
+        } else {
+          addRequestBuilder_.setMessage(value);
+        }
+        bitField0_ |= 0x00000004;
+        return this;
+      }
+      public Builder setAddRequest(
+          org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest.Builder builderForValue) {
+        if (addRequestBuilder_ == null) {
+          addRequest_ = builderForValue.build();
+          onChanged();
+        } else {
+          addRequestBuilder_.setMessage(builderForValue.build());
+        }
+        bitField0_ |= 0x00000004;
+        return this;
+      }
+      public Builder mergeAddRequest(org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest value) {
+        if (addRequestBuilder_ == null) {
+          if (((bitField0_ & 0x00000004) == 0x00000004) &&
+              addRequest_ != org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest.getDefaultInstance()) {
+            addRequest_ =
+              org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest.newBuilder(addRequest_).mergeFrom(value).buildPartial();
+          } else {
+            addRequest_ = value;
+          }
+          onChanged();
+        } else {
+          addRequestBuilder_.mergeFrom(value);
+        }
+        bitField0_ |= 0x00000004;
+        return this;
+      }
+      public Builder clearAddRequest() {
+        if (addRequestBuilder_ == null) {
+          addRequest_ = org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest.getDefaultInstance();
+          onChanged();
+        } else {
+          addRequestBuilder_.clear();
+        }
+        bitField0_ = (bitField0_ & ~0x00000004);
+        return this;
+      }
+      public org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest.Builder getAddRequestBuilder() {
+        bitField0_ |= 0x00000004;
+        onChanged();
+        return getAddRequestFieldBuilder().getBuilder();
+      }
+      public org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequestOrBuilder getAddRequestOrBuilder() {
+        if (addRequestBuilder_ != null) {
+          return addRequestBuilder_.getMessageOrBuilder();
+        } else {
+          return addRequest_;
+        }
+      }
+      private com.google.protobuf.SingleFieldBuilder<
+          org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest, org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest.Builder, org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequestOrBuilder> 
+          getAddRequestFieldBuilder() {
+        if (addRequestBuilder_ == null) {
+          addRequestBuilder_ = new com.google.protobuf.SingleFieldBuilder<
+              org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest, org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest.Builder, org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequestOrBuilder>(
+                  addRequest_,
+                  getParentForChildren(),
+                  isClean());
+          addRequest_ = null;
+        }
+        return addRequestBuilder_;
+      }
+      
+      // @@protoc_insertion_point(builder_scope:Request)
+    }
+    
+    static {
+      defaultInstance = new Request(true);
+      defaultInstance.initFields();
+    }
+    
+    // @@protoc_insertion_point(class_scope:Request)
+  }
+  
+  public interface ReadRequestOrBuilder
+      extends com.google.protobuf.MessageOrBuilder {
+    
+    // optional .ReadRequest.Flag flag = 100;
+    boolean hasFlag();
+    org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest.Flag getFlag();
+    
+    // required int64 ledgerId = 1;
+    boolean hasLedgerId();
+    long getLedgerId();
+    
+    // required int64 entryId = 2;
+    boolean hasEntryId();
+    long getEntryId();
+    
+    // optional bytes masterKey = 3;
+    boolean hasMasterKey();
+    com.google.protobuf.ByteString getMasterKey();
+  }
+  public static final class ReadRequest extends
+      com.google.protobuf.GeneratedMessage
+      implements ReadRequestOrBuilder {
+    // Use ReadRequest.newBuilder() to construct.
+    private ReadRequest(Builder builder) {
+      super(builder);
+    }
+    private ReadRequest(boolean noInit) {}
+    
+    private static final ReadRequest defaultInstance;
+    public static ReadRequest getDefaultInstance() {
+      return defaultInstance;
+    }
+    
+    public ReadRequest getDefaultInstanceForType() {
+      return defaultInstance;
+    }
+    
+    public static final com.google.protobuf.Descriptors.Descriptor
+        getDescriptor() {
+      return org.apache.bookkeeper.proto.BookkeeperProtocol.internal_static_ReadRequest_descriptor;
+    }
+    
+    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+        internalGetFieldAccessorTable() {
+      return org.apache.bookkeeper.proto.BookkeeperProtocol.internal_static_ReadRequest_fieldAccessorTable;
+    }
+    
+    public enum Flag
+        implements com.google.protobuf.ProtocolMessageEnum {
+      FENCE_LEDGER(0, 1),
+      ;
+      
+      public static final int FENCE_LEDGER_VALUE = 1;
+      
+      
+      public final int getNumber() { return value; }
+      
+      public static Flag valueOf(int value) {
+        switch (value) {
+          case 1: return FENCE_LEDGER;
+          default: return null;
+        }
+      }
+      
+      public static com.google.protobuf.Internal.EnumLiteMap<Flag>
+          internalGetValueMap() {
+        return internalValueMap;
+      }
+      private static com.google.protobuf.Internal.EnumLiteMap<Flag>
+          internalValueMap =
+            new com.google.protobuf.Internal.EnumLiteMap<Flag>() {
+              public Flag findValueByNumber(int number) {
+                return Flag.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.BookkeeperProtocol.ReadRequest.getDescriptor().getEnumTypes().get(0);
+      }
+      
+      private static final Flag[] VALUES = {
+        FENCE_LEDGER, 
+      };
+      
+      public static Flag 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 Flag(int index, int value) {
+        this.index = index;
+        this.value = value;
+      }
+      
+      // @@protoc_insertion_point(enum_scope:ReadRequest.Flag)
+    }
+    
+    private int bitField0_;
+    // optional .ReadRequest.Flag flag = 100;
+    public static final int FLAG_FIELD_NUMBER = 100;
+    private org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest.Flag flag_;
+    public boolean hasFlag() {
+      return ((bitField0_ & 0x00000001) == 0x00000001);
+    }
+    public org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest.Flag getFlag() {
+      return flag_;
+    }
+    
+    // required int64 ledgerId = 1;
+    public static final int LEDGERID_FIELD_NUMBER = 1;
+    private long ledgerId_;
+    public boolean hasLedgerId() {
+      return ((bitField0_ & 0x00000002) == 0x00000002);
+    }
+    public long getLedgerId() {
+      return ledgerId_;
+    }
+    
+    // required int64 entryId = 2;
+    public static final int ENTRYID_FIELD_NUMBER = 2;
+    private long entryId_;
+    public boolean hasEntryId() {
+      return ((bitField0_ & 0x00000004) == 0x00000004);
+    }
+    public long getEntryId() {
+      return entryId_;
+    }
+    
+    // optional bytes masterKey = 3;
+    public static final int MASTERKEY_FIELD_NUMBER = 3;
+    private com.google.protobuf.ByteString masterKey_;
+    public boolean hasMasterKey() {
+      return ((bitField0_ & 0x00000008) == 0x00000008);
+    }
+    public com.google.protobuf.ByteString getMasterKey() {
+      return masterKey_;
+    }
+    
+    private void initFields() {
+      flag_ = org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest.Flag.FENCE_LEDGER;
+      ledgerId_ = 0L;
+      entryId_ = 0L;
+      masterKey_ = com.google.protobuf.ByteString.EMPTY;
+    }
+    private byte memoizedIsInitialized = -1;
+    public final boolean isInitialized() {
+      byte isInitialized = memoizedIsInitialized;
+      if (isInitialized != -1) return isInitialized == 1;
+      
+      if (!hasLedgerId()) {
+        memoizedIsInitialized = 0;
+        return false;
+      }
+      if (!hasEntryId()) {
+        memoizedIsInitialized = 0;
+        return false;
+      }
+      memoizedIsInitialized = 1;
+      return true;
+    }
+    
+    public void writeTo(com.google.protobuf.CodedOutputStream output)
+                        throws java.io.IOException {
+      getSerializedSize();
+      if (((bitField0_ & 0x00000002) == 0x00000002)) {
+        output.writeInt64(1, ledgerId_);
+      }
+      if (((bitField0_ & 0x00000004) == 0x00000004)) {
+        output.writeInt64(2, entryId_);
+      }
+      if (((bitField0_ & 0x00000008) == 0x00000008)) {
+        output.writeBytes(3, masterKey_);
+      }
+      if (((bitField0_ & 0x00000001) == 0x00000001)) {
+        output.writeEnum(100, flag_.getNumber());
+      }
+      getUnknownFields().writeTo(output);
+    }
+    
+    private int memoizedSerializedSize = -1;
+    public int getSerializedSize() {
+      int size = memoizedSerializedSize;
+      if (size != -1) return size;
+    
+      size = 0;
+      if (((bitField0_ & 0x00000002) == 0x00000002)) {
+        size += com.google.protobuf.CodedOutputStream
+          .computeInt64Size(1, ledgerId_);
+      }
+      if (((bitField0_ & 0x00000004) == 0x00000004)) {
+        size += com.google.protobuf.CodedOutputStream
+          .computeInt64Size(2, entryId_);
+      }
+      if (((bitField0_ & 0x00000008) == 0x00000008)) {
+        size += com.google.protobuf.CodedOutputStream
+          .computeBytesSize(3, masterKey_);
+      }
+      if (((bitField0_ & 0x00000001) == 0x00000001)) {
+        size += com.google.protobuf.CodedOutputStream
+          .computeEnumSize(100, flag_.getNumber());
+      }
+      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.BookkeeperProtocol.ReadRequest parseFrom(
+        com.google.protobuf.ByteString data)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      return newBuilder().mergeFrom(data).buildParsed();
+    }
+    public static org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest 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.BookkeeperProtocol.ReadRequest parseFrom(byte[] data)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      return newBuilder().mergeFrom(data).buildParsed();
+    }
+    public static org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest 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.BookkeeperProtocol.ReadRequest parseFrom(java.io.InputStream input)
+        throws java.io.IOException {
+      return newBuilder().mergeFrom(input).buildParsed();
+    }
+    public static org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest 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.BookkeeperProtocol.ReadRequest 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.BookkeeperProtocol.ReadRequest 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.BookkeeperProtocol.ReadRequest parseFrom(
+        com.google.protobuf.CodedInputStream input)
+        throws java.io.IOException {
+      return newBuilder().mergeFrom(input).buildParsed();
+    }
+    public static org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest 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.BookkeeperProtocol.ReadRequest 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.BookkeeperProtocol.ReadRequestOrBuilder {
+      public static final com.google.protobuf.Descriptors.Descriptor
+          getDescriptor() {
+        return org.apache.bookkeeper.proto.BookkeeperProtocol.internal_static_ReadRequest_descriptor;
+      }
+      
+      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+          internalGetFieldAccessorTable() {
+        return org.apache.bookkeeper.proto.BookkeeperProtocol.internal_static_ReadRequest_fieldAccessorTable;
+      }
+      
+      // Construct using org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest.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();
+        flag_ = org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest.Flag.FENCE_LEDGER;
+        bitField0_ = (bitField0_ & ~0x00000001);
+        ledgerId_ = 0L;
+        bitField0_ = (bitField0_ & ~0x00000002);
+        entryId_ = 0L;
+        bitField0_ = (bitField0_ & ~0x00000004);
+        masterKey_ = com.google.protobuf.ByteString.EMPTY;
+        bitField0_ = (bitField0_ & ~0x00000008);
+        return this;
+      }
+      
+      public Builder clone() {
+        return create().mergeFrom(buildPartial());
+      }
+      
+      public com.google.protobuf.Descriptors.Descriptor
+          getDescriptorForType() {
+        return org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest.getDescriptor();
+      }
+      
+      public org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest getDefaultInstanceForType() {
+        return org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest.getDefaultInstance();
+      }
+      
+      public org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest build() {
+        org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest result = buildPartial();
+        if (!result.isInitialized()) {
+          throw newUninitializedMessageException(result);
+        }
+        return result;
+      }
+      
+      private org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest buildParsed()
+          throws com.google.protobuf.InvalidProtocolBufferException {
+        org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest result = buildPartial();
+        if (!result.isInitialized()) {
+          throw newUninitializedMessageException(
+            result).asInvalidProtocolBufferException();
+        }
+        return result;
+      }
+      
+      public org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest buildPartial() {
+        org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest result = new org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest(this);
+        int from_bitField0_ = bitField0_;
+        int to_bitField0_ = 0;
+        if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
+          to_bitField0_ |= 0x00000001;
+        }
+        result.flag_ = flag_;
+        if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
+          to_bitField0_ |= 0x00000002;
+        }
+        result.ledgerId_ = ledgerId_;
+        if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
+          to_bitField0_ |= 0x00000004;
+        }
+        result.entryId_ = entryId_;
+        if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
+          to_bitField0_ |= 0x00000008;
+        }
+        result.masterKey_ = masterKey_;
+        result.bitField0_ = to_bitField0_;
+        onBuilt();
+        return result;
+      }
+      
+      public Builder mergeFrom(com.google.protobuf.Message other) {
+        if (other instanceof org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest) {
+          return mergeFrom((org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest)other);
+        } else {
+          super.mergeFrom(other);
+          return this;
+        }
+      }
+      
+      public Builder mergeFrom(org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest other) {
+        if (other == org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest.getDefaultInstance()) return this;
+        if (other.hasFlag()) {
+          setFlag(other.getFlag());
+        }
+        if (other.hasLedgerId()) {
+          setLedgerId(other.getLedgerId());
+        }
+        if (other.hasEntryId()) {
+          setEntryId(other.getEntryId());
+        }
+        if (other.hasMasterKey()) {
+          setMasterKey(other.getMasterKey());
+        }
+        this.mergeUnknownFields(other.getUnknownFields());
+        return this;
+      }
+      
+      public final boolean isInitialized() {
+        if (!hasLedgerId()) {
+          
+          return false;
+        }
+        if (!hasEntryId()) {
+          
+          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_ |= 0x00000002;
+              ledgerId_ = input.readInt64();
+              break;
+            }
+            case 16: {
+              bitField0_ |= 0x00000004;
+              entryId_ = input.readInt64();
+              break;
+            }
+            case 26: {
+              bitField0_ |= 0x00000008;
+              masterKey_ = input.readBytes();
+              break;
+            }
+            case 800: {
+              int rawValue = input.readEnum();
+              org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest.Flag value = org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest.Flag.valueOf(rawValue);
+              if (value == null) {
+                unknownFields.mergeVarintField(100, rawValue);
+              } else {
+                bitField0_ |= 0x00000001;
+                flag_ = value;
+              }
+              break;
+            }
+          }
+        }
+      }
+      
+      private int bitField0_;
+      
+      // optional .ReadRequest.Flag flag = 100;
+      private org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest.Flag flag_ = org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest.Flag.FENCE_LEDGER;
+      public boolean hasFlag() {
+        return ((bitField0_ & 0x00000001) == 0x00000001);
+      }
+      public org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest.Flag getFlag() {
+        return flag_;
+      }
+      public Builder setFlag(org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest.Flag value) {
+        if (value == null) {
+          throw new NullPointerException();
+        }
+        bitField0_ |= 0x00000001;
+        flag_ = value;
+        onChanged();
+        return this;
+      }
+      public Builder clearFlag() {
+        bitField0_ = (bitField0_ & ~0x00000001);
+        flag_ = org.apache.bookkeeper.proto.BookkeeperProtocol.ReadRequest.Flag.FENCE_LEDGER;
+        onChanged();
+        return this;
+      }
+      
+      // required int64 ledgerId = 1;
+      private long ledgerId_ ;
+      public boolean hasLedgerId() {
+        return ((bitField0_ & 0x00000002) == 0x00000002);
+      }
+      public long getLedgerId() {
+        return ledgerId_;
+      }
+      public Builder setLedgerId(long value) {
+        bitField0_ |= 0x00000002;
+        ledgerId_ = value;
+        onChanged();
+        return this;
+      }
+      public Builder clearLedgerId() {
+        bitField0_ = (bitField0_ & ~0x00000002);
+        ledgerId_ = 0L;
+        onChanged();
+        return this;
+      }
+      
+      // required int64 entryId = 2;
+      private long entryId_ ;
+      public boolean hasEntryId() {
+        return ((bitField0_ & 0x00000004) == 0x00000004);
+      }
+      public long getEntryId() {
+        return entryId_;
+      }
+      public Builder setEntryId(long value) {
+        bitField0_ |= 0x00000004;
+        entryId_ = value;
+        onChanged();
+        return this;
+      }
+      public Builder clearEntryId() {
+        bitField0_ = (bitField0_ & ~0x00000004);
+        entryId_ = 0L;
+        onChanged();
+        return this;
+      }
+      
+      // optional bytes masterKey = 3;
+      private com.google.protobuf.ByteString masterKey_ = com.google.protobuf.ByteString.EMPTY;
+      public boolean hasMasterKey() {
+        return ((bitField0_ & 0x00000008) == 0x00000008);
+      }
+      public com.google.protobuf.ByteString getMasterKey() {
+        return masterKey_;
+      }
+      public Builder setMasterKey(com.google.protobuf.ByteString value) {
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  bitField0_ |= 0x00000008;
+        masterKey_ = value;
+        onChanged();
+        return this;
+      }
+      public Builder clearMasterKey() {
+        bitField0_ = (bitField0_ & ~0x00000008);
+        masterKey_ = getDefaultInstance().getMasterKey();
+        onChanged();
+        return this;
+      }
+      
+      // @@protoc_insertion_point(builder_scope:ReadRequest)
+    }
+    
+    static {
+      defaultInstance = new ReadRequest(true);
+      defaultInstance.initFields();
+    }
+    
+    // @@protoc_insertion_point(class_scope:ReadRequest)
+  }
+  
+  public interface AddRequestOrBuilder
+      extends com.google.protobuf.MessageOrBuilder {
+    
+    // optional .AddRequest.Flag flag = 100;
+    boolean hasFlag();
+    org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest.Flag getFlag();
+    
+    // required int64 ledgerId = 1;
+    boolean hasLedgerId();
+    long getLedgerId();
+    
+    // required int64 entryId = 2;
+    boolean hasEntryId();
+    long getEntryId();
+    
+    // required bytes masterKey = 3;
+    boolean hasMasterKey();
+    com.google.protobuf.ByteString getMasterKey();
+    
+    // required bytes body = 4;
+    boolean hasBody();
+    com.google.protobuf.ByteString getBody();
+  }
+  public static final class AddRequest extends
+      com.google.protobuf.GeneratedMessage
+      implements AddRequestOrBuilder {
+    // Use AddRequest.newBuilder() to construct.
+    private AddRequest(Builder builder) {
+      super(builder);
+    }
+    private AddRequest(boolean noInit) {}
+    
+    private static final AddRequest defaultInstance;
+    public static AddRequest getDefaultInstance() {
+      return defaultInstance;
+    }
+    
+    public AddRequest getDefaultInstanceForType() {
+      return defaultInstance;
+    }
+    
+    public static final com.google.protobuf.Descriptors.Descriptor
+        getDescriptor() {
+      return org.apache.bookkeeper.proto.BookkeeperProtocol.internal_static_AddRequest_descriptor;
+    }
+    
+    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+        internalGetFieldAccessorTable() {
+      return org.apache.bookkeeper.proto.BookkeeperProtocol.internal_static_AddRequest_fieldAccessorTable;
+    }
+    
+    public enum Flag
+        implements com.google.protobuf.ProtocolMessageEnum {
+      RECOVERY_ADD(0, 1),
+      ;
+      
+      public static final int RECOVERY_ADD_VALUE = 1;
+      
+      
+      public final int getNumber() { return value; }
+      
+      public static Flag valueOf(int value) {
+        switch (value) {
+          case 1: return RECOVERY_ADD;
+          default: return null;
+        }
+      }
+      
+      public static com.google.protobuf.Internal.EnumLiteMap<Flag>
+          internalGetValueMap() {
+        return internalValueMap;
+      }
+      private static com.google.protobuf.Internal.EnumLiteMap<Flag>
+          internalValueMap =
+            new com.google.protobuf.Internal.EnumLiteMap<Flag>() {
+              public Flag findValueByNumber(int number) {
+                return Flag.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.BookkeeperProtocol.AddRequest.getDescriptor().getEnumTypes().get(0);
+      }
+      
+      private static final Flag[] VALUES = {
+        RECOVERY_ADD, 
+      };
+      
+      public static Flag 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 Flag(int index, int value) {
+        this.index = index;
+        this.value = value;
+      }
+      
+      // @@protoc_insertion_point(enum_scope:AddRequest.Flag)
+    }
+    
+    private int bitField0_;
+    // optional .AddRequest.Flag flag = 100;
+    public static final int FLAG_FIELD_NUMBER = 100;
+    private org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest.Flag flag_;
+    public boolean hasFlag() {
+      return ((bitField0_ & 0x00000001) == 0x00000001);
+    }
+    public org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest.Flag getFlag() {
+      return flag_;
+    }
+    
+    // required int64 ledgerId = 1;
+    public static final int LEDGERID_FIELD_NUMBER = 1;
+    private long ledgerId_;
+    public boolean hasLedgerId() {
+      return ((bitField0_ & 0x00000002) == 0x00000002);
+    }
+    public long getLedgerId() {
+      return ledgerId_;
+    }
+    
+    // required int64 entryId = 2;
+    public static final int ENTRYID_FIELD_NUMBER = 2;
+    private long entryId_;
+    public boolean hasEntryId() {
+      return ((bitField0_ & 0x00000004) == 0x00000004);
+    }
+    public long getEntryId() {
+      return entryId_;
+    }
+    
+    // required bytes masterKey = 3;
+    public static final int MASTERKEY_FIELD_NUMBER = 3;
+    private com.google.protobuf.ByteString masterKey_;
+    public boolean hasMasterKey() {
+      return ((bitField0_ & 0x00000008) == 0x00000008);
+    }
+    public com.google.protobuf.ByteString getMasterKey() {
+      return masterKey_;
+    }
+    
+    // required bytes body = 4;
+    public static final int BODY_FIELD_NUMBER = 4;
+    private com.google.protobuf.ByteString body_;
+    public boolean hasBody() {
+      return ((bitField0_ & 0x00000010) == 0x00000010);
+    }
+    public com.google.protobuf.ByteString getBody() {
+      return body_;
+    }
+    
+    private void initFields() {
+      flag_ = org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest.Flag.RECOVERY_ADD;
+      ledgerId_ = 0L;
+      entryId_ = 0L;
+      masterKey_ = com.google.protobuf.ByteString.EMPTY;
+      body_ = com.google.protobuf.ByteString.EMPTY;
+    }
+    private byte memoizedIsInitialized = -1;
+    public final boolean isInitialized() {
+      byte isInitialized = memoizedIsInitialized;
+      if (isInitialized != -1) return isInitialized == 1;
+      
+      if (!hasLedgerId()) {
+        memoizedIsInitialized = 0;
+        return false;
+      }
+      if (!hasEntryId()) {
+        memoizedIsInitialized = 0;
+        return false;
+      }
+      if (!hasMasterKey()) {
+        memoizedIsInitialized = 0;
+        return false;
+      }
+      if (!hasBody()) {
+        memoizedIsInitialized = 0;
+        return false;
+      }
+      memoizedIsInitialized = 1;
+      return true;
+    }
+    
+    public void writeTo(com.google.protobuf.CodedOutputStream output)
+                        throws java.io.IOException {
+      getSerializedSize();
+      if (((bitField0_ & 0x00000002) == 0x00000002)) {
+        output.writeInt64(1, ledgerId_);
+      }
+      if (((bitField0_ & 0x00000004) == 0x00000004)) {
+        output.writeInt64(2, entryId_);
+      }
+      if (((bitField0_ & 0x00000008) == 0x00000008)) {
+        output.writeBytes(3, masterKey_);
+      }
+      if (((bitField0_ & 0x00000010) == 0x00000010)) {
+        output.writeBytes(4, body_);
+      }
+      if (((bitField0_ & 0x00000001) == 0x00000001)) {
+        output.writeEnum(100, flag_.getNumber());
+      }
+      getUnknownFields().writeTo(output);
+    }
+    
+    private int memoizedSerializedSize = -1;
+    public int getSerializedSize() {
+      int size = memoizedSerializedSize;
+      if (size != -1) return size;
+    
+      size = 0;
+      if (((bitField0_ & 0x00000002) == 0x00000002)) {
+        size += com.google.protobuf.CodedOutputStream
+          .computeInt64Size(1, ledgerId_);
+      }
+      if (((bitField0_ & 0x00000004) == 0x00000004)) {
+        size += com.google.protobuf.CodedOutputStream
+          .computeInt64Size(2, entryId_);
+      }
+      if (((bitField0_ & 0x00000008) == 0x00000008)) {
+        size += com.google.protobuf.CodedOutputStream
+          .computeBytesSize(3, masterKey_);
+      }
+      if (((bitField0_ & 0x00000010) == 0x00000010)) {
+        size += com.google.protobuf.CodedOutputStream
+          .computeBytesSize(4, body_);
+      }
+      if (((bitField0_ & 0x00000001) == 0x00000001)) {
+        size += com.google.protobuf.CodedOutputStream
+          .computeEnumSize(100, flag_.getNumber());
+      }
+      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.BookkeeperProtocol.AddRequest parseFrom(
+        com.google.protobuf.ByteString data)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      return newBuilder().mergeFrom(data).buildParsed();
+    }
+    public static org.apache.bookkeeper.proto.BookkeeperProtocol.AddRequest parseFrom(
+        com.google.protobuf.ByteString data,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      return newBuilder().mergeFrom(data, extensionRegistry)

[... 2412 lines stripped ...]


Mime
View raw message