public static final class PartitionAssignment.Builder extends GeneratedMessageV3.Builder<PartitionAssignment.Builder> implements PartitionAssignmentOrBuilder
PartitionAssignments should not race with acknowledgements. There
should be exactly one unacknowledged PartitionAssignment at a time. If not,
the client must break the stream.
Protobuf type google.cloud.pubsublite.v1.PartitionAssignment
Inherited Members
com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessageV3.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessageV3.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)
Static Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Methods
addAllPartitions(Iterable<? extends Long> values)
public PartitionAssignment.Builder addAllPartitions(Iterable<? extends Long> values)
The list of partition numbers this subscriber is assigned to.
repeated int64 partitions = 1;
Parameter |
---|
Name | Description |
values | Iterable<? extends java.lang.Long>
The partitions to add.
|
addPartitions(long value)
public PartitionAssignment.Builder addPartitions(long value)
The list of partition numbers this subscriber is assigned to.
repeated int64 partitions = 1;
Parameter |
---|
Name | Description |
value | long
The partitions to add.
|
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public PartitionAssignment.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Overrides
build()
public PartitionAssignment build()
buildPartial()
public PartitionAssignment buildPartial()
clear()
public PartitionAssignment.Builder clear()
Overrides
clearField(Descriptors.FieldDescriptor field)
public PartitionAssignment.Builder clearField(Descriptors.FieldDescriptor field)
Overrides
clearOneof(Descriptors.OneofDescriptor oneof)
public PartitionAssignment.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Overrides
clearPartitions()
public PartitionAssignment.Builder clearPartitions()
The list of partition numbers this subscriber is assigned to.
repeated int64 partitions = 1;
clone()
public PartitionAssignment.Builder clone()
Overrides
getDefaultInstanceForType()
public PartitionAssignment getDefaultInstanceForType()
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Overrides
getPartitions(int index)
public long getPartitions(int index)
The list of partition numbers this subscriber is assigned to.
repeated int64 partitions = 1;
Parameter |
---|
Name | Description |
index | int
The index of the element to return.
|
Returns |
---|
Type | Description |
long | The partitions at the given index.
|
getPartitionsCount()
public int getPartitionsCount()
The list of partition numbers this subscriber is assigned to.
repeated int64 partitions = 1;
Returns |
---|
Type | Description |
int | The count of partitions.
|
getPartitionsList()
public List<Long> getPartitionsList()
The list of partition numbers this subscriber is assigned to.
repeated int64 partitions = 1;
Returns |
---|
Type | Description |
List<Long> | A list containing the partitions.
|
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
isInitialized()
public final boolean isInitialized()
Overrides
mergeFrom(PartitionAssignment other)
public PartitionAssignment.Builder mergeFrom(PartitionAssignment other)
public PartitionAssignment.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Overrides
mergeFrom(Message other)
public PartitionAssignment.Builder mergeFrom(Message other)
Parameter |
---|
Name | Description |
other | Message
|
Overrides
mergeUnknownFields(UnknownFieldSet unknownFields)
public final PartitionAssignment.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Overrides
setField(Descriptors.FieldDescriptor field, Object value)
public PartitionAssignment.Builder setField(Descriptors.FieldDescriptor field, Object value)
Overrides
setPartitions(int index, long value)
public PartitionAssignment.Builder setPartitions(int index, long value)
The list of partition numbers this subscriber is assigned to.
repeated int64 partitions = 1;
Parameters |
---|
Name | Description |
index | int
The index to set the value at.
|
value | long
The partitions to set.
|
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public PartitionAssignment.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Overrides
setUnknownFields(UnknownFieldSet unknownFields)
public final PartitionAssignment.Builder setUnknownFields(UnknownFieldSet unknownFields)
Overrides