Class PartitionAssignment.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderT>
-
- com.google.protobuf.GeneratedMessageV3.Builder<PartitionAssignment.Builder>
-
- com.google.cloud.pubsublite.proto.PartitionAssignment.Builder
-
- All Implemented Interfaces:
PartitionAssignmentOrBuilder
,com.google.protobuf.Message.Builder
,com.google.protobuf.MessageLite.Builder
,com.google.protobuf.MessageLiteOrBuilder
,com.google.protobuf.MessageOrBuilder
,Cloneable
- Enclosing class:
- PartitionAssignment
public static final class PartitionAssignment.Builder extends com.google.protobuf.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 typegoogle.cloud.pubsublite.v1.PartitionAssignment
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description PartitionAssignment.Builder
addAllPartitions(Iterable<? extends Long> values)
The list of partition numbers this subscriber is assigned to.PartitionAssignment.Builder
addPartitions(long value)
The list of partition numbers this subscriber is assigned to.PartitionAssignment.Builder
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
PartitionAssignment
build()
PartitionAssignment
buildPartial()
PartitionAssignment.Builder
clear()
PartitionAssignment.Builder
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
PartitionAssignment.Builder
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
PartitionAssignment.Builder
clearPartitions()
The list of partition numbers this subscriber is assigned to.PartitionAssignment.Builder
clone()
PartitionAssignment
getDefaultInstanceForType()
static com.google.protobuf.Descriptors.Descriptor
getDescriptor()
com.google.protobuf.Descriptors.Descriptor
getDescriptorForType()
long
getPartitions(int index)
The list of partition numbers this subscriber is assigned to.int
getPartitionsCount()
The list of partition numbers this subscriber is assigned to.List<Long>
getPartitionsList()
The list of partition numbers this subscriber is assigned to.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()
boolean
isInitialized()
PartitionAssignment.Builder
mergeFrom(PartitionAssignment other)
PartitionAssignment.Builder
mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
PartitionAssignment.Builder
mergeFrom(com.google.protobuf.Message other)
PartitionAssignment.Builder
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
PartitionAssignment.Builder
setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
PartitionAssignment.Builder
setPartitions(int index, long value)
The list of partition numbers this subscriber is assigned to.PartitionAssignment.Builder
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
PartitionAssignment.Builder
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
-
Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3
-
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3.Builder<PartitionAssignment.Builder>
-
clear
public PartitionAssignment.Builder clear()
- Specified by:
clear
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clear
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clear
in classcom.google.protobuf.GeneratedMessageV3.Builder<PartitionAssignment.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.Message.Builder
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.MessageOrBuilder
- Overrides:
getDescriptorForType
in classcom.google.protobuf.GeneratedMessageV3.Builder<PartitionAssignment.Builder>
-
getDefaultInstanceForType
public PartitionAssignment getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
build
public PartitionAssignment build()
- Specified by:
build
in interfacecom.google.protobuf.Message.Builder
- Specified by:
build
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public PartitionAssignment buildPartial()
- Specified by:
buildPartial
in interfacecom.google.protobuf.Message.Builder
- Specified by:
buildPartial
in interfacecom.google.protobuf.MessageLite.Builder
-
clone
public PartitionAssignment.Builder clone()
- Specified by:
clone
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clone
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clone
in classcom.google.protobuf.GeneratedMessageV3.Builder<PartitionAssignment.Builder>
-
setField
public PartitionAssignment.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
setField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setField
in classcom.google.protobuf.GeneratedMessageV3.Builder<PartitionAssignment.Builder>
-
clearField
public PartitionAssignment.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearField
in classcom.google.protobuf.GeneratedMessageV3.Builder<PartitionAssignment.Builder>
-
clearOneof
public PartitionAssignment.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneof
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearOneof
in classcom.google.protobuf.GeneratedMessageV3.Builder<PartitionAssignment.Builder>
-
setRepeatedField
public PartitionAssignment.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
- Specified by:
setRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<PartitionAssignment.Builder>
-
addRepeatedField
public PartitionAssignment.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
addRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
addRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<PartitionAssignment.Builder>
-
mergeFrom
public PartitionAssignment.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<PartitionAssignment.Builder>
-
mergeFrom
public PartitionAssignment.Builder mergeFrom(PartitionAssignment other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessageV3.Builder<PartitionAssignment.Builder>
-
mergeFrom
public PartitionAssignment.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Specified by:
mergeFrom
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<PartitionAssignment.Builder>
- Throws:
IOException
-
getPartitionsList
public List<Long> getPartitionsList()
The list of partition numbers this subscriber is assigned to.
repeated int64 partitions = 1;
- Specified by:
getPartitionsList
in interfacePartitionAssignmentOrBuilder
- Returns:
- A list containing the partitions.
-
getPartitionsCount
public int getPartitionsCount()
The list of partition numbers this subscriber is assigned to.
repeated int64 partitions = 1;
- Specified by:
getPartitionsCount
in interfacePartitionAssignmentOrBuilder
- Returns:
- The count of partitions.
-
getPartitions
public long getPartitions(int index)
The list of partition numbers this subscriber is assigned to.
repeated int64 partitions = 1;
- Specified by:
getPartitions
in interfacePartitionAssignmentOrBuilder
- Parameters:
index
- The index of the element to return.- Returns:
- The partitions at the given index.
-
setPartitions
public PartitionAssignment.Builder setPartitions(int index, long value)
The list of partition numbers this subscriber is assigned to.
repeated int64 partitions = 1;
- Parameters:
index
- The index to set the value at.value
- The partitions to set.- Returns:
- This builder for chaining.
-
addPartitions
public PartitionAssignment.Builder addPartitions(long value)
The list of partition numbers this subscriber is assigned to.
repeated int64 partitions = 1;
- Parameters:
value
- The partitions to add.- Returns:
- This builder for chaining.
-
addAllPartitions
public PartitionAssignment.Builder addAllPartitions(Iterable<? extends Long> values)
The list of partition numbers this subscriber is assigned to.
repeated int64 partitions = 1;
- Parameters:
values
- The partitions to add.- Returns:
- This builder for chaining.
-
clearPartitions
public PartitionAssignment.Builder clearPartitions()
The list of partition numbers this subscriber is assigned to.
repeated int64 partitions = 1;
- Returns:
- This builder for chaining.
-
setUnknownFields
public final PartitionAssignment.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<PartitionAssignment.Builder>
-
mergeUnknownFields
public final PartitionAssignment.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<PartitionAssignment.Builder>
-
-