Interface TopicOrBuilder (0.10.0)

public interface TopicOrBuilder extends MessageOrBuilder

Implements

MessageOrBuilder

Methods

containsConfigs(String key)

public abstract boolean containsConfigs(String key)

Optional. Configurations for the topic that are overridden from the cluster defaults. The key of the map is a Kafka topic property name, for example: cleanup.policy, compression.type.

map<string, string> configs = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
key String
Returns
Type Description
boolean

getConfigs() (deprecated)

public abstract Map<String,String> getConfigs()

Use #getConfigsMap() instead.

Returns
Type Description
Map<String,String>

getConfigsCount()

public abstract int getConfigsCount()

Optional. Configurations for the topic that are overridden from the cluster defaults. The key of the map is a Kafka topic property name, for example: cleanup.policy, compression.type.

map<string, string> configs = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

getConfigsMap()

public abstract Map<String,String> getConfigsMap()

Optional. Configurations for the topic that are overridden from the cluster defaults. The key of the map is a Kafka topic property name, for example: cleanup.policy, compression.type.

map<string, string> configs = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Map<String,String>

getConfigsOrDefault(String key, String defaultValue)

public abstract String getConfigsOrDefault(String key, String defaultValue)

Optional. Configurations for the topic that are overridden from the cluster defaults. The key of the map is a Kafka topic property name, for example: cleanup.policy, compression.type.

map<string, string> configs = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
key String
defaultValue String
Returns
Type Description
String

getConfigsOrThrow(String key)

public abstract String getConfigsOrThrow(String key)

Optional. Configurations for the topic that are overridden from the cluster defaults. The key of the map is a Kafka topic property name, for example: cleanup.policy, compression.type.

map<string, string> configs = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
key String
Returns
Type Description
String

getName()

public abstract String getName()

Identifier. The name of the topic. The topic segment is used when connecting directly to the cluster. Structured like: projects/{project}/locations/{location}/clusters/{cluster}/topics/{topic}

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Returns
Type Description
String

The name.

getNameBytes()

public abstract ByteString getNameBytes()

Identifier. The name of the topic. The topic segment is used when connecting directly to the cluster. Structured like: projects/{project}/locations/{location}/clusters/{cluster}/topics/{topic}

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Returns
Type Description
ByteString

The bytes for name.

getPartitionCount()

public abstract int getPartitionCount()

Required. The number of partitions this topic has. The partition count can only be increased, not decreased. Please note that if partitions are increased for a topic that has a key, the partitioning logic or the ordering of the messages will be affected.

int32 partition_count = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

The partitionCount.

getReplicationFactor()

public abstract int getReplicationFactor()

Required. Immutable. The number of replicas of each partition. A replication factor of 3 is recommended for high availability.

int32 replication_factor = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
int

The replicationFactor.