@Test public void testDelete() throws Exception { String path = "/path"; setupPathHelperReturn(path); testee.delete(ANY_SERVICE); verify(connector, times(1)).delete(path); verify(cacheWrapper, times(1)).rebuild(); }
@Override public void delete(String serviceName) { try { deleteByPath(pathHelper.getPathByService(serviceName)); rebuildCache(serviceName); } catch (DataSourceConnectorException e){ throw new RedirectorDataSourceException(e); } }
SimpleServiceDAO extends BaseDAO<T> implements ISimpleServiceDAO<T>, ICacheableDAO { @Override public void delete(String serviceName) { try { deleteByPath(pathHelper.getPathByService(serviceName)); rebuildCache(serviceName); } catch (DataSourceConnectorException e){ throw new RedirectorDataSourceException(e); } } }
SimpleServiceDAO extends BaseDAO<T> implements ISimpleServiceDAO<T>, ICacheableDAO { @Override public void delete(String serviceName) { try { deleteByPath(pathHelper.getPathByService(serviceName)); rebuildCache(serviceName); } catch (DataSourceConnectorException e){ throw new RedirectorDataSourceException(e); } } SimpleServiceDAO(Class<T> clazz,
                            Serializer marshalling,
                            IDataSourceConnector connector,
                            IPathHelper pathHelper,
                            boolean isCompressed,
                            boolean useCache,
                            boolean useCacheWhenNotConnectedToDataSource);  SimpleServiceDAO(Class<T> clazz,
                            Serializer marshalling,
                            IDataSourceConnector zookeeperConnector,
                            IPathHelper pathHelper,
                            boolean isCompressed,
                            boolean useCache); }
SimpleServiceDAO extends BaseDAO<T> implements ISimpleServiceDAO<T>, ICacheableDAO { @Override public void delete(String serviceName) { try { deleteByPath(pathHelper.getPathByService(serviceName)); rebuildCache(serviceName); } catch (DataSourceConnectorException e){ throw new RedirectorDataSourceException(e); } } SimpleServiceDAO(Class<T> clazz,
                            Serializer marshalling,
                            IDataSourceConnector connector,
                            IPathHelper pathHelper,
                            boolean isCompressed,
                            boolean useCache,
                            boolean useCacheWhenNotConnectedToDataSource);  SimpleServiceDAO(Class<T> clazz,
                            Serializer marshalling,
                            IDataSourceConnector zookeeperConnector,
                            IPathHelper pathHelper,
                            boolean isCompressed,
                            boolean useCache); @Override T get(String serviceName); @Override void save(T data, String serviceName); @Override void delete(String serviceName); @Override int getObjectVersion(String serviceName); @Override synchronized void rebuildCache(); @Override void addCacheListener(String serviceName, ICacheListener listener); @Override void close(); }
SimpleServiceDAO extends BaseDAO<T> implements ISimpleServiceDAO<T>, ICacheableDAO { @Override public void delete(String serviceName) { try { deleteByPath(pathHelper.getPathByService(serviceName)); rebuildCache(serviceName); } catch (DataSourceConnectorException e){ throw new RedirectorDataSourceException(e); } } SimpleServiceDAO(Class<T> clazz,
                            Serializer marshalling,
                            IDataSourceConnector connector,
                            IPathHelper pathHelper,
                            boolean isCompressed,
                            boolean useCache,
                            boolean useCacheWhenNotConnectedToDataSource);  SimpleServiceDAO(Class<T> clazz,
                            Serializer marshalling,
                            IDataSourceConnector zookeeperConnector,
                            IPathHelper pathHelper,
                            boolean isCompressed,
                            boolean useCache); @Override T get(String serviceName); @Override void save(T data, String serviceName); @Override void delete(String serviceName); @Override int getObjectVersion(String serviceName); @Override synchronized void rebuildCache(); @Override void addCacheListener(String serviceName, ICacheListener listener); @Override void close();  }