Class PartitionAssignment.Builder (1.13.0)

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
TypeDescription
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
NameDescription
valuesIterable<? extends java.lang.Long>

The partitions to add.

Returns
TypeDescription
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
NameDescription
valuelong

The partitions to add.

Returns
TypeDescription
PartitionAssignment.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public PartitionAssignment.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
PartitionAssignment.Builder
Overrides

build()

public PartitionAssignment build()
Returns
TypeDescription
PartitionAssignment

buildPartial()

public PartitionAssignment buildPartial()
Returns
TypeDescription
PartitionAssignment

clear()

public PartitionAssignment.Builder clear()
Returns
TypeDescription
PartitionAssignment.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public PartitionAssignment.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
PartitionAssignment.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public PartitionAssignment.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
PartitionAssignment.Builder
Overrides

clearPartitions()

public PartitionAssignment.Builder clearPartitions()

The list of partition numbers this subscriber is assigned to.

repeated int64 partitions = 1;

Returns
TypeDescription
PartitionAssignment.Builder

This builder for chaining.

clone()

public PartitionAssignment.Builder clone()
Returns
TypeDescription
PartitionAssignment.Builder
Overrides

getDefaultInstanceForType()

public PartitionAssignment getDefaultInstanceForType()
Returns
TypeDescription
PartitionAssignment

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
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
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
List<Long>

A list containing the partitions.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(PartitionAssignment other)

public PartitionAssignment.Builder mergeFrom(PartitionAssignment other)
Parameter
NameDescription
otherPartitionAssignment
Returns
TypeDescription
PartitionAssignment.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public PartitionAssignment.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
PartitionAssignment.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public PartitionAssignment.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
PartitionAssignment.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final PartitionAssignment.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
PartitionAssignment.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

public PartitionAssignment.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
indexint

The index to set the value at.

valuelong

The partitions to set.

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
PartitionAssignment.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final PartitionAssignment.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
PartitionAssignment.Builder
Overrides