@Test public void testSaveForExistingNodeCompressed() throws Exception { setupCheckExists("/path", true); testee.saveCompressed("success", "/path"); verify(pathCreator, times(1)).createPath("/path"); verify(setDataCompressible, times(1)).forPath("/path", "success".getBytes()); }
@Override public void saveCompressed(final String data, final String path) throws DataSourceConnectorException { save(data, path, true); }
ZookeeperConnector implements IDataSourceConnector, ConnectionStateListener { @Override public void saveCompressed(final String data, final String path) throws DataSourceConnectorException { save(data, path, true); } }
ZookeeperConnector implements IDataSourceConnector, ConnectionStateListener { @Override public void saveCompressed(final String data, final String path) throws DataSourceConnectorException { save(data, path, true); } @VisibleForTesting  ZookeeperConnector(); @VisibleForTesting  ZookeeperConnector(CuratorFramework client, String basePath, boolean cacheHosts, IPathCreator pathCreator,
                       IStacksCache stackCache, INodeCacheFactory nodeCacheFactory, IPathChildrenCacheFactory pathChildrenCacheFactory);  ZookeeperConnector(CuratorFramework client, String basePath, boolean cacheHosts);  ZookeeperConnector(CuratorFramework client, String basePath, boolean cacheHosts, Function<IServiceDiscovery, Boolean> stacksRefreshListener);  ZookeeperConnector(CuratorFramework client, String basePath, boolean cacheHosts, Supplier<IStacksCache> stacksCacheFactory);  ZookeeperConnector(CuratorFramework client, String basePath, boolean cacheHosts,
                              Supplier<IStacksCache> stacksCacheFactory, Function<IServiceDiscovery, Boolean> stacksRefreshListener); }
ZookeeperConnector implements IDataSourceConnector, ConnectionStateListener { @Override public void saveCompressed(final String data, final String path) throws DataSourceConnectorException { save(data, path, true); } @VisibleForTesting  ZookeeperConnector(); @VisibleForTesting  ZookeeperConnector(CuratorFramework client, String basePath, boolean cacheHosts, IPathCreator pathCreator,
                       IStacksCache stackCache, INodeCacheFactory nodeCacheFactory, IPathChildrenCacheFactory pathChildrenCacheFactory);  ZookeeperConnector(CuratorFramework client, String basePath, boolean cacheHosts);  ZookeeperConnector(CuratorFramework client, String basePath, boolean cacheHosts, Function<IServiceDiscovery, Boolean> stacksRefreshListener);  ZookeeperConnector(CuratorFramework client, String basePath, boolean cacheHosts, Supplier<IStacksCache> stacksCacheFactory);  ZookeeperConnector(CuratorFramework client, String basePath, boolean cacheHosts,
                              Supplier<IStacksCache> stacksCacheFactory, Function<IServiceDiscovery, Boolean> stacksRefreshListener); @Override void addConnectionListener(ConnectionListener listener); @Override boolean blockUntilConnectedOrTimedOut(); @Override boolean isPathExists(String path); @Override List<String> getChildren(final String path); @Override void saveCompressed(final String data, final String path); @Override void save(String data, String path); @Override void deleteWithChildren(final String path); @Override void delete(String path); @Override void create(final String path); @Override void createEphemeral(final String path); @Override Transaction createTransaction(); @Override byte[] getData(final String path); @Override byte[] getDataDecompressed(final String path); @Override int getNodeVersion(String path); @Override String getBasePath(); @Override boolean isCacheHosts(); @Override void connect(); @Override void disconnect(); @Override IStacksCache getStacksCache(); @Override void addNodeDataChangeListener(String path, IDataListener listener); @Override void addPathChildrenChangeListener(String path, IDataListener listener); @Override INodeCacheWrapper newNodeCacheWrapper(String path, boolean useCache); @Override INodeCacheWrapper newNodeCacheWrapper(String path, boolean useCache, boolean useCacheWhenNotConnectedToDataSource); @Override INodeCacheWrapper newNodeCacheWrapper(String path, boolean useCache, boolean useCacheWhenNotConnectedToDataSource, boolean isCompressed); @Override IPathChildrenCacheWrapper newPathChildrenCacheWrapper(String path, boolean useCache); @Override IPathChildrenCacheWrapper newPathChildrenCacheWrapper(String path, boolean dataIsCompressed, ThreadFactory threadFactory, boolean useCache); @Override void stateChanged(CuratorFramework client, ConnectionState newState); @Override boolean isConnected(); @Override SharedInterProcessLock createLock(String path); }
ZookeeperConnector implements IDataSourceConnector, ConnectionStateListener { @Override public void saveCompressed(final String data, final String path) throws DataSourceConnectorException { save(data, path, true); } @VisibleForTesting  ZookeeperConnector(); @VisibleForTesting  ZookeeperConnector(CuratorFramework client, String basePath, boolean cacheHosts, IPathCreator pathCreator,
                       IStacksCache stackCache, INodeCacheFactory nodeCacheFactory, IPathChildrenCacheFactory pathChildrenCacheFactory);  ZookeeperConnector(CuratorFramework client, String basePath, boolean cacheHosts);  ZookeeperConnector(CuratorFramework client, String basePath, boolean cacheHosts, Function<IServiceDiscovery, Boolean> stacksRefreshListener);  ZookeeperConnector(CuratorFramework client, String basePath, boolean cacheHosts, Supplier<IStacksCache> stacksCacheFactory);  ZookeeperConnector(CuratorFramework client, String basePath, boolean cacheHosts,
                              Supplier<IStacksCache> stacksCacheFactory, Function<IServiceDiscovery, Boolean> stacksRefreshListener); @Override void addConnectionListener(ConnectionListener listener); @Override boolean blockUntilConnectedOrTimedOut(); @Override boolean isPathExists(String path); @Override List<String> getChildren(final String path); @Override void saveCompressed(final String data, final String path); @Override void save(String data, String path); @Override void deleteWithChildren(final String path); @Override void delete(String path); @Override void create(final String path); @Override void createEphemeral(final String path); @Override Transaction createTransaction(); @Override byte[] getData(final String path); @Override byte[] getDataDecompressed(final String path); @Override int getNodeVersion(String path); @Override String getBasePath(); @Override boolean isCacheHosts(); @Override void connect(); @Override void disconnect(); @Override IStacksCache getStacksCache(); @Override void addNodeDataChangeListener(String path, IDataListener listener); @Override void addPathChildrenChangeListener(String path, IDataListener listener); @Override INodeCacheWrapper newNodeCacheWrapper(String path, boolean useCache); @Override INodeCacheWrapper newNodeCacheWrapper(String path, boolean useCache, boolean useCacheWhenNotConnectedToDataSource); @Override INodeCacheWrapper newNodeCacheWrapper(String path, boolean useCache, boolean useCacheWhenNotConnectedToDataSource, boolean isCompressed); @Override IPathChildrenCacheWrapper newPathChildrenCacheWrapper(String path, boolean useCache); @Override IPathChildrenCacheWrapper newPathChildrenCacheWrapper(String path, boolean dataIsCompressed, ThreadFactory threadFactory, boolean useCache); @Override void stateChanged(CuratorFramework client, ConnectionState newState); @Override boolean isConnected(); @Override SharedInterProcessLock createLock(String path);  }