# Interface Topic.PartitionConfigOrBuilder (1.16.5)

1.16.5 (latest) 1.16.2 1.15.21 1.14.8 1.13.8 1.12.22 1.11.2 1.10.0 1.9.4 1.8.0 1.7.1 1.6.3 1.5.5 1.4.12

    public static interface Topic.PartitionConfigOrBuilder extends MessageOrBuilder

## Implements

[MessageOrBuilder](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.MessageOrBuilder.html)

## Methods

### getCapacity()

    public abstract Topic.PartitionConfig.Capacity getCapacity()

The capacity configuration.

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.Topic.PartitionConfig.Capacity` | The capacity. |

### getCapacityOrBuilder()

    public abstract Topic.PartitionConfig.CapacityOrBuilder getCapacityOrBuilder()

The capacity configuration.

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.Topic.PartitionConfig.CapacityOrBuilder` |   |

### getCount()

    public abstract 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** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The count. |

### getDimensionCase()

    public abstract Topic.PartitionConfig.DimensionCase getDimensionCase()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-pubsublite/latest/com.google.cloud.pubsublite.proto.Topic.PartitionConfig.DimensionCase` |   |

### getScale() (deprecated)

    public abstract 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** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The scale. |

### hasCapacity()

    public abstract boolean hasCapacity()

The capacity configuration.

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the capacity field is set. |

### hasScale() (deprecated)

    public abstract 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** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the scale field is set. |