org.apache.bookkeeper.stream.proto.RangeMetadata 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.RangeMetadata}
*/
public final class RangeMetadata extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:bookkeeper.proto.stream.RangeMetadata)
RangeMetadataOrBuilder {
private static final long serialVersionUID = 0L;
// Use RangeMetadata.newBuilder() to construct.
private RangeMetadata(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private RangeMetadata() {
revision_ = 0L;
state_ = 0;
createTime_ = 0L;
fenceTime_ = 0L;
children_ = java.util.Collections.emptyList();
parents_ = java.util.Collections.emptyList();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private RangeMetadata(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
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 (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
case 10: {
org.apache.bookkeeper.stream.proto.RangeProperties.Builder subBuilder = null;
if (props_ != null) {
subBuilder = props_.toBuilder();
}
props_ = input.readMessage(org.apache.bookkeeper.stream.proto.RangeProperties.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(props_);
props_ = subBuilder.buildPartial();
}
break;
}
case 16: {
revision_ = input.readInt64();
break;
}
case 24: {
int rawValue = input.readEnum();
state_ = rawValue;
break;
}
case 80: {
createTime_ = input.readInt64();
break;
}
case 88: {
fenceTime_ = input.readInt64();
break;
}
case 160: {
if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) {
children_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000020;
}
children_.add(input.readInt64());
break;
}
case 162: {
int length = input.readRawVarint32();
int limit = input.pushLimit(length);
if (!((mutable_bitField0_ & 0x00000020) == 0x00000020) && input.getBytesUntilLimit() > 0) {
children_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000020;
}
while (input.getBytesUntilLimit() > 0) {
children_.add(input.readInt64());
}
input.popLimit(limit);
break;
}
case 168: {
if (!((mutable_bitField0_ & 0x00000040) == 0x00000040)) {
parents_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000040;
}
parents_.add(input.readInt64());
break;
}
case 170: {
int length = input.readRawVarint32();
int limit = input.pushLimit(length);
if (!((mutable_bitField0_ & 0x00000040) == 0x00000040) && input.getBytesUntilLimit() > 0) {
parents_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000040;
}
while (input.getBytesUntilLimit() > 0) {
parents_.add(input.readInt64());
}
input.popLimit(limit);
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000020) == 0x00000020)) {
children_ = java.util.Collections.unmodifiableList(children_);
}
if (((mutable_bitField0_ & 0x00000040) == 0x00000040)) {
parents_ = java.util.Collections.unmodifiableList(parents_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.apache.bookkeeper.stream.proto.Stream.internal_static_bookkeeper_proto_stream_RangeMetadata_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.apache.bookkeeper.stream.proto.Stream.internal_static_bookkeeper_proto_stream_RangeMetadata_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.apache.bookkeeper.stream.proto.RangeMetadata.class, org.apache.bookkeeper.stream.proto.RangeMetadata.Builder.class);
}
private int bitField0_;
public static final int PROPS_FIELD_NUMBER = 1;
private org.apache.bookkeeper.stream.proto.RangeProperties props_;
/**
* .bookkeeper.proto.stream.RangeProperties props = 1;
*/
public boolean hasProps() {
return props_ != null;
}
/**
* .bookkeeper.proto.stream.RangeProperties props = 1;
*/
public org.apache.bookkeeper.stream.proto.RangeProperties getProps() {
return props_ == null ? org.apache.bookkeeper.stream.proto.RangeProperties.getDefaultInstance() : props_;
}
/**
* .bookkeeper.proto.stream.RangeProperties props = 1;
*/
public org.apache.bookkeeper.stream.proto.RangePropertiesOrBuilder getPropsOrBuilder() {
return getProps();
}
public static final int REVISION_FIELD_NUMBER = 2;
private long revision_;
/**
* int64 revision = 2;
*/
public long getRevision() {
return revision_;
}
public static final int STATE_FIELD_NUMBER = 3;
private int state_;
/**
* .bookkeeper.proto.stream.RangeState state = 3;
*/
public int getStateValue() {
return state_;
}
/**
* .bookkeeper.proto.stream.RangeState state = 3;
*/
public org.apache.bookkeeper.stream.proto.RangeState getState() {
org.apache.bookkeeper.stream.proto.RangeState result = org.apache.bookkeeper.stream.proto.RangeState.valueOf(state_);
return result == null ? org.apache.bookkeeper.stream.proto.RangeState.UNRECOGNIZED : result;
}
public static final int CREATE_TIME_FIELD_NUMBER = 10;
private long createTime_;
/**
*
* time
*
*
* int64 create_time = 10;
*/
public long getCreateTime() {
return createTime_;
}
public static final int FENCE_TIME_FIELD_NUMBER = 11;
private long fenceTime_;
/**
* int64 fence_time = 11;
*/
public long getFenceTime() {
return fenceTime_;
}
public static final int CHILDREN_FIELD_NUMBER = 20;
private java.util.List children_;
/**
*
* children and parents
*
*
* repeated int64 children = 20;
*/
public java.util.List
getChildrenList() {
return children_;
}
/**
*
* children and parents
*
*
* repeated int64 children = 20;
*/
public int getChildrenCount() {
return children_.size();
}
/**
*
* children and parents
*
*
* repeated int64 children = 20;
*/
public long getChildren(int index) {
return children_.get(index);
}
private int childrenMemoizedSerializedSize = -1;
public static final int PARENTS_FIELD_NUMBER = 21;
private java.util.List parents_;
/**
* repeated int64 parents = 21;
*/
public java.util.List
getParentsList() {
return parents_;
}
/**
* repeated int64 parents = 21;
*/
public int getParentsCount() {
return parents_.size();
}
/**
* repeated int64 parents = 21;
*/
public long getParents(int index) {
return parents_.get(index);
}
private int parentsMemoizedSerializedSize = -1;
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
if (props_ != null) {
output.writeMessage(1, getProps());
}
if (revision_ != 0L) {
output.writeInt64(2, revision_);
}
if (state_ != org.apache.bookkeeper.stream.proto.RangeState.RANGE_ACTIVE.getNumber()) {
output.writeEnum(3, state_);
}
if (createTime_ != 0L) {
output.writeInt64(10, createTime_);
}
if (fenceTime_ != 0L) {
output.writeInt64(11, fenceTime_);
}
if (getChildrenList().size() > 0) {
output.writeUInt32NoTag(162);
output.writeUInt32NoTag(childrenMemoizedSerializedSize);
}
for (int i = 0; i < children_.size(); i++) {
output.writeInt64NoTag(children_.get(i));
}
if (getParentsList().size() > 0) {
output.writeUInt32NoTag(170);
output.writeUInt32NoTag(parentsMemoizedSerializedSize);
}
for (int i = 0; i < parents_.size(); i++) {
output.writeInt64NoTag(parents_.get(i));
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (props_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getProps());
}
if (revision_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(2, revision_);
}
if (state_ != org.apache.bookkeeper.stream.proto.RangeState.RANGE_ACTIVE.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(3, state_);
}
if (createTime_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(10, createTime_);
}
if (fenceTime_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(11, fenceTime_);
}
{
int dataSize = 0;
for (int i = 0; i < children_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeInt64SizeNoTag(children_.get(i));
}
size += dataSize;
if (!getChildrenList().isEmpty()) {
size += 2;
size += com.google.protobuf.CodedOutputStream
.computeInt32SizeNoTag(dataSize);
}
childrenMemoizedSerializedSize = dataSize;
}
{
int dataSize = 0;
for (int i = 0; i < parents_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeInt64SizeNoTag(parents_.get(i));
}
size += dataSize;
if (!getParentsList().isEmpty()) {
size += 2;
size += com.google.protobuf.CodedOutputStream
.computeInt32SizeNoTag(dataSize);
}
parentsMemoizedSerializedSize = dataSize;
}
size += unknownFields.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.RangeMetadata)) {
return super.equals(obj);
}
org.apache.bookkeeper.stream.proto.RangeMetadata other = (org.apache.bookkeeper.stream.proto.RangeMetadata) obj;
boolean result = true;
result = result && (hasProps() == other.hasProps());
if (hasProps()) {
result = result && getProps()
.equals(other.getProps());
}
result = result && (getRevision()
== other.getRevision());
result = result && state_ == other.state_;
result = result && (getCreateTime()
== other.getCreateTime());
result = result && (getFenceTime()
== other.getFenceTime());
result = result && getChildrenList()
.equals(other.getChildrenList());
result = result && getParentsList()
.equals(other.getParentsList());
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasProps()) {
hash = (37 * hash) + PROPS_FIELD_NUMBER;
hash = (53 * hash) + getProps().hashCode();
}
hash = (37 * hash) + REVISION_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getRevision());
hash = (37 * hash) + STATE_FIELD_NUMBER;
hash = (53 * hash) + state_;
hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getCreateTime());
hash = (37 * hash) + FENCE_TIME_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getFenceTime());
if (getChildrenCount() > 0) {
hash = (37 * hash) + CHILDREN_FIELD_NUMBER;
hash = (53 * hash) + getChildrenList().hashCode();
}
if (getParentsCount() > 0) {
hash = (37 * hash) + PARENTS_FIELD_NUMBER;
hash = (53 * hash) + getParentsList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.apache.bookkeeper.stream.proto.RangeMetadata parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.apache.bookkeeper.stream.proto.RangeMetadata 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.RangeMetadata parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.apache.bookkeeper.stream.proto.RangeMetadata 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.RangeMetadata parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.apache.bookkeeper.stream.proto.RangeMetadata 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.RangeMetadata parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.apache.bookkeeper.stream.proto.RangeMetadata 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.RangeMetadata parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.apache.bookkeeper.stream.proto.RangeMetadata 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.RangeMetadata 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.RangeMetadata parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.apache.bookkeeper.stream.proto.RangeMetadata prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
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.RangeMetadata}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:bookkeeper.proto.stream.RangeMetadata)
org.apache.bookkeeper.stream.proto.RangeMetadataOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.apache.bookkeeper.stream.proto.Stream.internal_static_bookkeeper_proto_stream_RangeMetadata_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.apache.bookkeeper.stream.proto.Stream.internal_static_bookkeeper_proto_stream_RangeMetadata_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.apache.bookkeeper.stream.proto.RangeMetadata.class, org.apache.bookkeeper.stream.proto.RangeMetadata.Builder.class);
}
// Construct using org.apache.bookkeeper.stream.proto.RangeMetadata.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
if (propsBuilder_ == null) {
props_ = null;
} else {
props_ = null;
propsBuilder_ = null;
}
revision_ = 0L;
state_ = 0;
createTime_ = 0L;
fenceTime_ = 0L;
children_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000020);
parents_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000040);
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.apache.bookkeeper.stream.proto.Stream.internal_static_bookkeeper_proto_stream_RangeMetadata_descriptor;
}
public org.apache.bookkeeper.stream.proto.RangeMetadata getDefaultInstanceForType() {
return org.apache.bookkeeper.stream.proto.RangeMetadata.getDefaultInstance();
}
public org.apache.bookkeeper.stream.proto.RangeMetadata build() {
org.apache.bookkeeper.stream.proto.RangeMetadata result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public org.apache.bookkeeper.stream.proto.RangeMetadata buildPartial() {
org.apache.bookkeeper.stream.proto.RangeMetadata result = new org.apache.bookkeeper.stream.proto.RangeMetadata(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (propsBuilder_ == null) {
result.props_ = props_;
} else {
result.props_ = propsBuilder_.build();
}
result.revision_ = revision_;
result.state_ = state_;
result.createTime_ = createTime_;
result.fenceTime_ = fenceTime_;
if (((bitField0_ & 0x00000020) == 0x00000020)) {
children_ = java.util.Collections.unmodifiableList(children_);
bitField0_ = (bitField0_ & ~0x00000020);
}
result.children_ = children_;
if (((bitField0_ & 0x00000040) == 0x00000040)) {
parents_ = java.util.Collections.unmodifiableList(parents_);
bitField0_ = (bitField0_ & ~0x00000040);
}
result.parents_ = parents_;
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.apache.bookkeeper.stream.proto.RangeMetadata) {
return mergeFrom((org.apache.bookkeeper.stream.proto.RangeMetadata)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.apache.bookkeeper.stream.proto.RangeMetadata other) {
if (other == org.apache.bookkeeper.stream.proto.RangeMetadata.getDefaultInstance()) return this;
if (other.hasProps()) {
mergeProps(other.getProps());
}
if (other.getRevision() != 0L) {
setRevision(other.getRevision());
}
if (other.state_ != 0) {
setStateValue(other.getStateValue());
}
if (other.getCreateTime() != 0L) {
setCreateTime(other.getCreateTime());
}
if (other.getFenceTime() != 0L) {
setFenceTime(other.getFenceTime());
}
if (!other.children_.isEmpty()) {
if (children_.isEmpty()) {
children_ = other.children_;
bitField0_ = (bitField0_ & ~0x00000020);
} else {
ensureChildrenIsMutable();
children_.addAll(other.children_);
}
onChanged();
}
if (!other.parents_.isEmpty()) {
if (parents_.isEmpty()) {
parents_ = other.parents_;
bitField0_ = (bitField0_ & ~0x00000040);
} else {
ensureParentsIsMutable();
parents_.addAll(other.parents_);
}
onChanged();
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.apache.bookkeeper.stream.proto.RangeMetadata parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.apache.bookkeeper.stream.proto.RangeMetadata) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private org.apache.bookkeeper.stream.proto.RangeProperties props_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
org.apache.bookkeeper.stream.proto.RangeProperties, org.apache.bookkeeper.stream.proto.RangeProperties.Builder, org.apache.bookkeeper.stream.proto.RangePropertiesOrBuilder> propsBuilder_;
/**
* .bookkeeper.proto.stream.RangeProperties props = 1;
*/
public boolean hasProps() {
return propsBuilder_ != null || props_ != null;
}
/**
* .bookkeeper.proto.stream.RangeProperties props = 1;
*/
public org.apache.bookkeeper.stream.proto.RangeProperties getProps() {
if (propsBuilder_ == null) {
return props_ == null ? org.apache.bookkeeper.stream.proto.RangeProperties.getDefaultInstance() : props_;
} else {
return propsBuilder_.getMessage();
}
}
/**
* .bookkeeper.proto.stream.RangeProperties props = 1;
*/
public Builder setProps(org.apache.bookkeeper.stream.proto.RangeProperties value) {
if (propsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
props_ = value;
onChanged();
} else {
propsBuilder_.setMessage(value);
}
return this;
}
/**
* .bookkeeper.proto.stream.RangeProperties props = 1;
*/
public Builder setProps(
org.apache.bookkeeper.stream.proto.RangeProperties.Builder builderForValue) {
if (propsBuilder_ == null) {
props_ = builderForValue.build();
onChanged();
} else {
propsBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* .bookkeeper.proto.stream.RangeProperties props = 1;
*/
public Builder mergeProps(org.apache.bookkeeper.stream.proto.RangeProperties value) {
if (propsBuilder_ == null) {
if (props_ != null) {
props_ =
org.apache.bookkeeper.stream.proto.RangeProperties.newBuilder(props_).mergeFrom(value).buildPartial();
} else {
props_ = value;
}
onChanged();
} else {
propsBuilder_.mergeFrom(value);
}
return this;
}
/**
* .bookkeeper.proto.stream.RangeProperties props = 1;
*/
public Builder clearProps() {
if (propsBuilder_ == null) {
props_ = null;
onChanged();
} else {
props_ = null;
propsBuilder_ = null;
}
return this;
}
/**
* .bookkeeper.proto.stream.RangeProperties props = 1;
*/
public org.apache.bookkeeper.stream.proto.RangeProperties.Builder getPropsBuilder() {
onChanged();
return getPropsFieldBuilder().getBuilder();
}
/**
* .bookkeeper.proto.stream.RangeProperties props = 1;
*/
public org.apache.bookkeeper.stream.proto.RangePropertiesOrBuilder getPropsOrBuilder() {
if (propsBuilder_ != null) {
return propsBuilder_.getMessageOrBuilder();
} else {
return props_ == null ?
org.apache.bookkeeper.stream.proto.RangeProperties.getDefaultInstance() : props_;
}
}
/**
* .bookkeeper.proto.stream.RangeProperties props = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
org.apache.bookkeeper.stream.proto.RangeProperties, org.apache.bookkeeper.stream.proto.RangeProperties.Builder, org.apache.bookkeeper.stream.proto.RangePropertiesOrBuilder>
getPropsFieldBuilder() {
if (propsBuilder_ == null) {
propsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
org.apache.bookkeeper.stream.proto.RangeProperties, org.apache.bookkeeper.stream.proto.RangeProperties.Builder, org.apache.bookkeeper.stream.proto.RangePropertiesOrBuilder>(
getProps(),
getParentForChildren(),
isClean());
props_ = null;
}
return propsBuilder_;
}
private long revision_ ;
/**
* int64 revision = 2;
*/
public long getRevision() {
return revision_;
}
/**
* int64 revision = 2;
*/
public Builder setRevision(long value) {
revision_ = value;
onChanged();
return this;
}
/**
* int64 revision = 2;
*/
public Builder clearRevision() {
revision_ = 0L;
onChanged();
return this;
}
private int state_ = 0;
/**
* .bookkeeper.proto.stream.RangeState state = 3;
*/
public int getStateValue() {
return state_;
}
/**
* .bookkeeper.proto.stream.RangeState state = 3;
*/
public Builder setStateValue(int value) {
state_ = value;
onChanged();
return this;
}
/**
* .bookkeeper.proto.stream.RangeState state = 3;
*/
public org.apache.bookkeeper.stream.proto.RangeState getState() {
org.apache.bookkeeper.stream.proto.RangeState result = org.apache.bookkeeper.stream.proto.RangeState.valueOf(state_);
return result == null ? org.apache.bookkeeper.stream.proto.RangeState.UNRECOGNIZED : result;
}
/**
* .bookkeeper.proto.stream.RangeState state = 3;
*/
public Builder setState(org.apache.bookkeeper.stream.proto.RangeState value) {
if (value == null) {
throw new NullPointerException();
}
state_ = value.getNumber();
onChanged();
return this;
}
/**
* .bookkeeper.proto.stream.RangeState state = 3;
*/
public Builder clearState() {
state_ = 0;
onChanged();
return this;
}
private long createTime_ ;
/**
*
* time
*
*
* int64 create_time = 10;
*/
public long getCreateTime() {
return createTime_;
}
/**
*
* time
*
*
* int64 create_time = 10;
*/
public Builder setCreateTime(long value) {
createTime_ = value;
onChanged();
return this;
}
/**
*
* time
*
*
* int64 create_time = 10;
*/
public Builder clearCreateTime() {
createTime_ = 0L;
onChanged();
return this;
}
private long fenceTime_ ;
/**
* int64 fence_time = 11;
*/
public long getFenceTime() {
return fenceTime_;
}
/**
* int64 fence_time = 11;
*/
public Builder setFenceTime(long value) {
fenceTime_ = value;
onChanged();
return this;
}
/**
* int64 fence_time = 11;
*/
public Builder clearFenceTime() {
fenceTime_ = 0L;
onChanged();
return this;
}
private java.util.List children_ = java.util.Collections.emptyList();
private void ensureChildrenIsMutable() {
if (!((bitField0_ & 0x00000020) == 0x00000020)) {
children_ = new java.util.ArrayList(children_);
bitField0_ |= 0x00000020;
}
}
/**
*
* children and parents
*
*
* repeated int64 children = 20;
*/
public java.util.List
getChildrenList() {
return java.util.Collections.unmodifiableList(children_);
}
/**
*
* children and parents
*
*
* repeated int64 children = 20;
*/
public int getChildrenCount() {
return children_.size();
}
/**
*
* children and parents
*
*
* repeated int64 children = 20;
*/
public long getChildren(int index) {
return children_.get(index);
}
/**
*
* children and parents
*
*
* repeated int64 children = 20;
*/
public Builder setChildren(
int index, long value) {
ensureChildrenIsMutable();
children_.set(index, value);
onChanged();
return this;
}
/**
*
* children and parents
*
*
* repeated int64 children = 20;
*/
public Builder addChildren(long value) {
ensureChildrenIsMutable();
children_.add(value);
onChanged();
return this;
}
/**
*
* children and parents
*
*
* repeated int64 children = 20;
*/
public Builder addAllChildren(
java.lang.Iterable extends java.lang.Long> values) {
ensureChildrenIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, children_);
onChanged();
return this;
}
/**
*
* children and parents
*
*
* repeated int64 children = 20;
*/
public Builder clearChildren() {
children_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000020);
onChanged();
return this;
}
private java.util.List parents_ = java.util.Collections.emptyList();
private void ensureParentsIsMutable() {
if (!((bitField0_ & 0x00000040) == 0x00000040)) {
parents_ = new java.util.ArrayList(parents_);
bitField0_ |= 0x00000040;
}
}
/**
* repeated int64 parents = 21;
*/
public java.util.List
getParentsList() {
return java.util.Collections.unmodifiableList(parents_);
}
/**
* repeated int64 parents = 21;
*/
public int getParentsCount() {
return parents_.size();
}
/**
* repeated int64 parents = 21;
*/
public long getParents(int index) {
return parents_.get(index);
}
/**
* repeated int64 parents = 21;
*/
public Builder setParents(
int index, long value) {
ensureParentsIsMutable();
parents_.set(index, value);
onChanged();
return this;
}
/**
* repeated int64 parents = 21;
*/
public Builder addParents(long value) {
ensureParentsIsMutable();
parents_.add(value);
onChanged();
return this;
}
/**
* repeated int64 parents = 21;
*/
public Builder addAllParents(
java.lang.Iterable extends java.lang.Long> values) {
ensureParentsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, parents_);
onChanged();
return this;
}
/**
* repeated int64 parents = 21;
*/
public Builder clearParents() {
parents_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000040);
onChanged();
return this;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(unknownFields);
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:bookkeeper.proto.stream.RangeMetadata)
}
// @@protoc_insertion_point(class_scope:bookkeeper.proto.stream.RangeMetadata)
private static final org.apache.bookkeeper.stream.proto.RangeMetadata DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.apache.bookkeeper.stream.proto.RangeMetadata();
}
public static org.apache.bookkeeper.stream.proto.RangeMetadata getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public RangeMetadata parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new RangeMetadata(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public org.apache.bookkeeper.stream.proto.RangeMetadata getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy