Lines Matching refs:arrayCache
2 * ArrayCache
21 * The {@code ArrayCache} API provides a way to cache large array allocations
27 * <b>Important: The users of ArrayCache don't return the allocated arrays
55 * If no {@code ArrayCache} is specified when constructing a compressor or
56 * decompressor, the default {@code ArrayCache} implementation is used.
57 * See {@link #getDefaultCache()} and {@link #setDefaultCache(ArrayCache)}.
67 public class ArrayCache {
71 private static final ArrayCache dummyCache = new ArrayCache();
74 * Global default {@code ArrayCache} that is used when no other cache has
77 private static volatile ArrayCache defaultCache = dummyCache;
80 * Returns a statically-allocated {@code ArrayCache} instance.
83 public static ArrayCache getDummyCache() {
88 * Gets the default {@code ArrayCache} instance.
93 public static ArrayCache getDefaultCache() {
99 * Sets the default {@code ArrayCache} instance.
104 public static void setDefaultCache(ArrayCache arrayCache) {
105 if (arrayCache == null)
109 defaultCache = arrayCache;
113 * Creates a new {@code ArrayCache} that does no caching
117 public ArrayCache() {}