Class PartitionAssignment.Builder (1.14.1)

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
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;

Parameter
Name Description
values Iterable<? extends java.lang.Long>

The partitions to add.

Returns
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;

Parameter
Name Description
value long

The partitions to add.

Returns
Type Description
PartitionAssignment.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public PartitionAssignment.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
PartitionAssignment.Builder
Overrides

build()

public PartitionAssignment build()
Returns
Type Description
PartitionAssignment

buildPartial()

public PartitionAssignment buildPartial()
Returns
Type Description
PartitionAssignment

clear()

public PartitionAssignment.Builder clear()
Returns
Type Description
PartitionAssignment.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public PartitionAssignment.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
PartitionAssignment.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public PartitionAssignment.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
PartitionAssignment.Builder
Overrides

clearPartitions()

public PartitionAssignment.Builder clearPartitions()

The list of partition numbers this subscriber is assigned to.

repeated int64 partitions = 1;

Returns
Type Description
PartitionAssignment.Builder

This builder for chaining.

clone()

public PartitionAssignment.Builder clone()
Returns
Type Description
PartitionAssignment.Builder
Overrides

getDefaultInstanceForType()

public PartitionAssignment getDefaultInstanceForType()
Returns
Type Description
PartitionAssignment

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
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
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(PartitionAssignment other)

public PartitionAssignment.Builder mergeFrom(PartitionAssignment other)
Parameter
Name Description
other PartitionAssignment
Returns
Type Description
PartitionAssignment.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public PartitionAssignment.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
PartitionAssignment.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public PartitionAssignment.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
PartitionAssignment.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final PartitionAssignment.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
PartitionAssignment.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

public PartitionAssignment.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
PartitionAssignment.Builder
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
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)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
PartitionAssignment.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final PartitionAssignment.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
PartitionAssignment.Builder
Overrides