/libcore/luni/src/test/java/libcore/util/ |
D | BasicLruCacheTest.java | 28 BasicLruCache<String, String> cache = newCreatingCache(); in testCreateOnCacheMiss() local 29 String created = cache.get("aa"); in testCreateOnCacheMiss() 34 BasicLruCache<String, String> cache = newCreatingCache(); in testNoCreateOnCacheHit() local 35 cache.put("aa", "put-aa"); in testNoCreateOnCacheHit() 36 assertEquals("put-aa", cache.get("aa")); in testNoCreateOnCacheHit() 48 BasicLruCache<String, String> cache = new BasicLruCache<String, String>(3); in testCannotPutNullKey() local 50 cache.put(null, "A"); in testCannotPutNullKey() 57 BasicLruCache<String, String> cache = new BasicLruCache<String, String>(3); in testCannotPutNullValue() local 59 cache.put("a", null); in testCannotPutNullValue() 66 BasicLruCache<String, String> cache = new BasicLruCache<String, String>(1); in testEvictionWithSingletonCache() local [all …]
|
/libcore/luni/src/test/java/libcore/io/ |
D | DiskLruCacheTest.java | 43 private DiskLruCache cache; field in DiskLruCacheTest 55 cache = DiskLruCache.open(cacheDir, appVersion, 2, Integer.MAX_VALUE); in setUp() 61 cache.close(); in tearDown() 66 cache.close(); in testEmptyCache() 71 DiskLruCache.Editor creator = cache.edit("k1"); in testWriteAndReadEntry() 80 DiskLruCache.Snapshot snapshot = cache.get("k1"); in testWriteAndReadEntry() 86 DiskLruCache.Editor creator = cache.edit("k1"); in testReadAndWriteEntryAcrossCacheOpenAndClose() 90 cache.close(); in testReadAndWriteEntryAcrossCacheOpenAndClose() 92 cache = DiskLruCache.open(cacheDir, appVersion, 2, Integer.MAX_VALUE); in testReadAndWriteEntryAcrossCacheOpenAndClose() 93 DiskLruCache.Snapshot snapshot = cache.get("k1"); in testReadAndWriteEntryAcrossCacheOpenAndClose() [all …]
|
/libcore/luni/src/main/java/java/net/ |
D | AddressCache.java | 40 private final BasicLruCache<String, AddressCacheEntry> cache field in AddressCache 66 cache.evictAll(); in clear() 75 AddressCacheEntry entry = cache.get(hostname); in get() 90 cache.put(hostname, new AddressCacheEntry(addresses)); in put() 98 cache.put(hostname, new AddressCacheEntry(detailMessage)); in putUnknownHost()
|
/libcore/support/src/test/java/tests/support/ |
D | Support_GetLocal.java | 35 static Hashtable<String, File> cache = new Hashtable<String, File>(20); field in Support_GetLocal 40 File temp = cache.get(url); in getLocalFile() 53 cache.put(url, temp); in getLocalFile() 60 File temp = cache.get(url); in getExternalLocalFile() 73 cache.put(url, temp); in getExternalLocalFile()
|
/libcore/luni/src/main/java/org/apache/harmony/security/provider/cert/ |
D | Cache.java | 110 private final Object[] cache; field in Cache 138 cache = new Object[cache_size]; in Cache() 225 return cache[i]; in get() 310 cache[index] = object; in put()
|
/libcore/luni/src/test/java/org/apache/harmony/xnet/provider/jsse/ |
D | FileClientSessionCacheTest.java | 33 final SSLClientSessionCache cache in testMaxSize() local 43 cache.putSessionData(new FakeSSLSession(id + "" + i), new byte[10]); in testMaxSize()
|
/libcore/luni/src/test/java/libcore/net/http/ |
D | HttpResponseCacheTest.java | 70 private HttpResponseCache cache; field in HttpResponseCacheTest 79 cache = new HttpResponseCache(cacheDir, Integer.MAX_VALUE); in setUp() 80 ResponseCache.setDefault(cache); in setUp() 89 cache.getCache().delete(); in tearDown() 179 CacheResponse cached = cache.get(url.toURI(), "GET", in assertCached() 278 assertEquals(1, cache.getWriteSuccessCount()); in testResponseCaching() 279 assertEquals(0, cache.getWriteAbortCount()); in testResponseCaching() 290 assertEquals(1, cache.getWriteSuccessCount()); in testResponseCaching() 291 assertEquals(0, cache.getWriteAbortCount()); in testResponseCaching() 292 assertEquals(2, cache.getRequestCount()); in testResponseCaching() [all …]
|
/libcore/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/ |
D | FileClientSessionCache.java | 321 FileClientSessionCache.Impl cache = caches.get(directory); in usingDirectory() local 322 if (cache == null) { in usingDirectory() 323 cache = new FileClientSessionCache.Impl(directory); in usingDirectory() 324 caches.put(directory, cache); in usingDirectory() 326 return cache; in usingDirectory()
|
/libcore/luni/src/main/java/libcore/io/ |
D | DiskLruCache.java | 207 DiskLruCache cache = new DiskLruCache(directory, appVersion, valueCount, maxSize); in open() local 208 if (cache.journalFile.exists()) { in open() 210 cache.readJournal(); in open() 211 cache.processJournal(); in open() 212 cache.journalWriter = new BufferedWriter(new FileWriter(cache.journalFile, true)); in open() 213 return cache; in open() 217 cache.delete(); in open() 223 cache = new DiskLruCache(directory, appVersion, valueCount, maxSize); in open() 224 cache.rebuildJournal(); in open() 225 return cache; in open()
|
/libcore/luni/src/main/java/libcore/net/http/ |
D | HttpResponseCache.java | 69 private final DiskLruCache cache; field in HttpResponseCache 79 cache = DiskLruCache.open(directory, VERSION, ENTRY_COUNT, maxSize); in HttpResponseCache() 98 snapshot = cache.get(key); in get() 131 cache.remove(key); in put() 161 editor = cache.edit(key); in put() 222 return cache; in getCache()
|
/libcore/luni/src/main/java/org/apache/harmony/lang/annotation/ |
D | AnnotationFactory.java | 55 cache = new WeakHashMap<Class<? extends Annotation>, AnnotationMember[]>(); field in AnnotationFactory 62 AnnotationMember[] desc = cache.get(annotationType); in getElementsDescription() 82 cache.put(annotationType, desc); in getElementsDescription()
|
/libcore/luni/src/main/java/java/util/ |
D | ResourceBundle.java | 113 private static final WeakHashMap<Object, Hashtable<String, ResourceBundle>> cache field in ResourceBundle 221 cache.clear(); in getBundle() 554 synchronized (cache) { in getLoaderCache() 555 Hashtable<String, ResourceBundle> loaderCache = cache.get(cacheKey); in getLoaderCache() 558 cache.put(cacheKey, loaderCache); in getLoaderCache() 610 cache.remove(ClassLoader.getSystemClassLoader()); in clearCache() 617 cache.remove(loader); in clearCache()
|
/libcore/luni/src/main/java/java/lang/ |
D | String.java | 2003 int cache, int md2, char lastChar) { in indexOf() argument 2018 if ((cache & (1 << haystack[i])) == 0) { in indexOf() 2028 if ((cache & (1 << haystack[i])) == 0) { in indexOf()
|
/libcore/luni/src/test/java/libcore/java/net/ |
D | URLConnectionTest.java | 89 private HttpResponseCache cache; field in URLConnectionTest 107 if (cache != null) { in tearDown() 108 cache.getCache().delete(); in tearDown() 723 cache = new HttpResponseCache(cacheDir, Integer.MAX_VALUE); in initResponseCache() 724 ResponseCache.setDefault(cache); in initResponseCache()
|
/libcore/expectations/ |
D | brokentests.txt | 849 description: "We removed this: we don't cache canonical paths.",
|