Class Topic.PartitionConfig.Builder (1.10.0)

public static final class Topic.PartitionConfig.Builder extends GeneratedMessageV3.Builder<Topic.PartitionConfig.Builder> implements Topic.PartitionConfigOrBuilder

The settings for a topic's partitions.

Protobuf type google.cloud.pubsublite.v1.Topic.PartitionConfig

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public Topic.PartitionConfig build()
Returns
TypeDescription
Topic.PartitionConfig

buildPartial()

public Topic.PartitionConfig buildPartial()
Returns
TypeDescription
Topic.PartitionConfig

clear()

public Topic.PartitionConfig.Builder clear()
Returns
TypeDescription
Topic.PartitionConfig.Builder
Overrides

clearCapacity()

public Topic.PartitionConfig.Builder clearCapacity()

The capacity configuration.

.google.cloud.pubsublite.v1.Topic.PartitionConfig.Capacity capacity = 3;

Returns
TypeDescription
Topic.PartitionConfig.Builder

clearCount()

public Topic.PartitionConfig.Builder clearCount()

The number of partitions in the topic. Must be at least 1. Once a topic has been created the number of partitions can be increased but not decreased. Message ordering is not guaranteed across a topic resize. For more information see https://cloud.google.com/pubsub/lite/docs/topics#scaling_capacity

int64 count = 1;

Returns
TypeDescription
Topic.PartitionConfig.Builder

This builder for chaining.

clearDimension()

public Topic.PartitionConfig.Builder clearDimension()
Returns
TypeDescription
Topic.PartitionConfig.Builder

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearScale() (deprecated)

public Topic.PartitionConfig.Builder clearScale()

Deprecated. google.cloud.pubsublite.v1.Topic.PartitionConfig.scale is deprecated. See google/cloud/pubsublite/v1/common.proto;l=138

DEPRECATED: Use capacity instead which can express a superset of configurations. Every partition in the topic is allocated throughput equivalent to scale times the standard partition throughput (4 MiB/s). This is also reflected in the cost of this topic; a topic with scale of 2 and count of 10 is charged for 20 partitions. This value must be in the range [1,4].

int32 scale = 2 [deprecated = true];

Returns
TypeDescription
Topic.PartitionConfig.Builder

This builder for chaining.

clone()

public Topic.PartitionConfig.Builder clone()
Returns
TypeDescription
Topic.PartitionConfig.Builder
Overrides

getCapacity()

public Topic.PartitionConfig.Capacity getCapacity()

The capacity configuration.

.google.cloud.pubsublite.v1.Topic.PartitionConfig.Capacity capacity = 3;

Returns
TypeDescription
Topic.PartitionConfig.Capacity

The capacity.

getCapacityBuilder()

public Topic.PartitionConfig.Capacity.Builder getCapacityBuilder()

The capacity configuration.

.google.cloud.pubsublite.v1.Topic.PartitionConfig.Capacity capacity = 3;

Returns
TypeDescription
Topic.PartitionConfig.Capacity.Builder

getCapacityOrBuilder()

public Topic.PartitionConfig.CapacityOrBuilder getCapacityOrBuilder()

The capacity configuration.

.google.cloud.pubsublite.v1.Topic.PartitionConfig.Capacity capacity = 3;

Returns
TypeDescription
Topic.PartitionConfig.CapacityOrBuilder

getCount()

public long getCount()

The number of partitions in the topic. Must be at least 1. Once a topic has been created the number of partitions can be increased but not decreased. Message ordering is not guaranteed across a topic resize. For more information see https://cloud.google.com/pubsub/lite/docs/topics#scaling_capacity

int64 count = 1;

Returns
TypeDescription
long

The count.

getDefaultInstanceForType()

public Topic.PartitionConfig getDefaultInstanceForType()
Returns
TypeDescription
Topic.PartitionConfig

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getDimensionCase()

public Topic.PartitionConfig.DimensionCase getDimensionCase()
Returns
TypeDescription
Topic.PartitionConfig.DimensionCase

getScale() (deprecated)

public int getScale()

Deprecated. google.cloud.pubsublite.v1.Topic.PartitionConfig.scale is deprecated. See google/cloud/pubsublite/v1/common.proto;l=138

