public class PhysicalClusterMetadata
extends java.lang.Object
implements org.apache.kafka.server.multitenant.MultiTenantMetadata
Modifier and Type | Class and Description |
---|---|
static class |
PhysicalClusterMetadata.State |
Modifier and Type | Field and Description |
---|---|
TenantLifecycleManager |
tenantLifecycleManager |
Constructor and Description |
---|
PhysicalClusterMetadata() |
Modifier and Type | Method and Description |
---|---|
void |
close(java.lang.String brokerSessionUuid) |
void |
configure(java.util.Map<java.lang.String,?> configs)
Loads the cache and starts listening for directory events in directory specified in
ConfluentConfigs.MULTITENANT_METADATA_DIR_CONFIG config.
|
static PhysicalClusterMetadata |
getInstance(java.lang.String brokerSessionUuid) |
boolean |
isUp()
Returns true if cache is loaded and listening for metadata, otherwise returns false.
|
java.util.Set<java.lang.String> |
logicalClusterIds()
Returns all active logical clusters with up-to-date/valid metadata hosted by this physical
cluster
|
java.util.Set<java.lang.String> |
logicalClusterIdsIncludingStale()
Returns all active logical clusters hosted by this physical cluster, including logical clusters
with stale/invalid metadata
|
LogicalClusterMetadata |
metadata(java.lang.String logicalClusterId)
Returns metadata of a given logical cluster ID
|
public TenantLifecycleManager tenantLifecycleManager
public void configure(java.util.Map<java.lang.String,?> configs)
configure
in interface org.apache.kafka.common.Configurable
configs
- broker configurationorg.apache.kafka.common.config.ConfigException
- if KafkaConfig.BrokerSessionUuidProp is not set, or
ConfluentConfigs.MULTITENANT_METADATA_DIR_CONFIG is not set.java.lang.UnsupportedOperationException
- if another instance of this class with the same broker
session UUID was already configured.public void close(java.lang.String brokerSessionUuid)
close
in interface org.apache.kafka.server.multitenant.MultiTenantMetadata
public static PhysicalClusterMetadata getInstance(java.lang.String brokerSessionUuid)
public boolean isUp()
public java.util.Set<java.lang.String> logicalClusterIds()
java.lang.IllegalStateException
- if cache is not started or already shut downpublic java.util.Set<java.lang.String> logicalClusterIdsIncludingStale()
java.lang.IllegalStateException
- if cache is not started or already shut downpublic LogicalClusterMetadata metadata(java.lang.String logicalClusterId)
logicalClusterId
- logical cluster IDjava.lang.IllegalStateException
- if cache is not started yet or already shut down