Send feedback
Class PartitionAssignment.Builder (1.11.0)
Stay organized with collections
Save and categorize content based on your preferences.
Version 1.11.0 keyboard_arrow_down
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.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 ()
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
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-01-21 UTC.
Need to tell us more?
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-01-21 UTC."],[],[]]