@Test public void verifyListenerCalledOnNodeRemoved() throws Exception { ensure("/foos/foo", new DataPojo("foo")); verify(listener, timeout(60000).atLeastOnce()).nodesChanged(cache); reset(listener); try { zk.curatorWithSuperAuth().delete().forPath("/foos/foo"); } catch (NoNodeException ignore) { } verify(listener, timeout(60000).atLeastOnce()).nodesChanged(cache); assertTrue(cache.getNodes().isEmpty()); }
public Map<String, T> getNodes() { return snapshot.get(); }
PersistentPathChildrenCache extends AbstractIdleService { public Map<String, T> getNodes() { return snapshot.get(); } }
PersistentPathChildrenCache extends AbstractIdleService { public Map<String, T> getNodes() { return snapshot.get(); } PersistentPathChildrenCache(final CuratorFramework curator, final String path,
                                     final String clusterId, final Path snapshotFile,
                                     final JavaType valueType); }
PersistentPathChildrenCache extends AbstractIdleService { public Map<String, T> getNodes() { return snapshot.get(); } PersistentPathChildrenCache(final CuratorFramework curator, final String path,
                                     final String clusterId, final Path snapshotFile,
                                     final JavaType valueType); void addListener(final Listener listener); void removeListener(final Listener listener); Map<String, T> getNodes(); }
PersistentPathChildrenCache extends AbstractIdleService { public Map<String, T> getNodes() { return snapshot.get(); } PersistentPathChildrenCache(final CuratorFramework curator, final String path,
                                     final String clusterId, final Path snapshotFile,
                                     final JavaType valueType); void addListener(final Listener listener); void removeListener(final Listener listener); Map<String, T> getNodes();  }