public class PhysicalClusterMetadata extends Object implements org.apache.kafka.server.multitenant.MultiTenantMetadata
Modifier and Type | Class and Description |
---|---|
static class |
PhysicalClusterMetadata.State |
Modifier and Type | Field and Description |
---|---|
SslCertificateManager |
sslCertificateManager |
TenantLifecycleManager |
tenantLifecycleManager |
Constructor and Description |
---|
PhysicalClusterMetadata(org.apache.kafka.common.metrics.Metrics metrics) |
PhysicalClusterMetadata(org.apache.kafka.common.metrics.Metrics metrics,
org.apache.kafka.common.utils.Time time) |
Modifier and Type | Method and Description |
---|---|
void |
close(String brokerSessionUuid) |
void |
configure(Map<String,?> configs)
Loads the cache and starts listening for directory events in directory specified in
ConfluentConfigs.MULTITENANT_METADATA_DIR_CONFIG config.
|
String |
dedicatedLogicalClusterId() |
static PhysicalClusterMetadata |
getInstance(String brokerSessionUuid) |
void |
handleSocketServerInitialized(String endpoint) |
boolean |
isUp()
Returns true if cache is loaded and listening for metadata, otherwise returns false.
|
Set<String> |
logicalClusterIds()
Returns all active logical clusters with up-to-date/valid metadata hosted by this physical
cluster
|
Set<String> |
logicalClusterIdsIncludingStale()
Returns all active logical clusters hosted by this physical cluster, including logical clusters
with stale/invalid metadata
|
LogicalClusterMetadata |
metadata(String logicalClusterId)
Returns metadata of a given logical cluster ID
|
Map<org.apache.kafka.common.Endpoint,CompletableFuture<Void>> |
start(Collection<org.apache.kafka.common.Endpoint> endpoints) |
public TenantLifecycleManager tenantLifecycleManager
public SslCertificateManager sslCertificateManager
public PhysicalClusterMetadata(org.apache.kafka.common.metrics.Metrics metrics)
public PhysicalClusterMetadata(org.apache.kafka.common.metrics.Metrics metrics, org.apache.kafka.common.utils.Time time)
public void configure(Map<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.UnsupportedOperationException
- if another instance of this class with the same broker
session UUID was already configured.public void close(String brokerSessionUuid)
close
in interface org.apache.kafka.server.multitenant.MultiTenantMetadata
public void handleSocketServerInitialized(String endpoint)
handleSocketServerInitialized
in interface org.apache.kafka.server.multitenant.MultiTenantMetadata
public static PhysicalClusterMetadata getInstance(String brokerSessionUuid)
public Map<org.apache.kafka.common.Endpoint,CompletableFuture<Void>> start(Collection<org.apache.kafka.common.Endpoint> endpoints)
start
in interface org.apache.kafka.server.multitenant.MultiTenantMetadata
public boolean isUp()
public String dedicatedLogicalClusterId()
dedicatedLogicalClusterId
in interface org.apache.kafka.server.multitenant.MultiTenantMetadata
public Set<String> logicalClusterIds()
IllegalStateException
- if cache is not started or already shut downpublic Set<String> logicalClusterIdsIncludingStale()
IllegalStateException
- if cache is not started or already shut downpublic LogicalClusterMetadata metadata(String logicalClusterId)
logicalClusterId
- logical cluster IDIllegalStateException
- if cache is not started yet or already shut down