bundles/org.tukani.xz/src/org/tukaani/xz/BasicArrayCache.java
private static <T> void putArray(CacheMap<T> cache, T array, int size) {
        // Small arrays aren't cached.
        if (size < CACHEABLE_SIZE_MIN)
            return;

        CyclicStack<Reference<T>> stack;

        synchronized(cache) {
            // Get a stack that holds arrays of T[size]. If no such stack
            // exists, allocate a new one. If the cache already had STACKS_MAX
            // number of stacks, the least recently used stack is removed by
            // cache.put (it calls removeEldestEntry).
            stack = cache.get(size);
            if (stack == null) {
                stack = new CyclicStack<Reference<T>>();
                cache.put(size, stack);
            }
        }

        stack.push(new SoftReference<T>(array));
    }
private static <T> void putArray(CacheMap<T> cache, T array, int size) {
        // Small arrays aren't cached.
        if (size < CACHEABLE_SIZE_MIN)
            return;

        CyclicStack<Reference<T>> stack;

        synchronized(cache) {
            // Get a stack that holds arrays of T[size]. If no such stack
            // exists, allocate a new one. If the cache already had STACKS_MAX
            // number of stacks, the least recently used stack is removed by
            // cache.put (it calls removeEldestEntry).
            stack = cache.get(size);
            if (stack == null) {
                stack = new CyclicStack<Reference<T>>();
                cache.put(size, stack);
            }
        }

        stack.push(new SoftReference<T>(array));
    }
private static < T > void putArray ( CacheMap < T > cache , T array , int size ) { // Small arrays aren't cached. if ( size < CACHEABLE_SIZE_MIN ) return ; CyclicStack < Reference < T > > stack ; synchronized ( cache ) { // Get a stack that holds arrays of T[size]. If no such stack // exists, allocate a new one. If the cache already had STACKS_MAX // number of stacks, the least recently used stack is removed by // cache.put (it calls removeEldestEntry). stack = cache . get ( size ) ; if ( stack == null ) { stack = new CyclicStack < Reference < T > > ( ) ; cache . put ( size , stack ) ; } } stack . push ( new SoftReference < T > ( array ) ) ; }
Puts the {@code array} of {@code size} elements long into
the {@code cache}.
Puts the {