@Test(expected = RedirectorDataSourceException.class) public void testGetExceptionHappens() throws Exception { setupExceptionOnGetOne(new RedirectorDataSourceException(new Exception())); testee.get(ANY_SERVICE); }
@Override public T get(String serviceName) { try { return deserializeOrReturnNull(getCache(serviceName).getCurrentData()); } catch (DataSourceConnectorException e) { throw new RedirectorDataSourceException(e); } }
SimpleServiceDAO extends BaseDAO<T> implements ISimpleServiceDAO<T>, ICacheableDAO { @Override public T get(String serviceName) { try { return deserializeOrReturnNull(getCache(serviceName).getCurrentData()); } catch (DataSourceConnectorException e) { throw new RedirectorDataSourceException(e); } } }
SimpleServiceDAO extends BaseDAO<T> implements ISimpleServiceDAO<T>, ICacheableDAO { @Override public T get(String serviceName) { try { return deserializeOrReturnNull(getCache(serviceName).getCurrentData()); } 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 T get(String serviceName) { try { return deserializeOrReturnNull(getCache(serviceName).getCurrentData()); } 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 T get(String serviceName) { try { return deserializeOrReturnNull(getCache(serviceName).getCurrentData()); } 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();  }