Class TopicManagerRepository
- java.lang.Object
-
- com.linkedin.venice.pubsub.manager.TopicManagerRepository
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
public class TopicManagerRepository extends java.lang.Object implements java.io.Closeable
A repository ofTopicManager
instances, each associated with a specific PubSub region and cluster. This repository maintains oneTopicManager
for each unique PubSub bootstrap server address. While not mandatory, it is expected that each Venice component will have one and only one instance of this class.
-
-
Constructor Summary
Constructors Constructor Description TopicManagerRepository(TopicManagerContext topicManagerContext, java.lang.String localPubSubAddress)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
TopicManager
getLocalTopicManager()
By default, return TopicManager for local PubSub cluster.TopicManager
getTopicManager(java.lang.String pubSubAddress)
void
invalidateTopicManagerCaches(PubSubTopic pubSubTopic)
Invalidates the cache for the given PubSub topic across all TopicManagers in the repository.
-
-
-
Constructor Detail
-
TopicManagerRepository
public TopicManagerRepository(TopicManagerContext topicManagerContext, java.lang.String localPubSubAddress)
-
-
Method Detail
-
getLocalTopicManager
public TopicManager getLocalTopicManager()
By default, return TopicManager for local PubSub cluster.
-
getTopicManager
public TopicManager getTopicManager(java.lang.String pubSubAddress)
-
invalidateTopicManagerCaches
public void invalidateTopicManagerCaches(PubSubTopic pubSubTopic)
Invalidates the cache for the given PubSub topic across all TopicManagers in the repository.- Parameters:
pubSubTopic
- the PubSub topic to invalidate
-
close
public void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
-
-