@Test public void testAssembleAllWatchKeysWithOneNamespaceAndSomeDCAndSomeCluster() throws Exception { Set<String> watchKeys = watchKeysUtil.assembleAllWatchKeys(someAppId, someCluster, someNamespace, someDC); Set<String> clusters = Sets.newHashSet(defaultCluster, someCluster, someDC); assertEquals(clusters.size(), watchKeys.size()); assertWatchKeys(someAppId, clusters, someNamespace, watchKeys); }
public Set<String> assembleAllWatchKeys(String appId, String clusterName, String namespace, String dataCenter) { Multimap<String, String> watchedKeysMap = assembleAllWatchKeys(appId, clusterName, Sets.newHashSet(namespace), dataCenter); return Sets.newHashSet(watchedKeysMap.get(namespace)); }
WatchKeysUtil { public Set<String> assembleAllWatchKeys(String appId, String clusterName, String namespace, String dataCenter) { Multimap<String, String> watchedKeysMap = assembleAllWatchKeys(appId, clusterName, Sets.newHashSet(namespace), dataCenter); return Sets.newHashSet(watchedKeysMap.get(namespace)); } }
WatchKeysUtil { public Set<String> assembleAllWatchKeys(String appId, String clusterName, String namespace, String dataCenter) { Multimap<String, String> watchedKeysMap = assembleAllWatchKeys(appId, clusterName, Sets.newHashSet(namespace), dataCenter); return Sets.newHashSet(watchedKeysMap.get(namespace)); } WatchKeysUtil(final AppNamespaceServiceWithCache appNamespaceService); }
WatchKeysUtil { public Set<String> assembleAllWatchKeys(String appId, String clusterName, String namespace, String dataCenter) { Multimap<String, String> watchedKeysMap = assembleAllWatchKeys(appId, clusterName, Sets.newHashSet(namespace), dataCenter); return Sets.newHashSet(watchedKeysMap.get(namespace)); } WatchKeysUtil(final AppNamespaceServiceWithCache appNamespaceService); Set<String> assembleAllWatchKeys(String appId, String clusterName, String namespace,
                                          String dataCenter); Multimap<String, String> assembleAllWatchKeys(String appId, String clusterName,
                                                       Set<String> namespaces,
                                                       String dataCenter); }
WatchKeysUtil { public Set<String> assembleAllWatchKeys(String appId, String clusterName, String namespace, String dataCenter) { Multimap<String, String> watchedKeysMap = assembleAllWatchKeys(appId, clusterName, Sets.newHashSet(namespace), dataCenter); return Sets.newHashSet(watchedKeysMap.get(namespace)); } WatchKeysUtil(final AppNamespaceServiceWithCache appNamespaceService); Set<String> assembleAllWatchKeys(String appId, String clusterName, String namespace,
                                          String dataCenter); Multimap<String, String> assembleAllWatchKeys(String appId, String clusterName,
                                                       Set<String> namespaces,
                                                       String dataCenter);  }