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
Inheritance
Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessageV3.Builder > PartitionAssignment.BuilderImplements
PartitionAssignmentOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Type | Description |
Descriptor |
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;
Name | Description |
values | Iterable<? extends java.lang.Long> The partitions to add. |
Type | Description |
PartitionAssignment.Builder | This builder for chaining. |
addPartitions(long value)
public PartitionAssignment.Builder addPartitions(long value)
The list of partition numbers this subscriber is assigned to.
repeated int64 partitions = 1;
Name | Description |
value | long The partitions to add. |
Type | Description |
PartitionAssignment.Builder | This builder for chaining. |
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public PartitionAssignment.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Name | Description |
field | FieldDescriptor |
value | Object |
Type | Description |
PartitionAssignment.Builder |
build()
public PartitionAssignment build()
Type | Description |
PartitionAssignment |
buildPartial()
public PartitionAssignment buildPartial()
Type | Description |
PartitionAssignment |
clear()
public PartitionAssignment.Builder clear()
Type | Description |
PartitionAssignment.Builder |
clearField(Descriptors.FieldDescriptor field)
public PartitionAssignment.Builder clearField(Descriptors.FieldDescriptor field)
Name | Description |
field | FieldDescriptor |
Type | Description |
PartitionAssignment.Builder |
clearOneof(Descriptors.OneofDescriptor oneof)
public PartitionAssignment.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Name | Description |
oneof | OneofDescriptor |
Type | Description |
PartitionAssignment.Builder |
clearPartitions()
public PartitionAssignment.Builder clearPartitions()
The list of partition numbers this subscriber is assigned to.
repeated int64 partitions = 1;
Type | Description |
PartitionAssignment.Builder | This builder for chaining. |
clone()
public PartitionAssignment.Builder clone()
Type | Description |
PartitionAssignment.Builder |
getDefaultInstanceForType()
public PartitionAssignment getDefaultInstanceForType()
Type | Description |
PartitionAssignment |
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Type | Description |
Descriptor |
getPartitions(int index)
public long getPartitions(int index)
The list of partition numbers this subscriber is assigned to.
repeated int64 partitions = 1;
Name | Description |
index | int The index of the element to return. |
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;
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;
Type | Description |
List<Long> | A list containing the partitions. |
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Type | Description |
FieldAccessorTable |
isInitialized()
public final boolean isInitialized()
Type | Description |
boolean |
mergeFrom(PartitionAssignment other)
public PartitionAssignment.Builder mergeFrom(PartitionAssignment other)
Name | Description |
other | PartitionAssignment |
Type | Description |
PartitionAssignment.Builder |
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public PartitionAssignment.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Name | Description |
input | CodedInputStream |
extensionRegistry | ExtensionRegistryLite |
Type | Description |
PartitionAssignment.Builder |
Type | Description |
IOException |
mergeFrom(Message other)
public PartitionAssignment.Builder mergeFrom(Message other)
Name | Description |
other | Message |
Type | Description |
PartitionAssignment.Builder |
mergeUnknownFields(UnknownFieldSet unknownFields)
public final PartitionAssignment.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Name | Description |
unknownFields | UnknownFieldSet |
Type | Description |
PartitionAssignment.Builder |
setField(Descriptors.FieldDescriptor field, Object value)
public PartitionAssignment.Builder setField(Descriptors.FieldDescriptor field, Object value)
Name | Description |
field | FieldDescriptor |
value | Object |
Type | Description |
PartitionAssignment.Builder |
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;
Name | Description |
index | int The index to set the value at. |
value | long The partitions to set. |
Type | Description |
PartitionAssignment.Builder | This builder for chaining. |
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public PartitionAssignment.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Name | Description |
field | FieldDescriptor |
index | int |
value | Object |
Type | Description |
PartitionAssignment.Builder |
setUnknownFields(UnknownFieldSet unknownFields)
public final PartitionAssignment.Builder setUnknownFields(UnknownFieldSet unknownFields)
Name | Description |
unknownFields | UnknownFieldSet |
Type | Description |
PartitionAssignment.Builder |