public class InMemoryLocalStore extends Object implements LocalStore
Constructor and Description |
---|
InMemoryLocalStore() |
Modifier and Type | Method and Description |
---|---|
void |
addClusterLinkMetadataEvent(String logicalCluster,
String clusterLink,
io.confluent.protobuf.events.catalog.v1.MetadataEvent metadataEvent)
Add a cluster link
MetadataEvent to the store. |
void |
addTopicMetadataEvent(String logicalCluster,
String topic,
io.confluent.protobuf.events.catalog.v1.MetadataEvent metadataEvent)
Add a topic
MetadataEvent to the store. |
void |
addTopicMetadataEvent(String logicalCluster,
String topic,
io.confluent.protobuf.events.catalog.v1.MetadataEvent metadataEvent,
Set<String> topicConfigOverride,
Set<String> topicConfigReset)
Add a topic
MetadataEvent to the store with its override configs. |
void |
clear()
Clear all data in the store.
|
io.confluent.protobuf.events.catalog.v1.MetadataEvent |
clusterLinkMetadataEvent(String clusterLink)
Given a cluster link name with tenant prefix, get the
MetadataEvent of this
cluster link. |
Set<String> |
clusterLinks(String logicalCluster)
Given the tenant id, get the set of cluster links belong to this tenant.
|
Set<String> |
logicalClusters()
Get all tenants in the store.
|
io.confluent.protobuf.events.catalog.v1.MetadataEvent |
removeClusterLinkMetadataEvent(String logicalCluster,
String clusterLink)
Given tenant and the cluster link name, remove the
MetadataEvent of this cluster
link from the store. |
io.confluent.protobuf.events.catalog.v1.MetadataEvent |
removeTopicMetadataEvent(String logicalCluster,
String topic)
Given tenant and the topic name, remove the
MetadataEvent of this topic
from the store. |
int |
size()
Get the total number of metadataEvents in this store.
|
Set<String> |
topicConfigOverrides(String topic)
Given a topic name with tenant prefix, return the override configs of this topic.
|
io.confluent.protobuf.events.catalog.v1.MetadataEvent |
topicMetadataEvent(String topic)
Given a topic name with tenant prefix, get the
MetadataEvent of this topic. |
Set<String> |
topics(String logicalCluster)
Given the tenant id, get the set of topics belong to this tenant.
|
public void addTopicMetadataEvent(String logicalCluster, String topic, io.confluent.protobuf.events.catalog.v1.MetadataEvent metadataEvent)
LocalStore
MetadataEvent
to the store.addTopicMetadataEvent
in interface LocalStore
logicalCluster
- the tenant of this topictopic
- the topic name includes tenant prefixmetadataEvent
- the MetadataEvent of this topicpublic void addClusterLinkMetadataEvent(String logicalCluster, String clusterLink, io.confluent.protobuf.events.catalog.v1.MetadataEvent metadataEvent)
LocalStore
MetadataEvent
to the store.addClusterLinkMetadataEvent
in interface LocalStore
logicalCluster
- the tenant of this topicclusterLink
- the csluter link name includes tenant prefixmetadataEvent
- the MetadataEvent of this topicpublic void addTopicMetadataEvent(String logicalCluster, String topic, io.confluent.protobuf.events.catalog.v1.MetadataEvent metadataEvent, Set<String> topicConfigOverride, Set<String> topicConfigReset)
LocalStore
MetadataEvent
to the store with its override configs.addTopicMetadataEvent
in interface LocalStore
logicalCluster
- the tenant of this topictopic
- the topic name includes tenant prefixmetadataEvent
- the MetadataEvent of this topictopicConfigOverride
- List of topic configs that this topic has overridden valuetopicConfigReset
- List of topic configs that this topic the overridden value are deletedpublic Set<String> topics(String logicalCluster)
LocalStore
topics
in interface LocalStore
public Set<String> clusterLinks(String logicalCluster)
LocalStore
clusterLinks
in interface LocalStore
public Set<String> logicalClusters()
LocalStore
logicalClusters
in interface LocalStore
public io.confluent.protobuf.events.catalog.v1.MetadataEvent topicMetadataEvent(String topic)
LocalStore
MetadataEvent
of this topic.topicMetadataEvent
in interface LocalStore
null
otherwisepublic io.confluent.protobuf.events.catalog.v1.MetadataEvent clusterLinkMetadataEvent(String clusterLink)
LocalStore
MetadataEvent
of this
cluster link.clusterLinkMetadataEvent
in interface LocalStore
null
otherwisepublic Set<String> topicConfigOverrides(String topic)
LocalStore
topicConfigOverrides
in interface LocalStore
public io.confluent.protobuf.events.catalog.v1.MetadataEvent removeTopicMetadataEvent(String logicalCluster, String topic)
LocalStore
MetadataEvent
of this topic
from the store.removeTopicMetadataEvent
in interface LocalStore
null
otherwisepublic io.confluent.protobuf.events.catalog.v1.MetadataEvent removeClusterLinkMetadataEvent(String logicalCluster, String clusterLink)
LocalStore
MetadataEvent
of this cluster
link from the store.removeClusterLinkMetadataEvent
in interface LocalStore
null
otherwisepublic void clear()
LocalStore
clear
in interface LocalStore
public int size()
LocalStore
size
in interface LocalStore