![JAR search and dependency download from the Maven repository](/logo.png)
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() {
state_ = 0;
children_ = emptyLongList();
parents_ = emptyLongList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new RangeMetadata();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.apache.bookkeeper.stream.proto.Stream.internal_static_bookkeeper_proto_stream_RangeMetadata_descriptor;
}
@java.lang.Override
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);
}
public static final int PROPS_FIELD_NUMBER = 1;
private org.apache.bookkeeper.stream.proto.RangeProperties props_;
/**
* .bookkeeper.proto.stream.RangeProperties props = 1;
* @return Whether the props field is set.
*/
@java.lang.Override
public boolean hasProps() {
return props_ != null;
}
/**
* .bookkeeper.proto.stream.RangeProperties props = 1;
* @return The props.
*/
@java.lang.Override
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;
*/
@java.lang.Override
public org.apache.bookkeeper.stream.proto.RangePropertiesOrBuilder getPropsOrBuilder() {
return props_ == null ? org.apache.bookkeeper.stream.proto.RangeProperties.getDefaultInstance() : props_;
}
public static final int REVISION_FIELD_NUMBER = 2;
private long revision_ = 0L;
/**
* int64 revision = 2;
* @return The revision.
*/
@java.lang.Override
public long getRevision() {
return revision_;
}
public static final int STATE_FIELD_NUMBER = 3;
private int state_ = 0;
/**
* .bookkeeper.proto.stream.RangeState state = 3;
* @return The enum numeric value on the wire for state.
*/
@java.lang.Override public int getStateValue() {
return state_;
}
/**
* .bookkeeper.proto.stream.RangeState state = 3;
* @return The state.
*/
@java.lang.Override public org.apache.bookkeeper.stream.proto.RangeState getState() {
org.apache.bookkeeper.stream.proto.RangeState result = org.apache.bookkeeper.stream.proto.RangeState.forNumber(state_);
return result == null ? org.apache.bookkeeper.stream.proto.RangeState.UNRECOGNIZED : result;
}
public static final int CREATE_TIME_FIELD_NUMBER = 10;
private long createTime_ = 0L;
/**
*
* time
*
*
* int64 create_time = 10;
* @return The createTime.
*/
@java.lang.Override
public long getCreateTime() {
return createTime_;
}
public static final int FENCE_TIME_FIELD_NUMBER = 11;
private long fenceTime_ = 0L;
/**
* int64 fence_time = 11;
* @return The fenceTime.
*/
@java.lang.Override
public long getFenceTime() {
return fenceTime_;
}
public static final int CHILDREN_FIELD_NUMBER = 20;
@SuppressWarnings("serial")
private com.google.protobuf.Internal.LongList children_;
/**
*
* children and parents
*
*
* repeated int64 children = 20;
* @return A list containing the children.
*/
@java.lang.Override
public java.util.List
getChildrenList() {
return children_;
}
/**
*
* children and parents
*
*
* repeated int64 children = 20;
* @return The count of children.
*/
public int getChildrenCount() {
return children_.size();
}
/**
*
* children and parents
*
*
* repeated int64 children = 20;
* @param index The index of the element to return.
* @return The children at the given index.
*/
public long getChildren(int index) {
return children_.getLong(index);
}
private int childrenMemoizedSerializedSize = -1;
public static final int PARENTS_FIELD_NUMBER = 21;
@SuppressWarnings("serial")
private com.google.protobuf.Internal.LongList parents_;
/**
* repeated int64 parents = 21;
* @return A list containing the parents.
*/
@java.lang.Override
public java.util.List
getParentsList() {
return parents_;
}
/**
* repeated int64 parents = 21;
* @return The count of parents.
*/
public int getParentsCount() {
return parents_.size();
}
/**
* repeated int64 parents = 21;
* @param index The index of the element to return.
* @return The parents at the given index.
*/
public long getParents(int index) {
return parents_.getLong(index);
}
private int parentsMemoizedSerializedSize = -1;
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 {
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_.getLong(i));
}
if (getParentsList().size() > 0) {
output.writeUInt32NoTag(170);
output.writeUInt32NoTag(parentsMemoizedSerializedSize);
}
for (int i = 0; i < parents_.size(); i++) {
output.writeInt64NoTag(parents_.getLong(i));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
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_.getLong(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_.getLong(i));
}
size += dataSize;
if (!getParentsList().isEmpty()) {
size += 2;
size += com.google.protobuf.CodedOutputStream
.computeInt32SizeNoTag(dataSize);
}
parentsMemoizedSerializedSize = dataSize;
}
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.RangeMetadata)) {
return super.equals(obj);
}
org.apache.bookkeeper.stream.proto.RangeMetadata other = (org.apache.bookkeeper.stream.proto.RangeMetadata) obj;
if (hasProps() != other.hasProps()) return false;
if (hasProps()) {
if (!getProps()
.equals(other.getProps())) return false;
}
if (getRevision()
!= other.getRevision()) return false;
if (state_ != other.state_) return false;
if (getCreateTime()
!= other.getCreateTime()) return false;
if (getFenceTime()
!= other.getFenceTime()) return false;
if (!getChildrenList()
.equals(other.getChildrenList())) return false;
if (!getParentsList()
.equals(other.getParentsList())) 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();
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) + getUnknownFields().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);
}
@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.RangeMetadata 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.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;
}
@java.lang.Override
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() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
props_ = null;
if (propsBuilder_ != null) {
propsBuilder_.dispose();
propsBuilder_ = null;
}
revision_ = 0L;
state_ = 0;
createTime_ = 0L;
fenceTime_ = 0L;
children_ = emptyLongList();
parents_ = emptyLongList();
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.apache.bookkeeper.stream.proto.Stream.internal_static_bookkeeper_proto_stream_RangeMetadata_descriptor;
}
@java.lang.Override
public org.apache.bookkeeper.stream.proto.RangeMetadata getDefaultInstanceForType() {
return org.apache.bookkeeper.stream.proto.RangeMetadata.getDefaultInstance();
}
@java.lang.Override
public org.apache.bookkeeper.stream.proto.RangeMetadata build() {
org.apache.bookkeeper.stream.proto.RangeMetadata result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.apache.bookkeeper.stream.proto.RangeMetadata buildPartial() {
org.apache.bookkeeper.stream.proto.RangeMetadata result = new org.apache.bookkeeper.stream.proto.RangeMetadata(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartialRepeatedFields(org.apache.bookkeeper.stream.proto.RangeMetadata result) {
if (((bitField0_ & 0x00000020) != 0)) {
children_.makeImmutable();
bitField0_ = (bitField0_ & ~0x00000020);
}
result.children_ = children_;
if (((bitField0_ & 0x00000040) != 0)) {
parents_.makeImmutable();
bitField0_ = (bitField0_ & ~0x00000040);
}
result.parents_ = parents_;
}
private void buildPartial0(org.apache.bookkeeper.stream.proto.RangeMetadata result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.props_ = propsBuilder_ == null
? props_
: propsBuilder_.build();
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.revision_ = revision_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.state_ = state_;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.createTime_ = createTime_;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.fenceTime_ = fenceTime_;
}
}
@java.lang.Override
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.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 10: {
input.readMessage(
getPropsFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000001;
break;
} // case 10
case 16: {
revision_ = input.readInt64();
bitField0_ |= 0x00000002;
break;
} // case 16
case 24: {
state_ = input.readEnum();
bitField0_ |= 0x00000004;
break;
} // case 24
case 80: {
createTime_ = input.readInt64();
bitField0_ |= 0x00000008;
break;
} // case 80
case 88: {
fenceTime_ = input.readInt64();
bitField0_ |= 0x00000010;
break;
} // case 88
case 160: {
long v = input.readInt64();
ensureChildrenIsMutable();
children_.addLong(v);
break;
} // case 160
case 162: {
int length = input.readRawVarint32();
int limit = input.pushLimit(length);
ensureChildrenIsMutable();
while (input.getBytesUntilLimit() > 0) {
children_.addLong(input.readInt64());
}
input.popLimit(limit);
break;
} // case 162
case 168: {
long v = input.readInt64();
ensureParentsIsMutable();
parents_.addLong(v);
break;
} // case 168
case 170: {
int length = input.readRawVarint32();
int limit = input.pushLimit(length);
ensureParentsIsMutable();
while (input.getBytesUntilLimit() > 0) {
parents_.addLong(input.readInt64());
}
input.popLimit(limit);
break;
} // case 170
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 org.apache.bookkeeper.stream.proto.RangeProperties props_;
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;
* @return Whether the props field is set.
*/
public boolean hasProps() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
* .bookkeeper.proto.stream.RangeProperties props = 1;
* @return The props.
*/
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;
} else {
propsBuilder_.setMessage(value);
}
bitField0_ |= 0x00000001;
onChanged();
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();
} else {
propsBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* .bookkeeper.proto.stream.RangeProperties props = 1;
*/
public Builder mergeProps(org.apache.bookkeeper.stream.proto.RangeProperties value) {
if (propsBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0) &&
props_ != null &&
props_ != org.apache.bookkeeper.stream.proto.RangeProperties.getDefaultInstance()) {
getPropsBuilder().mergeFrom(value);
} else {
props_ = value;
}
} else {
propsBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* .bookkeeper.proto.stream.RangeProperties props = 1;
*/
public Builder clearProps() {
bitField0_ = (bitField0_ & ~0x00000001);
props_ = null;
if (propsBuilder_ != null) {
propsBuilder_.dispose();
propsBuilder_ = null;
}
onChanged();
return this;
}
/**
* .bookkeeper.proto.stream.RangeProperties props = 1;
*/
public org.apache.bookkeeper.stream.proto.RangeProperties.Builder getPropsBuilder() {
bitField0_ |= 0x00000001;
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;
* @return The revision.
*/
@java.lang.Override
public long getRevision() {
return revision_;
}
/**
* int64 revision = 2;
* @param value The revision to set.
* @return This builder for chaining.
*/
public Builder setRevision(long value) {
revision_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
* int64 revision = 2;
* @return This builder for chaining.
*/
public Builder clearRevision() {
bitField0_ = (bitField0_ & ~0x00000002);
revision_ = 0L;
onChanged();
return this;
}
private int state_ = 0;
/**
* .bookkeeper.proto.stream.RangeState state = 3;
* @return The enum numeric value on the wire for state.
*/
@java.lang.Override public int getStateValue() {
return state_;
}
/**
* .bookkeeper.proto.stream.RangeState state = 3;
* @param value The enum numeric value on the wire for state to set.
* @return This builder for chaining.
*/
public Builder setStateValue(int value) {
state_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
* .bookkeeper.proto.stream.RangeState state = 3;
* @return The state.
*/
@java.lang.Override
public org.apache.bookkeeper.stream.proto.RangeState getState() {
org.apache.bookkeeper.stream.proto.RangeState result = org.apache.bookkeeper.stream.proto.RangeState.forNumber(state_);
return result == null ? org.apache.bookkeeper.stream.proto.RangeState.UNRECOGNIZED : result;
}
/**
* .bookkeeper.proto.stream.RangeState state = 3;
* @param value The state to set.
* @return This builder for chaining.
*/
public Builder setState(org.apache.bookkeeper.stream.proto.RangeState value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000004;
state_ = value.getNumber();
onChanged();
return this;
}
/**
* .bookkeeper.proto.stream.RangeState state = 3;
* @return This builder for chaining.
*/
public Builder clearState() {
bitField0_ = (bitField0_ & ~0x00000004);
state_ = 0;
onChanged();
return this;
}
private long createTime_ ;
/**
*
* time
*
*
* int64 create_time = 10;
* @return The createTime.
*/
@java.lang.Override
public long getCreateTime() {
return createTime_;
}
/**
*
* time
*
*
* int64 create_time = 10;
* @param value The createTime to set.
* @return This builder for chaining.
*/
public Builder setCreateTime(long value) {
createTime_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
* time
*
*
* int64 create_time = 10;
* @return This builder for chaining.
*/
public Builder clearCreateTime() {
bitField0_ = (bitField0_ & ~0x00000008);
createTime_ = 0L;
onChanged();
return this;
}
private long fenceTime_ ;
/**
* int64 fence_time = 11;
* @return The fenceTime.
*/
@java.lang.Override
public long getFenceTime() {
return fenceTime_;
}
/**
* int64 fence_time = 11;
* @param value The fenceTime to set.
* @return This builder for chaining.
*/
public Builder setFenceTime(long value) {
fenceTime_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
* int64 fence_time = 11;
* @return This builder for chaining.
*/
public Builder clearFenceTime() {
bitField0_ = (bitField0_ & ~0x00000010);
fenceTime_ = 0L;
onChanged();
return this;
}
private com.google.protobuf.Internal.LongList children_ = emptyLongList();
private void ensureChildrenIsMutable() {
if (!((bitField0_ & 0x00000020) != 0)) {
children_ = mutableCopy(children_);
bitField0_ |= 0x00000020;
}
}
/**
*
* children and parents
*
*
* repeated int64 children = 20;
* @return A list containing the children.
*/
public java.util.List
getChildrenList() {
return ((bitField0_ & 0x00000020) != 0) ?
java.util.Collections.unmodifiableList(children_) : children_;
}
/**
*
* children and parents
*
*
* repeated int64 children = 20;
* @return The count of children.
*/
public int getChildrenCount() {
return children_.size();
}
/**
*
* children and parents
*
*
* repeated int64 children = 20;
* @param index The index of the element to return.
* @return The children at the given index.
*/
public long getChildren(int index) {
return children_.getLong(index);
}
/**
*
* children and parents
*
*
* repeated int64 children = 20;
* @param index The index to set the value at.
* @param value The children to set.
* @return This builder for chaining.
*/
public Builder setChildren(
int index, long value) {
ensureChildrenIsMutable();
children_.setLong(index, value);
onChanged();
return this;
}
/**
*
* children and parents
*
*
* repeated int64 children = 20;
* @param value The children to add.
* @return This builder for chaining.
*/
public Builder addChildren(long value) {
ensureChildrenIsMutable();
children_.addLong(value);
onChanged();
return this;
}
/**
*
* children and parents
*
*
* repeated int64 children = 20;
* @param values The children to add.
* @return This builder for chaining.
*/
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;
* @return This builder for chaining.
*/
public Builder clearChildren() {
children_ = emptyLongList();
bitField0_ = (bitField0_ & ~0x00000020);
onChanged();
return this;
}
private com.google.protobuf.Internal.LongList parents_ = emptyLongList();
private void ensureParentsIsMutable() {
if (!((bitField0_ & 0x00000040) != 0)) {
parents_ = mutableCopy(parents_);
bitField0_ |= 0x00000040;
}
}
/**
* repeated int64 parents = 21;
* @return A list containing the parents.
*/
public java.util.List
getParentsList() {
return ((bitField0_ & 0x00000040) != 0) ?
java.util.Collections.unmodifiableList(parents_) : parents_;
}
/**
* repeated int64 parents = 21;
* @return The count of parents.
*/
public int getParentsCount() {
return parents_.size();
}
/**
* repeated int64 parents = 21;
* @param index The index of the element to return.
* @return The parents at the given index.
*/
public long getParents(int index) {
return parents_.getLong(index);
}
/**
* repeated int64 parents = 21;
* @param index The index to set the value at.
* @param value The parents to set.
* @return This builder for chaining.
*/
public Builder setParents(
int index, long value) {
ensureParentsIsMutable();
parents_.setLong(index, value);
onChanged();
return this;
}
/**
* repeated int64 parents = 21;
* @param value The parents to add.
* @return This builder for chaining.
*/
public Builder addParents(long value) {
ensureParentsIsMutable();
parents_.addLong(value);
onChanged();
return this;
}
/**
* repeated int64 parents = 21;
* @param values The parents to add.
* @return This builder for chaining.
*/
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;
* @return This builder for chaining.
*/
public Builder clearParents() {
parents_ = emptyLongList();
bitField0_ = (bitField0_ & ~0x00000040);
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.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() {
@java.lang.Override
public RangeMetadata 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.RangeMetadata getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy