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
Static Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns
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.
|
Returns
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.
|
Returns
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public PartitionAssignment.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
build()
public PartitionAssignment build()
Returns
buildPartial()
public PartitionAssignment buildPartial()
Returns
clear()
public PartitionAssignment.Builder clear()
Returns
Overrides
clearField(Descriptors.FieldDescriptor field)
public PartitionAssignment.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Returns
Overrides
clearOneof(Descriptors.OneofDescriptor oneof)
public PartitionAssignment.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Returns
Overrides
clearPartitions()
public PartitionAssignment.Builder clearPartitions()
The list of partition numbers this subscriber is assigned to.
repeated int64 partitions = 1;
Returns
clone()
public PartitionAssignment.Builder clone()
Returns
Overrides
getDefaultInstanceForType()
public PartitionAssignment getDefaultInstanceForType()
Returns
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Returns
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()
Returns
Overrides
isInitialized()
public final boolean isInitialized()
Returns
Overrides
mergeFrom(PartitionAssignment other)
public PartitionAssignment.Builder mergeFrom(PartitionAssignment other)
Parameter
Returns
public PartitionAssignment.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Overrides
Exceptions
mergeFrom(Message other)
public PartitionAssignment.Builder mergeFrom(Message other)
Parameter
Returns
Overrides
mergeUnknownFields(UnknownFieldSet unknownFields)
public final PartitionAssignment.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides
setField(Descriptors.FieldDescriptor field, Object value)
public PartitionAssignment.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
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.
|
Returns
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public PartitionAssignment.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Returns
Overrides
setUnknownFields(UnknownFieldSet unknownFields)
public final PartitionAssignment.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides