/libcore/luni/src/main/java/java/net/ |
AddressCache.java | 22 * 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<AddressCacheKey, AddressCacheEntry> cache field in class:AddressCache 91 * Removes all entries from the cache. 94 cache.evictAll(); 103 AddressCacheEntry entry = cache.get(new AddressCacheKey(hostname, netId)); 104 // Do we have a valid cache entry [all...] |
/libcore/luni/src/test/java/libcore/util/ |
BasicLruCacheTest.java | 28 BasicLruCache<String, String> cache = newCreatingCache(); local 29 String created = cache.get("aa"); 34 BasicLruCache<String, String> cache = newCreatingCache(); local 35 cache.put("aa", "put-aa"); 36 assertEquals("put-aa", cache.get("aa")); 48 BasicLruCache<String, String> cache = new BasicLruCache<String, String>(3); local 50 cache.put(null, "A"); 57 BasicLruCache<String, String> cache = new BasicLruCache<String, String>(3); local 59 cache.put("a", null); 66 BasicLruCache<String, String> cache = new BasicLruCache<String, String>(1) local 75 BasicLruCache<String, String> cache = new BasicLruCache<String, String>(3) { local 98 BasicLruCache<String, String> cache = new BasicLruCache<String, String>(3) { local 114 BasicLruCache<String, String> cache = new BasicLruCache<String, String>(10) { local [all...] |
/external/glide/library/src/main/java/com/bumptech/glide/load/engine/cache/ |
DiskCacheAdapter.java | 1 package com.bumptech.glide.load.engine.cache;
|
/external/guava/guava/src/com/google/common/cache/ |
LongAddable.java | 17 package com.google.common.cache;
|
/external/guava/guava-gwt/src-super/com/google/common/cache/super/com/google/common/cache/ |
LongAdder.java | 17 package com.google.common.cache;
|
/external/guava/guava-gwt/test-super/com/google/common/cache/super/com/google/common/cache/ |
TestingCacheLoaders.java | 15 package com.google.common.cache;
|
/external/guava/guava-tests/test/com/google/common/cache/ |
CacheEvictionTest.java | 15 package com.google.common.cache; 17 import static com.google.common.cache.TestingCacheLoaders.identityLoader; 18 import static com.google.common.cache.TestingRemovalListeners.countingRemovalListener; 19 import static com.google.common.cache.TestingWeighers.constantWeigher; 20 import static com.google.common.cache.TestingWeighers.intKeyWeigher; 24 import com.google.common.cache.CacheTesting.Receiver; 25 import com.google.common.cache.LocalCache.ReferenceEntry; 26 import com.google.common.cache.TestingCacheLoaders.IdentityLoader; 27 import com.google.common.cache.TestingRemovalListeners.CountingRemovalListener; 35 * Tests relating to cache eviction: what does and doesn't count toward maximumSize, what happen 46 LoadingCache<Object, Object> cache = CacheBuilder.newBuilder() local 56 LoadingCache<Object, Object> cache = CacheBuilder.newBuilder() local 66 LoadingCache<Integer, Integer> cache = CacheBuilder.newBuilder() local 81 LoadingCache<Integer, Integer> cache = CacheBuilder.newBuilder() local 98 LoadingCache<Integer, Integer> cache = CacheBuilder.newBuilder() local 117 LoadingCache<Integer, Integer> cache = CacheBuilder.newBuilder() local 137 LoadingCache<Object, Object> cache = CacheBuilder.newBuilder() local 151 final LoadingCache<Integer, Integer> cache = local 164 final LoadingCache<Integer, Integer> cache = CacheBuilder.newBuilder() local 181 LoadingCache<Integer, Integer> cache = CacheBuilder.newBuilder() local 213 LoadingCache<Integer, Integer> cache = CacheBuilder.newBuilder() local 256 LoadingCache<Integer, Integer> cache = CacheBuilder.newBuilder() local 279 LoadingCache<Integer, Integer> cache = CacheBuilder.newBuilder() local [all...] |
CacheReferencesTest.java | 15 package com.google.common.cache; 17 import static com.google.common.cache.LocalCache.Strength.STRONG; 22 import com.google.common.cache.LocalCache.Strength; 23 import com.google.common.cache.TestingRemovalListeners.CountingRemovalListener; 63 for (LoadingCache<Key, String> cache : caches()) { 64 // maintain strong refs so these won't be collected, regardless of cache's key/value strength 67 assertSame(value, cache.getUnchecked(key)); 68 assertTrue(cache.asMap().containsKey(key)); 69 assertTrue(cache.asMap().containsValue(value)); 70 assertEquals(1, cache.size()) [all...] |
TestingCacheLoaders.java | 15 package com.google.common.cache;
|
AbstractCacheTest.java | 17 package com.google.common.cache; 19 import com.google.common.cache.AbstractCache.SimpleStatsCounter; 20 import com.google.common.cache.AbstractCache.StatsCounter; 39 Cache<Object, Object> cache = new AbstractCache<Object, Object>() { local 46 assertNull(cache.getIfPresent(new Object())); 50 assertSame(newValue, cache.getIfPresent(new Object())); 54 Cache<Object, Object> cache = new AbstractCache<Object, Object>() { local 63 cache.getAllPresent(ImmutableList.of(new Object()))) 69 Cache<Object, Object> cache = new AbstractCache<Object, Object>() { local 83 Cache<Integer, Integer> cache = new AbstractCache<Integer, Integer>() { local [all...] |
/external/mp4parser/isoparser/src/main/java/com/googlecode/mp4parser/h264/ |
CharCache.java | 24 private char[] cache; field in class:CharCache 28 cache = new char[capacity]; 33 int available = cache.length - pos; 35 System.arraycopy(chars, 0, cache, pos, toWrite); 40 return new String(cache, 0, pos); 48 if (pos < cache.length - 1) { 49 cache[pos] = c;
|
/prebuilts/gdb/darwin-x86/lib/python2.7/ |
dircache.py | 1 """Read and cache directory listings. 4 using a cache to avoid reading the directory more often than necessary. 14 cache = {} variable 17 """Reset the cache completely.""" 18 global cache 19 cache = {} 22 """List directory contents, using cache.""" 24 cached_mtime, list = cache[path] 25 del cache[path] 32 cache[path] = mtime, lis [all...] |
linecache.py | 0 """Cache lines from files. 21 # The cache 23 cache = {} # The cache variable 27 """Clear the cache entirely.""" 29 global cache 30 cache = {} 34 """Get the lines for a file from the cache. 35 Update the cache if it doesn't contain an entry for this file already.""" 37 if filename in cache [all...] |
/prebuilts/gdb/linux-x86/lib/python2.7/ |
dircache.py | 1 """Read and cache directory listings. 4 using a cache to avoid reading the directory more often than necessary. 14 cache = {} variable 17 """Reset the cache completely.""" 18 global cache 19 cache = {} 22 """List directory contents, using cache.""" 24 cached_mtime, list = cache[path] 25 del cache[path] 32 cache[path] = mtime, lis [all...] |
linecache.py | 0 """Cache lines from files. 21 # The cache 23 cache = {} # The cache variable 27 """Clear the cache entirely.""" 29 global cache 30 cache = {} 34 """Get the lines for a file from the cache. 35 Update the cache if it doesn't contain an entry for this file already.""" 37 if filename in cache [all...] |
/prebuilts/python/darwin-x86/2.7.5/lib/python2.7/ |
dircache.py | 1 """Read and cache directory listings. 4 using a cache to avoid reading the directory more often than necessary. 14 cache = {} variable 17 """Reset the cache completely.""" 18 global cache 19 cache = {} 22 """List directory contents, using cache.""" 24 cached_mtime, list = cache[path] 25 del cache[path] 32 cache[path] = mtime, lis [all...] |
linecache.py | 0 """Cache lines from files. 21 # The cache 23 cache = {} # The cache variable 27 """Clear the cache entirely.""" 29 global cache 30 cache = {} 34 """Get the lines for a file from the cache. 35 Update the cache if it doesn't contain an entry for this file already.""" 37 if filename in cache [all...] |
/prebuilts/python/linux-x86/2.7.5/lib/python2.7/ |
dircache.py | 1 """Read and cache directory listings. 4 using a cache to avoid reading the directory more often than necessary. 14 cache = {} variable 17 """Reset the cache completely.""" 18 global cache 19 cache = {} 22 """List directory contents, using cache.""" 24 cached_mtime, list = cache[path] 25 del cache[path] 32 cache[path] = mtime, lis [all...] |
linecache.py | 0 """Cache lines from files. 21 # The cache 23 cache = {} # The cache variable 27 """Clear the cache entirely.""" 29 global cache 30 cache = {} 34 """Get the lines for a file from the cache. 35 Update the cache if it doesn't contain an entry for this file already.""" 37 if filename in cache [all...] |
/external/libphonenumber/libphonenumber/src/com/google/i18n/phonenumbers/ |
RegexCache.java | 24 * LRU Cache for compiled regular expressions used by the libphonenumbers libary. 29 private LRUCache<String, Pattern> cache; field in class:RegexCache 32 cache = new LRUCache<String, Pattern>(size); 36 Pattern pattern = cache.get(regex); 39 cache.put(regex, pattern); 46 return cache.containsKey(regex); 50 // LinkedHashMap offers a straightforward implementation of LRU cache.
|
/external/okhttp/samples/guide/src/main/java/com/squareup/okhttp/recipes/ |
RewriteResponseCacheControl.java | 18 import com.squareup.okhttp.Cache; 27 /** Dangerous interceptor that rewrites the server's cache-control header. */ 32 .header("Cache-Control", "max-age=60") 40 Cache cache = new Cache(cacheDirectory, 1024 * 1024); local 41 cache.evictAll(); 44 client.setCache(cache); 56 // Force this request's response to be written to the cache. This way, subsequent responses 57 // can be read from the cache [all...] |
/external/libgdx/tests/gdx-tests/src/com/badlogic/gdx/tests/ |
IsometricTileTest.java | 63 SpriteCache cache = caches[i];
local 64 cache.beginCache();
72 cache.add(texture, tileX, tileY, rand.nextInt(2) * 54, 0, TILE_WIDTH, TILE_HEIGHT);
78 layers[i] = cache.endCache();
86 for (SpriteCache cache : caches)
87 cache.dispose();
99 SpriteCache cache = caches[i];
local 100 cache.setProjectionMatrix(cam.combined);
101 cache.begin();
102 cache.draw(layers[i]); [all...] |
BitmapFontTest.java | 178 // expert usage.. drawing with bitmap font cache 179 BitmapFontCache cache = multiPageFont.getCache(); local 180 cache.clear(); 181 cache.setColor(Color.BLACK); 182 cache.setText(txt2, 10, 50); 183 cache.setColors(Color.PINK, 3, 6); 184 cache.setColors(Color.ORANGE, 9, 12); 185 cache.setColors(Color.GREEN, 16, txt2.length()); 186 cache.draw(spriteBatch, 5, txt2.length() - 5); 188 cache.clear() [all...] |
/cts/tests/tests/net/src/android/net/http/cts/ |
HttpResponseCacheTest.java | 48 // Make the cache directory read / writable. 100 HttpResponseCache cache = HttpResponseCache.install(cacheDir, 10 * 1024 * 1024); local 101 initializeCache(cache); 103 cache.close(); 105 cache.flush(); 112 HttpResponseCache cache = HttpResponseCache.install(cacheDir, 10 * 1024 * 1024); local 113 cache.close(); 118 HttpResponseCache cache = HttpResponseCache.install(cacheDir, 10 * 1024 * 1024); local 119 cache.delete(); 128 HttpResponseCache cache = HttpResponseCache.install(cacheDir, 10 * 1024 * 1024) local [all...] |
/external/okhttp/okhttp-android-support/src/test/java/com/squareup/okhttp/android/ |
HttpResponseCacheTest.java | 112 HttpResponseCache cache = HttpResponseCache.install(cacheDir, 10 * 1024 * 1024); local 113 initializeCache(cache); 115 cache.close(); 117 cache.flush(); 124 HttpResponseCache cache = HttpResponseCache.install(cacheDir, 10 * 1024 * 1024); local 125 cache.close(); 130 HttpResponseCache cache = HttpResponseCache.install(cacheDir, 10 * 1024 * 1024); local 131 cache.delete(); 140 HttpResponseCache cache = HttpResponseCache.install(cacheDir, 10 * 1024 * 1024); local 143 .addHeader("Cache-Control: max-age=60" [all...] |