DEPRECATED: Use capacity instead which can express a superset of configurations. Every partition in the topic is allocated throughput equivalent to scale times the standard partition throughput (4 MiB/s). This is also reflected in the cost of this topic; a topic with scale of 2 and count of 10 is charged for 20 partitions. This value must be in the range [1,4].

int32 scale = 2 [deprecated = true];

Returns
TypeDescription
int

The scale.

hasCapacity()

public boolean hasCapacity()

The capacity configuration.

.google.cloud.pubsublite.v1.Topic.PartitionConfig.Capacity capacity = 3;

Returns
TypeDescription
boolean

Whether the capacity field is set.

hasScale() (deprecated)

public boolean hasScale()

Deprecated. google.cloud.pubsublite.v1.Topic.PartitionConfig.scale is deprecated. See google/cloud/pubsublite/v1/common.proto;l=138

DEPRECATED: Use capacity instead which can express a superset of configurations. Every partition in the topic is allocated throughput equivalent to scale times the standard partition throughput (4 MiB/s). This is also reflected in the cost of this topic; a topic with scale of 2 and count of 10 is charged for 20 partitions. This value must be in the range [1,4].

int32 scale = 2 [deprecated = true];

Returns
TypeDescription
boolean

Whether the scale field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeCapacity(Topic.PartitionConfig.Capacity value)

public Topic.PartitionConfig.Builder mergeCapacity(Topic.PartitionConfig.Capacity value)

The capacity configuration.

.google.cloud.pubsublite.v1.Topic.PartitionConfig.Capacity capacity = 3;

Parameter
NameDescription
valueTopic.PartitionConfig.Capacity
Returns
TypeDescription
Topic.PartitionConfig.Builder

mergeFrom(Topic.PartitionConfig other)

public Topic.PartitionConfig.Builder mergeFrom(Topic.PartitionConfig other)
Parameter
NameDescription
otherTopic.PartitionConfig
Returns
TypeDescription
Topic.PartitionConfig.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setCapacity(Topic.PartitionConfig.Capacity value)

public Topic.PartitionConfig.Builder setCapacity(Topic.PartitionConfig.Capacity value)

The capacity configuration.

.google.cloud.pubsublite.v1.Topic.PartitionConfig.Capacity capacity = 3;

Parameter
NameDescription
valueTopic.PartitionConfig.Capacity
Returns
TypeDescription
Topic.PartitionConfig.Builder

setCapacity(Topic.PartitionConfig.Capacity.Builder builderForValue)

public Topic.PartitionConfig.Builder setCapacity(Topic.PartitionConfig.Capacity.Builder builderForValue)

The capacity configuration.

.google.cloud.pubsublite.v1.Topic.PartitionConfig.Capacity capacity = 3;

Parameter
NameDescription
builderForValueTopic.PartitionConfig.Capacity.Builder
Returns
TypeDescription
Topic.PartitionConfig.Builder

setCount(long value)

public Topic.PartitionConfig.Builder setCount(long value)

The number of partitions in the topic. Must be at least 1. Once a topic has been created the number of partitions can be increased but not decreased. Message ordering is not guaranteed across a topic resize. For more information see https://cloud.google.com/pubsub/lite/docs/topics#scaling_capacity

int64 count = 1;

Parameter
NameDescription
valuelong

The count to set.

Returns
TypeDescription
Topic.PartitionConfig.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public Topic.PartitionConfig.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Topic.PartitionConfig.Builder
Overrides

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public Topic.PartitionConfig.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
Topic.PartitionConfig.Builder
Overrides

setScale(int value) (deprecated)

public Topic.PartitionConfig.Builder setScale(int value)

Deprecated. google.cloud.pubsublite.v1.Topic.PartitionConfig.scale is deprecated. See google/cloud/pubsublite/v1/common.proto;l=138

DEPRECATED: Use capacity instead which can express a superset of configurations. Every partition in the topic is allocated throughput equivalent to scale times the standard partition throughput (4 MiB/s). This is also reflected in the cost of this topic; a topic with scale of 2 and count of 10 is charged for 20 partitions. This value must be in the range [1,4].

int32 scale = 2 [deprecated = true];

Parameter
NameDescription
valueint

The scale to set.

Returns
TypeDescription
Topic.PartitionConfig.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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