@Test public void testRemoveAll() { DirectoryAgentInfoCache cache = new DirectoryAgentInfoCache(); DirectoryAgentInfo info1 = DirectoryAgentInfo.from("1.2.3.4"); cache.add(info1); DirectoryAgentInfo info2 = DirectoryAgentInfo.from("2.3.4.5"); cache.add(info2); cache.removeAll(); assert cache.match(null, null).size() == 0; }
public void removeAll() { lock.lock(); try { cache.clear(); } finally { lock.unlock(); } }
DirectoryAgentInfoCache { public void removeAll() { lock.lock(); try { cache.clear(); } finally { lock.unlock(); } } }
DirectoryAgentInfoCache { public void removeAll() { lock.lock(); try { cache.clear(); } finally { lock.unlock(); } }  }
DirectoryAgentInfoCache { public void removeAll() { lock.lock(); try { cache.clear(); } finally { lock.unlock(); } }  DirectoryAgentInfo add(DirectoryAgentInfo directoryAgent); void addAll(List<DirectoryAgentInfo> directoryAgents); DirectoryAgentInfo remove(DirectoryAgentInfo.Key key); void removeAll(); List<DirectoryAgentInfo> match(Scopes scopes, Filter filter); void addDirectoryAgentListener(DirectoryAgentListener listener); void removeDirectoryAgentListener(DirectoryAgentListener listener); void handle(DirectoryAgentInfo directoryAgent); }
DirectoryAgentInfoCache { public void removeAll() { lock.lock(); try { cache.clear(); } finally { lock.unlock(); } }  DirectoryAgentInfo add(DirectoryAgentInfo directoryAgent); void addAll(List<DirectoryAgentInfo> directoryAgents); DirectoryAgentInfo remove(DirectoryAgentInfo.Key key); void removeAll(); List<DirectoryAgentInfo> match(Scopes scopes, Filter filter); void addDirectoryAgentListener(DirectoryAgentListener listener); void removeDirectoryAgentListener(DirectoryAgentListener listener); void handle(DirectoryAgentInfo directoryAgent);  }