@Test public void testRebuildDoNotUseCache() throws Exception { testee = new ZkPathChildrenCacheWrapper(client, "/test", false, null); testee.rebuild(); verify(cache, never()).rebuild(); }
@Override public void rebuild() { if ((useCache || useCacheWhenNotConnectedToDataSource) && connector.isConnected()) { try { cache.rebuild(); allowUseCache(); log.debug("Successfully rebuilt cache for path={}", path); } catch (Exception e) { log.error("Failed to rebuild cache for path={}", path, e); } } }
ZkPathChildrenCacheWrapper extends BaseCacheWrapper implements IPathChildrenCacheWrapper { @Override public void rebuild() { if ((useCache || useCacheWhenNotConnectedToDataSource) && connector.isConnected()) { try { cache.rebuild(); allowUseCache(); log.debug("Successfully rebuilt cache for path={}", path); } catch (Exception e) { log.error("Failed to rebuild cache for path={}", path, e); } } } }
ZkPathChildrenCacheWrapper extends BaseCacheWrapper implements IPathChildrenCacheWrapper { @Override public void rebuild() { if ((useCache || useCacheWhenNotConnectedToDataSource) && connector.isConnected()) { try { cache.rebuild(); allowUseCache(); log.debug("Successfully rebuilt cache for path={}", path); } catch (Exception e) { log.error("Failed to rebuild cache for path={}", path, e); } } } ZkPathChildrenCacheWrapper(IDataSourceConnector connector,
                                      String path,
                                      boolean dataIsCompressed,
                                      PathChildrenCache cache); }
ZkPathChildrenCacheWrapper extends BaseCacheWrapper implements IPathChildrenCacheWrapper { @Override public void rebuild() { if ((useCache || useCacheWhenNotConnectedToDataSource) && connector.isConnected()) { try { cache.rebuild(); allowUseCache(); log.debug("Successfully rebuilt cache for path={}", path); } catch (Exception e) { log.error("Failed to rebuild cache for path={}", path, e); } } } ZkPathChildrenCacheWrapper(IDataSourceConnector connector,
                                      String path,
                                      boolean dataIsCompressed,
                                      PathChildrenCache cache); @Override void start(final PathChildrenCache.StartMode startMode); @Override void addListener(PathChildrenCacheListener listener); @Override void rebuild(); @Override void close(); @Override void rebuildNode(final String path); @Override Map<String, byte[]> getNodeIdToDataMap(); @Override byte[] getCurrentData(String fullPath); boolean isUseCache(); }
ZkPathChildrenCacheWrapper extends BaseCacheWrapper implements IPathChildrenCacheWrapper { @Override public void rebuild() { if ((useCache || useCacheWhenNotConnectedToDataSource) && connector.isConnected()) { try { cache.rebuild(); allowUseCache(); log.debug("Successfully rebuilt cache for path={}", path); } catch (Exception e) { log.error("Failed to rebuild cache for path={}", path, e); } } } ZkPathChildrenCacheWrapper(IDataSourceConnector connector,
                                      String path,
                                      boolean dataIsCompressed,
                                      PathChildrenCache cache); @Override void start(final PathChildrenCache.StartMode startMode); @Override void addListener(PathChildrenCacheListener listener); @Override void rebuild(); @Override void close(); @Override void rebuildNode(final String path); @Override Map<String, byte[]> getNodeIdToDataMap(); @Override byte[] getCurrentData(String fullPath); boolean isUseCache();  }