@Test public void getTopicConfigCacheTest() { long total = clusterNameServiceStub.getTotal(); this.propertySupplierMap.put(ClusterConfigKey.GET_TOPIC_DYNAMIC_METADATA_CACHE_ENABLE.getName(), true); TopicConfig topicConfig = clusterNameServiceStub.getTopicConfig(TopicName.parse("test2")); Assert.assertEquals(total + 2, clusterNameServiceStub.getTotal()); total = clusterNameServiceStub.getTotal(); topicConfig = clusterNameServiceStub.getTopicConfig(TopicName.parse("test2")); Assert.assertEquals(total, clusterNameServiceStub.getTotal()); this.propertySupplierMap.put(ClusterConfigKey.GET_TOPIC_DYNAMIC_METADATA_CACHE_ENABLE.getName(), false); }
public TopicConfig getTopicConfig(TopicName topicName) { TopicConfig topicConfig = nameService.getTopicConfig(topicName); if (topicConfig == null) { return null; } return doGetTopicConfig(topicConfig); }
ClusterNameService extends Service { public TopicConfig getTopicConfig(TopicName topicName) { TopicConfig topicConfig = nameService.getTopicConfig(topicName); if (topicConfig == null) { return null; } return doGetTopicConfig(topicConfig); } }
ClusterNameService extends Service { public TopicConfig getTopicConfig(TopicName topicName) { TopicConfig topicConfig = nameService.getTopicConfig(topicName); if (topicConfig == null) { return null; } return doGetTopicConfig(topicConfig); } ClusterNameService(NameService nameService, BrokerEventBus eventBus, PropertySupplier propertySupplier); }
ClusterNameService extends Service { public TopicConfig getTopicConfig(TopicName topicName) { TopicConfig topicConfig = nameService.getTopicConfig(topicName); if (topicConfig == null) { return null; } return doGetTopicConfig(topicConfig); } ClusterNameService(NameService nameService, BrokerEventBus eventBus, PropertySupplier propertySupplier); void setBroker(Broker broker); ClusterNode getTopicGroupNode(TopicName topicName, int group); ClusterNode getTopicGroupNode(String topic, int group); Map<TopicName, TopicConfig> getTopicConfigByApp(String subscribeApp, Subscription.Type subscribe); Map<String, TopicConfig> getTopicConfigs(List<String> topics); TopicConfig getTopicConfig(TopicName topicName); TopicConfig doGetTopicConfig(TopicConfig topicConfig); NameService getNameService(); }
ClusterNameService extends Service { public TopicConfig getTopicConfig(TopicName topicName) { TopicConfig topicConfig = nameService.getTopicConfig(topicName); if (topicConfig == null) { return null; } return doGetTopicConfig(topicConfig); } ClusterNameService(NameService nameService, BrokerEventBus eventBus, PropertySupplier propertySupplier); void setBroker(Broker broker); ClusterNode getTopicGroupNode(TopicName topicName, int group); ClusterNode getTopicGroupNode(String topic, int group); Map<TopicName, TopicConfig> getTopicConfigByApp(String subscribeApp, Subscription.Type subscribe); Map<String, TopicConfig> getTopicConfigs(List<String> topics); TopicConfig getTopicConfig(TopicName topicName); TopicConfig doGetTopicConfig(TopicConfig topicConfig); NameService getNameService();  }