Class Topic.PartitionConfig (1.9.4)

public static final class Topic.PartitionConfig extends GeneratedMessageV3 implements Topic.PartitionConfigOrBuilder

The settings for a topic's partitions.

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

Static Fields

CAPACITY_FIELD_NUMBER

public static final int CAPACITY_FIELD_NUMBER
Field Value
TypeDescription
int

COUNT_FIELD_NUMBER

public static final int COUNT_FIELD_NUMBER
Field Value
TypeDescription
int

SCALE_FIELD_NUMBER

public static final int SCALE_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static Topic.PartitionConfig getDefaultInstance()
Returns
TypeDescription
Topic.PartitionConfig

getDescriptor()

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

newBuilder()

public static Topic.PartitionConfig.Builder newBuilder()
Returns
TypeDescription
Topic.PartitionConfig.Builder

newBuilder(Topic.PartitionConfig prototype)

public static Topic.PartitionConfig.Builder newBuilder(Topic.PartitionConfig prototype)
Parameter
NameDescription
prototypeTopic.PartitionConfig
Returns
TypeDescription
Topic.PartitionConfig.Builder

parseDelimitedFrom(InputStream input)

public static Topic.PartitionConfig parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Topic.PartitionConfig
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Topic.PartitionConfig parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Topic.PartitionConfig
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static Topic.PartitionConfig parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
Topic.PartitionConfig
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Topic.PartitionConfig parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Topic.PartitionConfig
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Topic.PartitionConfig parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
Topic.PartitionConfig
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Topic.PartitionConfig parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Topic.PartitionConfig
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Topic.PartitionConfig parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
Topic.PartitionConfig
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Topic.PartitionConfig parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Topic.PartitionConfig
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static Topic.PartitionConfig parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Topic.PartitionConfig
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Topic.PartitionConfig parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Topic.PartitionConfig
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static Topic.PartitionConfig parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
Topic.PartitionConfig
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Topic.PartitionConfig parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Topic.PartitionConfig
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<Topic.PartitionConfig> parser()
Returns
TypeDescription
Parser<PartitionConfig>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
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.

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

getDimensionCase()

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

getParserForType()

public Parser<Topic.PartitionConfig> getParserForType()
Returns
TypeDescription
Parser<PartitionConfig>
Overrides

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.

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
Overrides

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.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

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

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Topic.PartitionConfig.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
Topic.PartitionConfig.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

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

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides Exceptions
TypeDescription
IOException