Class Cache

java.lang.Object
loci.formats.cache.Cache
All Implemented Interfaces:
CacheReporter

public class Cache extends Object implements CacheReporter
Cache provides a means of managing subsets of large collections of image planes in memory. Each cache has a source, which provides image planes or other objects from somewhere (typically derived from an IFormatReader), and a strategy dictating which image planes should be loaded into the cache, in which order, and which planes should be dropped from the cache. The essence of the logic is the idea that the cache has a "current" position across the multidimensional image series's dimensional axes, with the strategy indicating which surrounding planes to load into the cache (i.e., planes within a certain range along each dimensional axis).
  • Field Details

    • strategy

      protected ICacheStrategy strategy
      Current cache strategy.
    • source

      protected ICacheSource source
      Current cache source.
    • currentPos

      protected int[] currentPos
      Current dimensional position.
    • cache

      protected Object[] cache
      Master array containing cached objects.
    • inCache

      protected boolean[] inCache
      Whether each position is currently supposed to be cached.
    • listeners

      protected Vector<CacheListener> listeners
      List of cache event listeners.
    • autoUpdate

      protected boolean autoUpdate
      Whether the cache should automatically update when a parameter changes.
  • Constructor Details

  • Method Details