@Test public void testSharedDiskLruCacheFactorySameInstance() throws Exception { DiskLruCacheWrapper.SharedDiskLruCacheFactory wrapper1 = new DiskLruCacheWrapper.SharedDiskLruCacheFactory( new File(getContext().getCacheDir(), "blank"), 100 * 1024 * 1024); DiskLruCacheWrapper.SharedDiskLruCacheFactory wrapper2 = new DiskLruCacheWrapper.SharedDiskLruCacheFactory( new File(getContext().getCacheDir(), "blank"), 100 * 1024 * 1024); Assert.assertSame(wrapper1.getDiskCache(), wrapper2.getDiskCache()); }
private synchronized DiskLruCache getDiskCache() throws IOException { return diskLruCacheFactory.getDiskCache(); }
DiskLruCacheWrapper implements DiskCache { private synchronized DiskLruCache getDiskCache() throws IOException { return diskLruCacheFactory.getDiskCache(); } }
DiskLruCacheWrapper implements DiskCache { private synchronized DiskLruCache getDiskCache() throws IOException { return diskLruCacheFactory.getDiskCache(); } DiskLruCacheWrapper(DiskLruCacheFactory diskLruCacheFactory); }
DiskLruCacheWrapper implements DiskCache { private synchronized DiskLruCache getDiskCache() throws IOException { return diskLruCacheFactory.getDiskCache(); } DiskLruCacheWrapper(DiskLruCacheFactory diskLruCacheFactory); synchronized void setReadOnly(boolean isReadOnly); @Override File get(String key); @Override void put(String key, Writer writer); @Override void delete(String key); @Override synchronized void clear(); }
DiskLruCacheWrapper implements DiskCache { private synchronized DiskLruCache getDiskCache() throws IOException { return diskLruCacheFactory.getDiskCache(); } DiskLruCacheWrapper(DiskLruCacheFactory diskLruCacheFactory); synchronized void setReadOnly(boolean isReadOnly); @Override File get(String key); @Override void put(String key, Writer writer); @Override void delete(String key); @Override synchronized void clear();  }