Home
last modified time | relevance | path

Searched refs:cache (Results 1 – 25 of 46) sorted by relevance

12

/libcore/luni/src/test/java/libcore/libcore/util/
DBasicLruCacheTest.java30 BasicLruCache<String, String> cache = newCreatingCache(); in testCreateOnCacheMiss() local
31 String created = cache.get("aa"); in testCreateOnCacheMiss()
36 BasicLruCache<String, String> cache = newCreatingCache(); in testNoCreateOnCacheHit() local
37 cache.put("aa", "put-aa"); in testNoCreateOnCacheHit()
38 assertEquals("put-aa", cache.get("aa")); in testNoCreateOnCacheHit()
50 BasicLruCache<String, String> cache = new BasicLruCache<String, String>(3); in testCannotPutNullKey() local
52 cache.put(null, "A"); in testCannotPutNullKey()
59 BasicLruCache<String, String> cache = new BasicLruCache<String, String>(3); in testCannotPutNullValue() local
61 cache.put("a", null); in testCannotPutNullValue()
68 BasicLruCache<String, String> cache = new BasicLruCache<String, String>(1); in testEvictionWithSingletonCache() local
[all …]
/libcore/ojluni/src/main/java/java/lang/
DClassValue.java102 Entry<?>[] cache; in get() local
103 Entry<T> e = probeHomeLocation(cache = getCacheCarefully(type), this); in get()
116 return getFromBackup(cache, type); in get()
194 Entry<?>[] cache = map.getCache(); in getCacheCarefully()
195 return cache; in getCacheCarefully()
208 private T getFromBackup(Entry<?>[] cache, Class<?> type) { in getFromBackup() argument
209 Entry<T> e = probeBackupLocations(cache, this); in getFromBackup()
552 static Entry<?> loadFromCache(Entry<?>[] cache, int i) { in loadFromCache() argument
555 return cache[i & (cache.length-1)]; in loadFromCache()
560 static <T> Entry<T> probeHomeLocation(Entry<?>[] cache, ClassValue<T> classValue) { in probeHomeLocation() argument
[all …]
DShort.java241 static final Short[] cache; field in Short.ShortCache
258 cache = archivedCache;
283 return ShortCache.cache[sAsInt + offset]; in valueOf()
DByte.java117 static final Byte[] cache; field in Byte.ByteCache
134 cache = archivedCache;
154 return ByteCache.cache[(int)b + offset]; in valueOf()
/libcore/luni/src/main/java/java/net/
DAddressCache.java42 private final BasicLruCache<AddressCacheKey, AddressCacheEntry> cache field in AddressCache
100 cache.evictAll(); in clear()
109 AddressCacheEntry entry = cache.get(new AddressCacheKey(hostname, netId)); in get()
124 cache.put(new AddressCacheKey(hostname, netId), new AddressCacheEntry(addresses)); in put()
132 cache.put(new AddressCacheKey(hostname, netId), new AddressCacheEntry(detailMessage)); in putUnknownHost()
/libcore/ojluni/src/main/java/sun/util/calendar/
DJulianCalendar.java148 public long getFixedDate(int jyear, int month, int dayOfMonth, BaseCalendar.Date cache) { in getFixedDate() argument
152 if (cache != null && cache.hit(jyear)) { in getFixedDate()
154 return cache.getCachedJan1(); in getFixedDate()
156 return cache.getCachedJan1() + getDayOfYear(jyear, month, dayOfMonth) - 1; in getFixedDate()
178 if (cache != null && isJan1) { in getFixedDate()
179 cache.setCache(jyear, days, CalendarUtils.isJulianLeapYear(jyear) ? 366 : 365); in getFixedDate()
DBaseCalendar.java367 public long getFixedDate(int year, int month, int dayOfMonth, BaseCalendar.Date cache) { in getFixedDate() argument
371 if (cache != null && cache.hit(year)) { in getFixedDate()
373 return cache.getCachedJan1(); in getFixedDate()
375 return cache.getCachedJan1() + getDayOfYear(year, month, dayOfMonth) - 1; in getFixedDate()
382 if (cache != null) { in getFixedDate()
383 cache.setCache(year, jan1, isLeapYear(year) ? 366 : 365); in getFixedDate()
410 if (cache != null && isJan1) { in getFixedDate()
411 cache.setCache(year, days, isLeapYear(year) ? 366 : 365); in getFixedDate()
/libcore/support/src/test/java/tests/support/
DSupport_GetLocal.java35 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/ojluni/src/main/java/sun/nio/ch/
DUtil.java224 BufferCache cache = bufferCache.get(); in getTemporaryDirectBuffer() local
225 ByteBuffer buf = cache.get(size); in getTemporaryDirectBuffer()
232 if (!cache.isEmpty()) { in getTemporaryDirectBuffer()
233 buf = cache.removeFirst(); in getTemporaryDirectBuffer()
261 BufferCache cache = bufferCache.get(); in offerFirstTemporaryDirectBuffer() local
262 if (!cache.offerFirst(buf)) { in offerFirstTemporaryDirectBuffer()
283 BufferCache cache = bufferCache.get(); in offerLastTemporaryDirectBuffer() local
284 if (!cache.offerLast(buf)) { in offerLastTemporaryDirectBuffer()
/libcore/ojluni/src/main/java/sun/security/provider/
DX509Factory.java216 private static synchronized <K,V> V getFromCache(Cache<K,V> cache, in getFromCache() argument
219 return cache.get(key); in getFromCache()
225 private static synchronized <V> void addToCache(Cache<Object, V> cache, in addToCache() argument
231 cache.put(key, value); in addToCache()
/libcore/ojluni/src/main/java/java/util/
DSimpleTimeZone.java551 Cache cache = this.cache; in getOffsets() local
552 if (cache != null) { in getOffsets()
553 if (date >= cache.start && date < cache.end) { in getOffsets()
673 Cache cache = this.cache; in getOffset() local
674 if (cache != null) { in getOffset()
675 if (time >= cache.start && time < cache.end) { in getOffset()
678 if (year == cache.year) { in getOffset()
690 this.cache = new Cache(year, start, end); in getOffset()
708 this.cache = new Cache((long) startYear - 1, start, end); in getOffset()
1201 private transient volatile Cache cache; field in SimpleTimeZone
[all …]
DReverseOrderSortedSetView.java266 E cache = null; in iterator()
274 if (cache != null) in iterator()
288 cache = e; in iterator()
297 E e = cache; in iterator()
298 cache = null; in iterator()
/libcore/luni/src/test/java/libcore/sun/util/locale/
DBaseLocaleTest.java42 BaseLocale.Cache cache = (BaseLocale.Cache) globalCacheField.get(null); in testCache_holdingNoStrongReferences() local
46 (ConcurrentMap<BaseLocale.Key, BaseLocale>) mapField.get(cache); in testCache_holdingNoStrongReferences()
78 BaseLocale.Cache cache = new TestCache(); in testCacheCreateObject_notNull() local
83 BaseLocale b = cache.get(key); in testCacheCreateObject_notNull()
/libcore/ojluni/src/main/java/sun/misc/
DURLClassPath.java213 int[] cache = getLookupCache(name); in findResource() local
214 for (int i = 0; (loader = getNextLoader(cache, i)) != null; i++) { in findResource()
237 int[] cache = getLookupCache(name); in getResource() local
238 for (int i = 0; (loader = getNextLoader(cache, i)) != null; i++) { in getResource()
258 private int[] cache = getLookupCache(name); in findResources() local
266 while ((loader = getNextLoader(cache, index++)) != null) { in findResources()
306 private int[] cache = getLookupCache(name); in getResources() local
314 while ((loader = getNextLoader(cache, index++)) != null) { in getResources()
419 int[] cache = getLookupCacheForClassLoader(lookupCacheLoader, name);
420 if (cache != null && cache.length > 0) {
[all …]
/libcore/ojluni/src/main/java/sun/security/provider/certpath/
DCertStoreHelper.java63 private static Cache<String, CertStoreHelper> cache field in CertStoreHelper
69 CertStoreHelper helper = cache.get(type); in getInstance()
85 cache.put(type, csh); in getInstance()
DX509CertificatePair.java82 private static final Cache<Object, X509CertificatePair> cache field in X509CertificatePair
132 cache.clear(); in clearCache()
142 X509CertificatePair pair = cache.get(key); in generateCertificatePair()
148 cache.put(key, pair); in generateCertificatePair()
/libcore/ojluni/src/main/java/sun/nio/cs/
DThreadLocalCoders.java43 private ThreadLocal<Object[]> cache = new ThreadLocal<>(); field in ThreadLocalCoders.Cache
62 Object[] oa = cache.get(); in forName()
65 cache.set(oa); in forName()
/libcore/luni/src/main/java/libcore/reflect/
DAnnotationFactory.java51 private static final transient Map<Class<? extends Annotation>, AnnotationMember[]> cache = field in AnnotationFactory
59 synchronized (cache) { in getElementsDescription()
60 AnnotationMember[] desc = cache.get(annotationType); in getElementsDescription()
80 synchronized (cache) { in getElementsDescription()
81 cache.put(annotationType, desc); in getElementsDescription()
/libcore/ojluni/src/main/java/java/io/
DUnixFileSystem.java184 private ExpiringCache cache = new ExpiringCache(); field in UnixFileSystem
194 String res = cache.get(path); in canonicalize()
209 cache.put(dir + slash + filename, res); in canonicalize()
219 cache.put(path, res); in canonicalize()
378 cache.clear(); in delete()
415 cache.clear(); in rename()
/libcore/ojluni/annotations/hiddenapi/sun/security/provider/
DX509Factory.java49 sun.security.util.Cache<K, V> cache, byte[] encoding) { in getFromCache() argument
55 sun.security.util.Cache<java.lang.Object, V> cache, byte[] encoding, V value) { in addToCache() argument
/libcore/ojluni/src/main/java/java/time/zone/
DIcuZoneRulesProvider.java45 private final BasicLruCache<String, ZoneRules> cache = new ZoneRulesCache(8); field in IcuZoneRulesProvider
61 return cache.get(zoneId); in provideRules()
/libcore/ojluni/annotations/hiddenapi/sun/security/provider/certpath/
DX509CertificatePair.java102 cache; field in X509CertificatePair
105 cache = null;
/libcore/ojluni/src/main/native/
Dzip_util.c1079 cencache *cache = &zip->cencache; in sequentialAccessReadCENHeader() local
1081 if (cache->data != NULL in sequentialAccessReadCENHeader()
1082 && (cenpos >= cache->pos) in sequentialAccessReadCENHeader()
1083 && (cenpos + CENHDR <= cache->pos + CENCACHE_PAGESIZE)) in sequentialAccessReadCENHeader()
1085 cen = cache->data + cenpos - cache->pos; in sequentialAccessReadCENHeader()
1086 if (cenpos + CENSIZE(cen) <= cache->pos + CENCACHE_PAGESIZE) in sequentialAccessReadCENHeader()
1093 free(cache->data); in sequentialAccessReadCENHeader()
1094 cache->data = cen; in sequentialAccessReadCENHeader()
1095 cache->pos = cenpos; in sequentialAccessReadCENHeader()
1227 last = jz->cache; in ZIP_FreeEntry()
[all …]
/libcore/luni/src/test/java/libcore/highmemorytest/java/time/format/
DDateTimeFormatterTest.java122 var cache = (Map) cacheField.get(null); in clearCaches() local
123 cache.clear(); in clearCaches()
/libcore/ojluni/annotations/hiddenapi/java/lang/
DShort.java167 static final java.lang.Short[] cache; field in Short.ShortCache
170 cache = new java.lang.Short[0];

12