public class InMemoryLocalStore extends Object implements LocalStore
Constructor and Description |
---|
InMemoryLocalStore() |
Modifier and Type | Method and Description |
---|---|
void |
addMetadataEvent(String logicalCluster,
String topic,
io.confluent.protobuf.events.catalog.v1.MetadataEvent metadataEvent)
Add a topic
MetadataEvent to the store. |
void |
clear()
Clear all data in the store.
|
Set<String> |
logicalClusters()
Get all tenants in the store.
|
io.confluent.protobuf.events.catalog.v1.MetadataEvent |
metadataEvent(String topic)
Given a topic name with tenant prefix, get the
MetadataEvent of this topic. |
io.confluent.protobuf.events.catalog.v1.MetadataEvent |
removeMetadataEvent(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> |
topics(String logicalCluster)
Given the tenant id, get the set of topics belong to this tenant.
|
public void addMetadataEvent(String logicalCluster, String topic, io.confluent.protobuf.events.catalog.v1.MetadataEvent metadataEvent)
LocalStore
MetadataEvent
to the store.addMetadataEvent
in interface LocalStore
logicalCluster
- the tenant of this topictopic
- the topic name includes tenant prefixmetadataEvent
- the MetadataEvent of this topicpublic Set<String> topics(String logicalCluster)
LocalStore
topics
in interface LocalStore
public Set<String> logicalClusters()
LocalStore
logicalClusters
in interface LocalStore
public io.confluent.protobuf.events.catalog.v1.MetadataEvent metadataEvent(String topic)
LocalStore
MetadataEvent
of this topic.metadataEvent
in interface LocalStore
null
otherwisepublic io.confluent.protobuf.events.catalog.v1.MetadataEvent removeMetadataEvent(String logicalCluster, String topic)
LocalStore
MetadataEvent
of this topic
from the store.removeMetadataEvent
in interface LocalStore
null
otherwisepublic void clear()
LocalStore
clear
in interface LocalStore
public int size()
LocalStore
size
in interface LocalStore