Searched defs:cache (Results 1 - 12 of 12) sorted by relevance

/libcore/luni/src/main/java/java/net/
H A DAddressCache.java22 * Implements caching for {@code InetAddress}. We use a unified cache for both positive and negative
23 * cache entries.
31 * When the cache contains more entries than this, we start dropping the oldest ones.
36 // The TTL for the Java-level cache is short, just 2s.
39 // The actual cache.
40 private final BasicLruCache<String, AddressCacheEntry> cache field in class:AddressCache
63 * Removes all entries from the cache.
66 cache.evictAll();
75 AddressCacheEntry entry = cache.get(hostname);
76 // Do we have a valid cache entr
[all...]
/libcore/luni/src/test/java/libcore/util/
H A DBasicLruCacheTest.java28 BasicLruCache<String, String> cache = newCreatingCache();
29 String created = cache.get("aa");
34 BasicLruCache<String, String> cache = newCreatingCache();
35 cache.put("aa", "put-aa");
36 assertEquals("put-aa", cache.get("aa"));
48 BasicLruCache<String, String> cache = new BasicLruCache<String, String>(3);
50 cache.put(null, "A");
57 BasicLruCache<String, String> cache = new BasicLruCache<String, String>(3);
59 cache.put("a", null);
66 BasicLruCache<String, String> cache
136 assertSnapshot(BasicLruCache<T, T> cache, T... keysAndValues) argument
[all...]
/libcore/support/src/test/java/tests/support/
H A DSupport_GetLocal.java35 static Hashtable<String, File> cache = new Hashtable<String, File>(20); field in class:Support_GetLocal
40 File temp = cache.get(url);
53 cache.put(url, temp);
60 File temp = cache.get(url);
73 cache.put(url, temp);
/libcore/luni/src/main/java/org/apache/harmony/lang/annotation/
H A DAnnotationFactory.java55 cache = new WeakHashMap<Class<? extends Annotation>, AnnotationMember[]>(); field in class:AnnotationFactory
62 AnnotationMember[] desc = cache.get(annotationType);
82 cache.put(annotationType, desc);
/libcore/luni/src/main/java/org/apache/harmony/security/provider/cert/
H A DCache.java36 * objects they are returned from the cache, if not - newly generated
37 * objects can be saved in the cache.<br>
45 * determine whether object to be generated is in the cache or not.
65 * If it is so - the cached object is returned from the cache,
66 * if not - new object should be generated and saved in the cache.<br>
92 // size of the cache
103 // to the object cached at cache[N]
110 private final Object[] cache; field in class:Cache
112 // This array is used to speed up the process of the search in the cache.
123 // cache populatio
[all...]
/libcore/luni/src/main/java/java/util/
H A DResourceBundle.java113 private static final WeakHashMap<Object, Hashtable<String, ResourceBundle>> cache field in class:ResourceBundle
221 cache.clear();
554 synchronized (cache) {
555 Hashtable<String, ResourceBundle> loaderCache = cache.get(cacheKey);
558 cache.put(cacheKey, loaderCache);
610 cache.remove(ClassLoader.getSystemClassLoader());
617 cache.remove(loader);
731 * a constant that indicates cache will not be used.
736 * a constant that indicates cache will not be expired.
/libcore/luni/src/main/java/libcore/net/http/
H A DHttpResponseCache.java63 // TODO: add APIs to iterate the cache?
69 private final DiskLruCache cache; field in class:HttpResponseCache
79 cache = DiskLruCache.open(directory, VERSION, ENTRY_COUNT, maxSize);
98 snapshot = cache.get(key);
104 // Give up because the cache cannot be read.
131 cache.remove(key);
133 // The cache cannot be written.
138 * Don't cache non-GET responses. We're technically allowed to cache
147 // Don't cache unles
[all...]
/libcore/luni/src/main/java/java/lang/
H A DString.java1997 * where the needle is a constant string, may compute the values cache, md2
2003 int cache, int md2, char lastChar) {
2018 if ((cache & (1 << haystack[i])) == 0) {
2028 if ((cache & (1 << haystack[i])) == 0) {
2002 indexOf(String haystackString, String needleString, int cache, int md2, char lastChar) argument
/libcore/luni/src/test/java/libcore/io/
H A DDiskLruCacheTest.java43 private DiskLruCache cache; field in class:DiskLruCacheTest
55 cache = DiskLruCache.open(cacheDir, appVersion, 2, Integer.MAX_VALUE);
61 cache.close();
66 cache.close();
71 DiskLruCache.Editor creator = cache.edit("k1");
80 DiskLruCache.Snapshot snapshot = cache.get("k1");
86 DiskLruCache.Editor creator = cache.edit("k1");
90 cache.close();
92 cache = DiskLruCache.open(cacheDir, appVersion, 2, Integer.MAX_VALUE);
93 DiskLruCache.Snapshot snapshot = cache
[all...]
/libcore/luni/src/test/java/libcore/java/net/
H A DURLConnectionTest.java89 private HttpResponseCache cache; field in class:URLConnectionTest
107 if (cache != null) {
108 cache.getCache().delete();
723 cache = new HttpResponseCache(cacheDir, Integer.MAX_VALUE);
724 ResponseCache.setDefault(cache);
1968 * Don't explode if the cache returns a null body. http://b/3373699
/libcore/luni/src/test/java/libcore/net/http/
H A DHttpResponseCacheTest.java70 private HttpResponseCache cache; field in class:HttpResponseCacheTest
79 cache = new HttpResponseCache(cacheDir, Integer.MAX_VALUE);
80 ResponseCache.setDefault(cache);
89 cache.getCache().delete();
112 assertCached(false, 206); // we don't cache partial responses
179 CacheResponse cached = cache.get(url.toURI(), "GET",
191 * Test that we can interrogate the response when the cache is being
270 // Make sure that calling skip() doesn't omit bytes from the cache.
278 assertEquals(1, cache.getWriteSuccessCount());
279 assertEquals(0, cache
[all...]
/libcore/support/src/test/java/tests/resources/
H A Djunit4-4.3.1.jarMETA-INF/ META-INF/MANIFEST.MF junit/ junit/extensions/ junit/framework/ junit/runner/ junit/textui/ org/ ...

Completed in 250 milliseconds