Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
org.apache.bookkeeper.stream.proto.StreamConfiguration Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: stream.proto
package org.apache.bookkeeper.stream.proto;
/**
* Protobuf type {@code bookkeeper.proto.stream.StreamConfiguration}
*/
public final class StreamConfiguration extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:bookkeeper.proto.stream.StreamConfiguration)
StreamConfigurationOrBuilder {
private static final long serialVersionUID = 0L;
// Use StreamConfiguration.newBuilder() to construct.
private StreamConfiguration(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private StreamConfiguration() {
keyType_ = 0;
storageType_ = 0;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new StreamConfiguration();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.apache.bookkeeper.stream.proto.Stream.internal_static_bookkeeper_proto_stream_StreamConfiguration_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.apache.bookkeeper.stream.proto.Stream.internal_static_bookkeeper_proto_stream_StreamConfiguration_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.apache.bookkeeper.stream.proto.StreamConfiguration.class, org.apache.bookkeeper.stream.proto.StreamConfiguration.Builder.class);
}
public static final int KEY_TYPE_FIELD_NUMBER = 1;
private int keyType_ = 0;
/**
* .bookkeeper.proto.stream.RangeKeyType key_type = 1;
* @return The enum numeric value on the wire for keyType.
*/
@java.lang.Override public int getKeyTypeValue() {
return keyType_;
}
/**
* .bookkeeper.proto.stream.RangeKeyType key_type = 1;
* @return The keyType.
*/
@java.lang.Override public org.apache.bookkeeper.stream.proto.RangeKeyType getKeyType() {
org.apache.bookkeeper.stream.proto.RangeKeyType result = org.apache.bookkeeper.stream.proto.RangeKeyType.forNumber(keyType_);
return result == null ? org.apache.bookkeeper.stream.proto.RangeKeyType.UNRECOGNIZED : result;
}
public static final int MIN_NUM_RANGES_FIELD_NUMBER = 2;
private int minNumRanges_ = 0;
/**
* int32 min_num_ranges = 2;
* @return The minNumRanges.
*/
@java.lang.Override
public int getMinNumRanges() {
return minNumRanges_;
}
public static final int INITIAL_NUM_RANGES_FIELD_NUMBER = 3;
private int initialNumRanges_ = 0;
/**
* int32 initial_num_ranges = 3;
* @return The initialNumRanges.
*/
@java.lang.Override
public int getInitialNumRanges() {
return initialNumRanges_;
}
public static final int SPLIT_POLICY_FIELD_NUMBER = 4;
private org.apache.bookkeeper.stream.proto.SplitPolicy splitPolicy_;
/**
* .bookkeeper.proto.stream.SplitPolicy split_policy = 4;
* @return Whether the splitPolicy field is set.
*/
@java.lang.Override
public boolean hasSplitPolicy() {
return splitPolicy_ != null;
}
/**
* .bookkeeper.proto.stream.SplitPolicy split_policy = 4;
* @return The splitPolicy.
*/
@java.lang.Override
public org.apache.bookkeeper.stream.proto.SplitPolicy getSplitPolicy() {
return splitPolicy_ == null ? org.apache.bookkeeper.stream.proto.SplitPolicy.getDefaultInstance() : splitPolicy_;
}
/**
* .bookkeeper.proto.stream.SplitPolicy split_policy = 4;
*/
@java.lang.Override
public org.apache.bookkeeper.stream.proto.SplitPolicyOrBuilder getSplitPolicyOrBuilder() {
return splitPolicy_ == null ? org.apache.bookkeeper.stream.proto.SplitPolicy.getDefaultInstance() : splitPolicy_;
}
public static final int ROLLING_POLICY_FIELD_NUMBER = 5;
private org.apache.bookkeeper.stream.proto.SegmentRollingPolicy rollingPolicy_;
/**
* .bookkeeper.proto.stream.SegmentRollingPolicy rolling_policy = 5;
* @return Whether the rollingPolicy field is set.
*/
@java.lang.Override
public boolean hasRollingPolicy() {
return rollingPolicy_ != null;
}
/**
* .bookkeeper.proto.stream.SegmentRollingPolicy rolling_policy = 5;
* @return The rollingPolicy.
*/
@java.lang.Override
public org.apache.bookkeeper.stream.proto.SegmentRollingPolicy getRollingPolicy() {
return rollingPolicy_ == null ? org.apache.bookkeeper.stream.proto.SegmentRollingPolicy.getDefaultInstance() : rollingPolicy_;
}
/**
* .bookkeeper.proto.stream.SegmentRollingPolicy rolling_policy = 5;
*/
@java.lang.Override
public org.apache.bookkeeper.stream.proto.SegmentRollingPolicyOrBuilder getRollingPolicyOrBuilder() {
return rollingPolicy_ == null ? org.apache.bookkeeper.stream.proto.SegmentRollingPolicy.getDefaultInstance() : rollingPolicy_;
}
public static final int RETENTION_POLICY_FIELD_NUMBER = 6;
private org.apache.bookkeeper.stream.proto.RetentionPolicy retentionPolicy_;
/**
* .bookkeeper.proto.stream.RetentionPolicy retention_policy = 6;
* @return Whether the retentionPolicy field is set.
*/
@java.lang.Override
public boolean hasRetentionPolicy() {
return retentionPolicy_ != null;
}
/**
* .bookkeeper.proto.stream.RetentionPolicy retention_policy = 6;
* @return The retentionPolicy.
*/
@java.lang.Override
public org.apache.bookkeeper.stream.proto.RetentionPolicy getRetentionPolicy() {
return retentionPolicy_ == null ? org.apache.bookkeeper.stream.proto.RetentionPolicy.getDefaultInstance() : retentionPolicy_;
}
/**
* .bookkeeper.proto.stream.RetentionPolicy retention_policy = 6;
*/
@java.lang.Override
public org.apache.bookkeeper.stream.proto.RetentionPolicyOrBuilder getRetentionPolicyOrBuilder() {
return retentionPolicy_ == null ? org.apache.bookkeeper.stream.proto.RetentionPolicy.getDefaultInstance() : retentionPolicy_;
}
public static final int STORAGE_TYPE_FIELD_NUMBER = 7;
private int storageType_ = 0;
/**
* .bookkeeper.proto.stream.StorageType storage_type = 7;
* @return The enum numeric value on the wire for storageType.
*/
@java.lang.Override public int getStorageTypeValue() {
return storageType_;
}
/**
* .bookkeeper.proto.stream.StorageType storage_type = 7;
* @return The storageType.
*/
@java.lang.Override public org.apache.bookkeeper.stream.proto.StorageType getStorageType() {
org.apache.bookkeeper.stream.proto.StorageType result = org.apache.bookkeeper.stream.proto.StorageType.forNumber(storageType_);
return result == null ? org.apache.bookkeeper.stream.proto.StorageType.UNRECOGNIZED : result;
}
public static final int TTL_SECONDS_FIELD_NUMBER = 8;
private int ttlSeconds_ = 0;
/**
* int32 ttl_seconds = 8;
* @return The ttlSeconds.
*/
@java.lang.Override
public int getTtlSeconds() {
return ttlSeconds_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (keyType_ != org.apache.bookkeeper.stream.proto.RangeKeyType.NULL.getNumber()) {
output.writeEnum(1, keyType_);
}
if (minNumRanges_ != 0) {
output.writeInt32(2, minNumRanges_);
}
if (initialNumRanges_ != 0) {
output.writeInt32(3, initialNumRanges_);
}
if (splitPolicy_ != null) {
output.writeMessage(4, getSplitPolicy());
}
if (rollingPolicy_ != null) {
output.writeMessage(5, getRollingPolicy());
}
if (retentionPolicy_ != null) {
output.writeMessage(6, getRetentionPolicy());
}
if (storageType_ != org.apache.bookkeeper.stream.proto.StorageType.STREAM.getNumber()) {
output.writeEnum(7, storageType_);
}
if (ttlSeconds_ != 0) {
output.writeInt32(8, ttlSeconds_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (keyType_ != org.apache.bookkeeper.stream.proto.RangeKeyType.NULL.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(1, keyType_);
}
if (minNumRanges_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(2, minNumRanges_);
}
if (initialNumRanges_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(3, initialNumRanges_);
}
if (splitPolicy_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, getSplitPolicy());
}
if (rollingPolicy_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, getRollingPolicy());
}
if (retentionPolicy_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(6, getRetentionPolicy());
}
if (storageType_ != org.apache.bookkeeper.stream.proto.StorageType.STREAM.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(7, storageType_);
}
if (ttlSeconds_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(8, ttlSeconds_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.apache.bookkeeper.stream.proto.StreamConfiguration)) {
return super.equals(obj);
}
org.apache.bookkeeper.stream.proto.StreamConfiguration other = (org.apache.bookkeeper.stream.proto.StreamConfiguration) obj;
if (keyType_ != other.keyType_) return false;
if (getMinNumRanges()
!= other.getMinNumRanges()) return false;
if (getInitialNumRanges()
!= other.getInitialNumRanges()) return false;
if (hasSplitPolicy() != other.hasSplitPolicy()) return false;
if (hasSplitPolicy()) {
if (!getSplitPolicy()
.equals(other.getSplitPolicy())) return false;
}
if (hasRollingPolicy() != other.hasRollingPolicy()) return false;
if (hasRollingPolicy()) {
if (!getRollingPolicy()
.equals(other.getRollingPolicy())) return false;
}
if (hasRetentionPolicy() != other.hasRetentionPolicy()) return false;
if (hasRetentionPolicy()) {
if (!getRetentionPolicy()
.equals(other.getRetentionPolicy())) return false;
}
if (storageType_ != other.storageType_) return false;
if (getTtlSeconds()
!= other.getTtlSeconds()) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + KEY_TYPE_FIELD_NUMBER;
hash = (53 * hash) + keyType_;
hash = (37 * hash) + MIN_NUM_RANGES_FIELD_NUMBER;
hash = (53 * hash) + getMinNumRanges();
hash = (37 * hash) + INITIAL_NUM_RANGES_FIELD_NUMBER;
hash = (53 * hash) + getInitialNumRanges();
if (hasSplitPolicy()) {
hash = (37 * hash) + SPLIT_POLICY_FIELD_NUMBER;
hash = (53 * hash) + getSplitPolicy().hashCode();
}
if (hasRollingPolicy()) {
hash = (37 * hash) + ROLLING_POLICY_FIELD_NUMBER;
hash = (53 * hash) + getRollingPolicy().hashCode();
}
if (hasRetentionPolicy()) {
hash = (37 * hash) + RETENTION_POLICY_FIELD_NUMBER;
hash = (53 * hash) + getRetentionPolicy().hashCode();
}
hash = (37 * hash) + STORAGE_TYPE_FIELD_NUMBER;
hash = (53 * hash) + storageType_;
hash = (37 * hash) + TTL_SECONDS_FIELD_NUMBER;
hash = (53 * hash) + getTtlSeconds();
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.apache.bookkeeper.stream.proto.StreamConfiguration parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.apache.bookkeeper.stream.proto.StreamConfiguration parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.apache.bookkeeper.stream.proto.StreamConfiguration parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.apache.bookkeeper.stream.proto.StreamConfiguration parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.apache.bookkeeper.stream.proto.StreamConfiguration parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.apache.bookkeeper.stream.proto.StreamConfiguration parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.apache.bookkeeper.stream.proto.StreamConfiguration parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.apache.bookkeeper.stream.proto.StreamConfiguration parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static org.apache.bookkeeper.stream.proto.StreamConfiguration parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.apache.bookkeeper.stream.proto.StreamConfiguration parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static org.apache.bookkeeper.stream.proto.StreamConfiguration parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.apache.bookkeeper.stream.proto.StreamConfiguration parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.apache.bookkeeper.stream.proto.StreamConfiguration prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code bookkeeper.proto.stream.StreamConfiguration}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:bookkeeper.proto.stream.StreamConfiguration)
org.apache.bookkeeper.stream.proto.StreamConfigurationOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.apache.bookkeeper.stream.proto.Stream.internal_static_bookkeeper_proto_stream_StreamConfiguration_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.apache.bookkeeper.stream.proto.Stream.internal_static_bookkeeper_proto_stream_StreamConfiguration_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.apache.bookkeeper.stream.proto.StreamConfiguration.class, org.apache.bookkeeper.stream.proto.StreamConfiguration.Builder.class);
}
// Construct using org.apache.bookkeeper.stream.proto.StreamConfiguration.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
keyType_ = 0;
minNumRanges_ = 0;
initialNumRanges_ = 0;
splitPolicy_ = null;
if (splitPolicyBuilder_ != null) {
splitPolicyBuilder_.dispose();
splitPolicyBuilder_ = null;
}
rollingPolicy_ = null;
if (rollingPolicyBuilder_ != null) {
rollingPolicyBuilder_.dispose();
rollingPolicyBuilder_ = null;
}
retentionPolicy_ = null;
if (retentionPolicyBuilder_ != null) {
retentionPolicyBuilder_.dispose();
retentionPolicyBuilder_ = null;
}
storageType_ = 0;
ttlSeconds_ = 0;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.apache.bookkeeper.stream.proto.Stream.internal_static_bookkeeper_proto_stream_StreamConfiguration_descriptor;
}
@java.lang.Override
public org.apache.bookkeeper.stream.proto.StreamConfiguration getDefaultInstanceForType() {
return org.apache.bookkeeper.stream.proto.StreamConfiguration.getDefaultInstance();
}
@java.lang.Override
public org.apache.bookkeeper.stream.proto.StreamConfiguration build() {
org.apache.bookkeeper.stream.proto.StreamConfiguration result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.apache.bookkeeper.stream.proto.StreamConfiguration buildPartial() {
org.apache.bookkeeper.stream.proto.StreamConfiguration result = new org.apache.bookkeeper.stream.proto.StreamConfiguration(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(org.apache.bookkeeper.stream.proto.StreamConfiguration result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.keyType_ = keyType_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.minNumRanges_ = minNumRanges_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.initialNumRanges_ = initialNumRanges_;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.splitPolicy_ = splitPolicyBuilder_ == null
? splitPolicy_
: splitPolicyBuilder_.build();
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.rollingPolicy_ = rollingPolicyBuilder_ == null
? rollingPolicy_
: rollingPolicyBuilder_.build();
}
if (((from_bitField0_ & 0x00000020) != 0)) {
result.retentionPolicy_ = retentionPolicyBuilder_ == null
? retentionPolicy_
: retentionPolicyBuilder_.build();
}
if (((from_bitField0_ & 0x00000040) != 0)) {
result.storageType_ = storageType_;
}
if (((from_bitField0_ & 0x00000080) != 0)) {
result.ttlSeconds_ = ttlSeconds_;
}
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.apache.bookkeeper.stream.proto.StreamConfiguration) {
return mergeFrom((org.apache.bookkeeper.stream.proto.StreamConfiguration)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.apache.bookkeeper.stream.proto.StreamConfiguration other) {
if (other == org.apache.bookkeeper.stream.proto.StreamConfiguration.getDefaultInstance()) return this;
if (other.keyType_ != 0) {
setKeyTypeValue(other.getKeyTypeValue());
}
if (other.getMinNumRanges() != 0) {
setMinNumRanges(other.getMinNumRanges());
}
if (other.getInitialNumRanges() != 0) {
setInitialNumRanges(other.getInitialNumRanges());
}
if (other.hasSplitPolicy()) {
mergeSplitPolicy(other.getSplitPolicy());
}
if (other.hasRollingPolicy()) {
mergeRollingPolicy(other.getRollingPolicy());
}
if (other.hasRetentionPolicy()) {
mergeRetentionPolicy(other.getRetentionPolicy());
}
if (other.storageType_ != 0) {
setStorageTypeValue(other.getStorageTypeValue());
}
if (other.getTtlSeconds() != 0) {
setTtlSeconds(other.getTtlSeconds());
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8: {
keyType_ = input.readEnum();
bitField0_ |= 0x00000001;
break;
} // case 8
case 16: {
minNumRanges_ = input.readInt32();
bitField0_ |= 0x00000002;
break;
} // case 16
case 24: {
initialNumRanges_ = input.readInt32();
bitField0_ |= 0x00000004;
break;
} // case 24
case 34: {
input.readMessage(
getSplitPolicyFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000008;
break;
} // case 34
case 42: {
input.readMessage(
getRollingPolicyFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000010;
break;
} // case 42
case 50: {
input.readMessage(
getRetentionPolicyFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000020;
break;
} // case 50
case 56: {
storageType_ = input.readEnum();
bitField0_ |= 0x00000040;
break;
} // case 56
case 64: {
ttlSeconds_ = input.readInt32();
bitField0_ |= 0x00000080;
break;
} // case 64
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private int keyType_ = 0;
/**
* .bookkeeper.proto.stream.RangeKeyType key_type = 1;
* @return The enum numeric value on the wire for keyType.
*/
@java.lang.Override public int getKeyTypeValue() {
return keyType_;
}
/**
* .bookkeeper.proto.stream.RangeKeyType key_type = 1;
* @param value The enum numeric value on the wire for keyType to set.
* @return This builder for chaining.
*/
public Builder setKeyTypeValue(int value) {
keyType_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* .bookkeeper.proto.stream.RangeKeyType key_type = 1;
* @return The keyType.
*/
@java.lang.Override
public org.apache.bookkeeper.stream.proto.RangeKeyType getKeyType() {
org.apache.bookkeeper.stream.proto.RangeKeyType result = org.apache.bookkeeper.stream.proto.RangeKeyType.forNumber(keyType_);
return result == null ? org.apache.bookkeeper.stream.proto.RangeKeyType.UNRECOGNIZED : result;
}
/**
* .bookkeeper.proto.stream.RangeKeyType key_type = 1;
* @param value The keyType to set.
* @return This builder for chaining.
*/
public Builder setKeyType(org.apache.bookkeeper.stream.proto.RangeKeyType value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
keyType_ = value.getNumber();
onChanged();
return this;
}
/**
* .bookkeeper.proto.stream.RangeKeyType key_type = 1;
* @return This builder for chaining.
*/
public Builder clearKeyType() {
bitField0_ = (bitField0_ & ~0x00000001);
keyType_ = 0;
onChanged();
return this;
}
private int minNumRanges_ ;
/**
* int32 min_num_ranges = 2;
* @return The minNumRanges.
*/
@java.lang.Override
public int getMinNumRanges() {
return minNumRanges_;
}
/**
* int32 min_num_ranges = 2;
* @param value The minNumRanges to set.
* @return This builder for chaining.
*/
public Builder setMinNumRanges(int value) {
minNumRanges_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
* int32 min_num_ranges = 2;
* @return This builder for chaining.
*/
public Builder clearMinNumRanges() {
bitField0_ = (bitField0_ & ~0x00000002);
minNumRanges_ = 0;
onChanged();
return this;
}
private int initialNumRanges_ ;
/**
* int32 initial_num_ranges = 3;
* @return The initialNumRanges.
*/
@java.lang.Override
public int getInitialNumRanges() {
return initialNumRanges_;
}
/**
* int32 initial_num_ranges = 3;
* @param value The initialNumRanges to set.
* @return This builder for chaining.
*/
public Builder setInitialNumRanges(int value) {
initialNumRanges_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
* int32 initial_num_ranges = 3;
* @return This builder for chaining.
*/
public Builder clearInitialNumRanges() {
bitField0_ = (bitField0_ & ~0x00000004);
initialNumRanges_ = 0;
onChanged();
return this;
}
private org.apache.bookkeeper.stream.proto.SplitPolicy splitPolicy_;
private com.google.protobuf.SingleFieldBuilderV3<
org.apache.bookkeeper.stream.proto.SplitPolicy, org.apache.bookkeeper.stream.proto.SplitPolicy.Builder, org.apache.bookkeeper.stream.proto.SplitPolicyOrBuilder> splitPolicyBuilder_;
/**
* .bookkeeper.proto.stream.SplitPolicy split_policy = 4;
* @return Whether the splitPolicy field is set.
*/
public boolean hasSplitPolicy() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
* .bookkeeper.proto.stream.SplitPolicy split_policy = 4;
* @return The splitPolicy.
*/
public org.apache.bookkeeper.stream.proto.SplitPolicy getSplitPolicy() {
if (splitPolicyBuilder_ == null) {
return splitPolicy_ == null ? org.apache.bookkeeper.stream.proto.SplitPolicy.getDefaultInstance() : splitPolicy_;
} else {
return splitPolicyBuilder_.getMessage();
}
}
/**
* .bookkeeper.proto.stream.SplitPolicy split_policy = 4;
*/
public Builder setSplitPolicy(org.apache.bookkeeper.stream.proto.SplitPolicy value) {
if (splitPolicyBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
splitPolicy_ = value;
} else {
splitPolicyBuilder_.setMessage(value);
}
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
* .bookkeeper.proto.stream.SplitPolicy split_policy = 4;
*/
public Builder setSplitPolicy(
org.apache.bookkeeper.stream.proto.SplitPolicy.Builder builderForValue) {
if (splitPolicyBuilder_ == null) {
splitPolicy_ = builderForValue.build();
} else {
splitPolicyBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
* .bookkeeper.proto.stream.SplitPolicy split_policy = 4;
*/
public Builder mergeSplitPolicy(org.apache.bookkeeper.stream.proto.SplitPolicy value) {
if (splitPolicyBuilder_ == null) {
if (((bitField0_ & 0x00000008) != 0) &&
splitPolicy_ != null &&
splitPolicy_ != org.apache.bookkeeper.stream.proto.SplitPolicy.getDefaultInstance()) {
getSplitPolicyBuilder().mergeFrom(value);
} else {
splitPolicy_ = value;
}
} else {
splitPolicyBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
* .bookkeeper.proto.stream.SplitPolicy split_policy = 4;
*/
public Builder clearSplitPolicy() {
bitField0_ = (bitField0_ & ~0x00000008);
splitPolicy_ = null;
if (splitPolicyBuilder_ != null) {
splitPolicyBuilder_.dispose();
splitPolicyBuilder_ = null;
}
onChanged();
return this;
}
/**
* .bookkeeper.proto.stream.SplitPolicy split_policy = 4;
*/
public org.apache.bookkeeper.stream.proto.SplitPolicy.Builder getSplitPolicyBuilder() {
bitField0_ |= 0x00000008;
onChanged();
return getSplitPolicyFieldBuilder().getBuilder();
}
/**
* .bookkeeper.proto.stream.SplitPolicy split_policy = 4;
*/
public org.apache.bookkeeper.stream.proto.SplitPolicyOrBuilder getSplitPolicyOrBuilder() {
if (splitPolicyBuilder_ != null) {
return splitPolicyBuilder_.getMessageOrBuilder();
} else {
return splitPolicy_ == null ?
org.apache.bookkeeper.stream.proto.SplitPolicy.getDefaultInstance() : splitPolicy_;
}
}
/**
* .bookkeeper.proto.stream.SplitPolicy split_policy = 4;
*/
private com.google.protobuf.SingleFieldBuilderV3<
org.apache.bookkeeper.stream.proto.SplitPolicy, org.apache.bookkeeper.stream.proto.SplitPolicy.Builder, org.apache.bookkeeper.stream.proto.SplitPolicyOrBuilder>
getSplitPolicyFieldBuilder() {
if (splitPolicyBuilder_ == null) {
splitPolicyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
org.apache.bookkeeper.stream.proto.SplitPolicy, org.apache.bookkeeper.stream.proto.SplitPolicy.Builder, org.apache.bookkeeper.stream.proto.SplitPolicyOrBuilder>(
getSplitPolicy(),
getParentForChildren(),
isClean());
splitPolicy_ = null;
}
return splitPolicyBuilder_;
}
private org.apache.bookkeeper.stream.proto.SegmentRollingPolicy rollingPolicy_;
private com.google.protobuf.SingleFieldBuilderV3<
org.apache.bookkeeper.stream.proto.SegmentRollingPolicy, org.apache.bookkeeper.stream.proto.SegmentRollingPolicy.Builder, org.apache.bookkeeper.stream.proto.SegmentRollingPolicyOrBuilder> rollingPolicyBuilder_;
/**
* .bookkeeper.proto.stream.SegmentRollingPolicy rolling_policy = 5;
* @return Whether the rollingPolicy field is set.
*/
public boolean hasRollingPolicy() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
* .bookkeeper.proto.stream.SegmentRollingPolicy rolling_policy = 5;
* @return The rollingPolicy.
*/
public org.apache.bookkeeper.stream.proto.SegmentRollingPolicy getRollingPolicy() {
if (rollingPolicyBuilder_ == null) {
return rollingPolicy_ == null ? org.apache.bookkeeper.stream.proto.SegmentRollingPolicy.getDefaultInstance() : rollingPolicy_;
} else {
return rollingPolicyBuilder_.getMessage();
}
}
/**
* .bookkeeper.proto.stream.SegmentRollingPolicy rolling_policy = 5;
*/
public Builder setRollingPolicy(org.apache.bookkeeper.stream.proto.SegmentRollingPolicy value) {
if (rollingPolicyBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
rollingPolicy_ = value;
} else {
rollingPolicyBuilder_.setMessage(value);
}
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
* .bookkeeper.proto.stream.SegmentRollingPolicy rolling_policy = 5;
*/
public Builder setRollingPolicy(
org.apache.bookkeeper.stream.proto.SegmentRollingPolicy.Builder builderForValue) {
if (rollingPolicyBuilder_ == null) {
rollingPolicy_ = builderForValue.build();
} else {
rollingPolicyBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
* .bookkeeper.proto.stream.SegmentRollingPolicy rolling_policy = 5;
*/
public Builder mergeRollingPolicy(org.apache.bookkeeper.stream.proto.SegmentRollingPolicy value) {
if (rollingPolicyBuilder_ == null) {
if (((bitField0_ & 0x00000010) != 0) &&
rollingPolicy_ != null &&
rollingPolicy_ != org.apache.bookkeeper.stream.proto.SegmentRollingPolicy.getDefaultInstance()) {
getRollingPolicyBuilder().mergeFrom(value);
} else {
rollingPolicy_ = value;
}
} else {
rollingPolicyBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
* .bookkeeper.proto.stream.SegmentRollingPolicy rolling_policy = 5;
*/
public Builder clearRollingPolicy() {
bitField0_ = (bitField0_ & ~0x00000010);
rollingPolicy_ = null;
if (rollingPolicyBuilder_ != null) {
rollingPolicyBuilder_.dispose();
rollingPolicyBuilder_ = null;
}
onChanged();
return this;
}
/**
* .bookkeeper.proto.stream.SegmentRollingPolicy rolling_policy = 5;
*/
public org.apache.bookkeeper.stream.proto.SegmentRollingPolicy.Builder getRollingPolicyBuilder() {
bitField0_ |= 0x00000010;
onChanged();
return getRollingPolicyFieldBuilder().getBuilder();
}
/**
* .bookkeeper.proto.stream.SegmentRollingPolicy rolling_policy = 5;
*/
public org.apache.bookkeeper.stream.proto.SegmentRollingPolicyOrBuilder getRollingPolicyOrBuilder() {
if (rollingPolicyBuilder_ != null) {
return rollingPolicyBuilder_.getMessageOrBuilder();
} else {
return rollingPolicy_ == null ?
org.apache.bookkeeper.stream.proto.SegmentRollingPolicy.getDefaultInstance() : rollingPolicy_;
}
}
/**
* .bookkeeper.proto.stream.SegmentRollingPolicy rolling_policy = 5;
*/
private com.google.protobuf.SingleFieldBuilderV3<
org.apache.bookkeeper.stream.proto.SegmentRollingPolicy, org.apache.bookkeeper.stream.proto.SegmentRollingPolicy.Builder, org.apache.bookkeeper.stream.proto.SegmentRollingPolicyOrBuilder>
getRollingPolicyFieldBuilder() {
if (rollingPolicyBuilder_ == null) {
rollingPolicyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
org.apache.bookkeeper.stream.proto.SegmentRollingPolicy, org.apache.bookkeeper.stream.proto.SegmentRollingPolicy.Builder, org.apache.bookkeeper.stream.proto.SegmentRollingPolicyOrBuilder>(
getRollingPolicy(),
getParentForChildren(),
isClean());
rollingPolicy_ = null;
}
return rollingPolicyBuilder_;
}
private org.apache.bookkeeper.stream.proto.RetentionPolicy retentionPolicy_;
private com.google.protobuf.SingleFieldBuilderV3<
org.apache.bookkeeper.stream.proto.RetentionPolicy, org.apache.bookkeeper.stream.proto.RetentionPolicy.Builder, org.apache.bookkeeper.stream.proto.RetentionPolicyOrBuilder> retentionPolicyBuilder_;
/**
* .bookkeeper.proto.stream.RetentionPolicy retention_policy = 6;
* @return Whether the retentionPolicy field is set.
*/
public boolean hasRetentionPolicy() {
return ((bitField0_ & 0x00000020) != 0);
}
/**
* .bookkeeper.proto.stream.RetentionPolicy retention_policy = 6;
* @return The retentionPolicy.
*/
public org.apache.bookkeeper.stream.proto.RetentionPolicy getRetentionPolicy() {
if (retentionPolicyBuilder_ == null) {
return retentionPolicy_ == null ? org.apache.bookkeeper.stream.proto.RetentionPolicy.getDefaultInstance() : retentionPolicy_;
} else {
return retentionPolicyBuilder_.getMessage();
}
}
/**
* .bookkeeper.proto.stream.RetentionPolicy retention_policy = 6;
*/
public Builder setRetentionPolicy(org.apache.bookkeeper.stream.proto.RetentionPolicy value) {
if (retentionPolicyBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
retentionPolicy_ = value;
} else {
retentionPolicyBuilder_.setMessage(value);
}
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
* .bookkeeper.proto.stream.RetentionPolicy retention_policy = 6;
*/
public Builder setRetentionPolicy(
org.apache.bookkeeper.stream.proto.RetentionPolicy.Builder builderForValue) {
if (retentionPolicyBuilder_ == null) {
retentionPolicy_ = builderForValue.build();
} else {
retentionPolicyBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
* .bookkeeper.proto.stream.RetentionPolicy retention_policy = 6;
*/
public Builder mergeRetentionPolicy(org.apache.bookkeeper.stream.proto.RetentionPolicy value) {
if (retentionPolicyBuilder_ == null) {
if (((bitField0_ & 0x00000020) != 0) &&
retentionPolicy_ != null &&
retentionPolicy_ != org.apache.bookkeeper.stream.proto.RetentionPolicy.getDefaultInstance()) {
getRetentionPolicyBuilder().mergeFrom(value);
} else {
retentionPolicy_ = value;
}
} else {
retentionPolicyBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
* .bookkeeper.proto.stream.RetentionPolicy retention_policy = 6;
*/
public Builder clearRetentionPolicy() {
bitField0_ = (bitField0_ & ~0x00000020);
retentionPolicy_ = null;
if (retentionPolicyBuilder_ != null) {
retentionPolicyBuilder_.dispose();
retentionPolicyBuilder_ = null;
}
onChanged();
return this;
}
/**
* .bookkeeper.proto.stream.RetentionPolicy retention_policy = 6;
*/
public org.apache.bookkeeper.stream.proto.RetentionPolicy.Builder getRetentionPolicyBuilder() {
bitField0_ |= 0x00000020;
onChanged();
return getRetentionPolicyFieldBuilder().getBuilder();
}
/**
* .bookkeeper.proto.stream.RetentionPolicy retention_policy = 6;
*/
public org.apache.bookkeeper.stream.proto.RetentionPolicyOrBuilder getRetentionPolicyOrBuilder() {
if (retentionPolicyBuilder_ != null) {
return retentionPolicyBuilder_.getMessageOrBuilder();
} else {
return retentionPolicy_ == null ?
org.apache.bookkeeper.stream.proto.RetentionPolicy.getDefaultInstance() : retentionPolicy_;
}
}
/**
* .bookkeeper.proto.stream.RetentionPolicy retention_policy = 6;
*/
private com.google.protobuf.SingleFieldBuilderV3<
org.apache.bookkeeper.stream.proto.RetentionPolicy, org.apache.bookkeeper.stream.proto.RetentionPolicy.Builder, org.apache.bookkeeper.stream.proto.RetentionPolicyOrBuilder>
getRetentionPolicyFieldBuilder() {
if (retentionPolicyBuilder_ == null) {
retentionPolicyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
org.apache.bookkeeper.stream.proto.RetentionPolicy, org.apache.bookkeeper.stream.proto.RetentionPolicy.Builder, org.apache.bookkeeper.stream.proto.RetentionPolicyOrBuilder>(
getRetentionPolicy(),
getParentForChildren(),
isClean());
retentionPolicy_ = null;
}
return retentionPolicyBuilder_;
}
private int storageType_ = 0;
/**
* .bookkeeper.proto.stream.StorageType storage_type = 7;
* @return The enum numeric value on the wire for storageType.
*/
@java.lang.Override public int getStorageTypeValue() {
return storageType_;
}
/**
* .bookkeeper.proto.stream.StorageType storage_type = 7;
* @param value The enum numeric value on the wire for storageType to set.
* @return This builder for chaining.
*/
public Builder setStorageTypeValue(int value) {
storageType_ = value;
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
* .bookkeeper.proto.stream.StorageType storage_type = 7;
* @return The storageType.
*/
@java.lang.Override
public org.apache.bookkeeper.stream.proto.StorageType getStorageType() {
org.apache.bookkeeper.stream.proto.StorageType result = org.apache.bookkeeper.stream.proto.StorageType.forNumber(storageType_);
return result == null ? org.apache.bookkeeper.stream.proto.StorageType.UNRECOGNIZED : result;
}
/**
* .bookkeeper.proto.stream.StorageType storage_type = 7;
* @param value The storageType to set.
* @return This builder for chaining.
*/
public Builder setStorageType(org.apache.bookkeeper.stream.proto.StorageType value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000040;
storageType_ = value.getNumber();
onChanged();
return this;
}
/**
* .bookkeeper.proto.stream.StorageType storage_type = 7;
* @return This builder for chaining.
*/
public Builder clearStorageType() {
bitField0_ = (bitField0_ & ~0x00000040);
storageType_ = 0;
onChanged();
return this;
}
private int ttlSeconds_ ;
/**
* int32 ttl_seconds = 8;
* @return The ttlSeconds.
*/
@java.lang.Override
public int getTtlSeconds() {
return ttlSeconds_;
}
/**
* int32 ttl_seconds = 8;
* @param value The ttlSeconds to set.
* @return This builder for chaining.
*/
public Builder setTtlSeconds(int value) {
ttlSeconds_ = value;
bitField0_ |= 0x00000080;
onChanged();
return this;
}
/**
* int32 ttl_seconds = 8;
* @return This builder for chaining.
*/
public Builder clearTtlSeconds() {
bitField0_ = (bitField0_ & ~0x00000080);
ttlSeconds_ = 0;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:bookkeeper.proto.stream.StreamConfiguration)
}
// @@protoc_insertion_point(class_scope:bookkeeper.proto.stream.StreamConfiguration)
private static final org.apache.bookkeeper.stream.proto.StreamConfiguration DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.apache.bookkeeper.stream.proto.StreamConfiguration();
}
public static org.apache.bookkeeper.stream.proto.StreamConfiguration getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public StreamConfiguration parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public org.apache.bookkeeper.stream.proto.StreamConfiguration getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}