コード例 #1
0
ファイル: IscsiProto.java プロジェクト: yangzx554/cloudata
 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
   getSerializedSize();
   if (((bitField0_ & 0x00000001) == 0x00000001)) {
     output.writeUInt64(1, storeId_);
   }
   if (((bitField0_ & 0x00000002) == 0x00000002)) {
     output.writeEnum(2, action_.getNumber());
   }
   if (((bitField0_ & 0x00000004) == 0x00000004)) {
     output.writeBytes(3, key_);
   }
   if (((bitField0_ & 0x00000008) == 0x00000008)) {
     output.writeBytes(4, value_);
   }
   if (((bitField0_ & 0x00000010) == 0x00000010)) {
     output.writeInt64(5, incrementBy_);
   }
   getUnknownFields().writeTo(output);
 }
コード例 #2
0
ファイル: IscsiProto.java プロジェクト: yangzx554/cloudata
    public int getSerializedSize() {
      int size = memoizedSerializedSize;
      if (size != -1) return size;

      size = 0;
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        size += com.google.protobuf.CodedOutputStream.computeUInt64Size(1, storeId_);
      }
      if (((bitField0_ & 0x00000002) == 0x00000002)) {
        size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, action_.getNumber());
      }
      if (((bitField0_ & 0x00000004) == 0x00000004)) {
        size += com.google.protobuf.CodedOutputStream.computeBytesSize(3, key_);
      }
      if (((bitField0_ & 0x00000008) == 0x00000008)) {
        size += com.google.protobuf.CodedOutputStream.computeBytesSize(4, value_);
      }
      if (((bitField0_ & 0x00000010) == 0x00000010)) {
        size += com.google.protobuf.CodedOutputStream.computeInt64Size(5, incrementBy_);
      }
      size += getUnknownFields().getSerializedSize();
      memoizedSerializedSize = size;
      return size;
    }
コード例 #3
0
ファイル: IscsiProto.java プロジェクト: yangzx554/cloudata
 private LogEntry(
     com.google.protobuf.CodedInputStream input,
     com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     throws com.google.protobuf.InvalidProtocolBufferException {
   initFields();
   int mutable_bitField0_ = 0;
   com.google.protobuf.UnknownFieldSet.Builder unknownFields =
       com.google.protobuf.UnknownFieldSet.newBuilder();
   try {
     boolean done = false;
     while (!done) {
       int tag = input.readTag();
       switch (tag) {
         case 0:
           done = true;
           break;
         default:
           {
             if (!parseUnknownField(
                 input, unknownFields,
                 extensionRegistry, tag)) {
               done = true;
             }
             break;
           }
         case 8:
           {
             bitField0_ |= 0x00000001;
             storeId_ = input.readUInt64();
             break;
           }
         case 16:
           {
             int rawValue = input.readEnum();
             com.cloudata.blockstore.IscsiProto.LogAction value =
                 com.cloudata.blockstore.IscsiProto.LogAction.valueOf(rawValue);
             if (value == null) {
               unknownFields.mergeVarintField(2, rawValue);
             } else {
               bitField0_ |= 0x00000002;
               action_ = value;
             }
             break;
           }
         case 26:
           {
             bitField0_ |= 0x00000004;
             key_ = input.readBytes();
             break;
           }
         case 34:
           {
             bitField0_ |= 0x00000008;
             value_ = input.readBytes();
             break;
           }
         case 40:
           {
             bitField0_ |= 0x00000010;
             incrementBy_ = input.readInt64();
             break;
           }
       }
     }
   } catch (com.google.protobuf.InvalidProtocolBufferException e) {
     throw e.setUnfinishedMessage(this);
   } catch (java.io.IOException e) {
     throw new com.google.protobuf.InvalidProtocolBufferException(e.getMessage())
         .setUnfinishedMessage(this);
   } finally {
     this.unknownFields = unknownFields.build();
     makeExtensionsImmutable();
   }
 }