Documentation of 'visad.data.FlatFieldCache' Java class
FlatFieldCache
visad.data

Class FlatFieldCache



  • public class FlatFieldCache
    extends java.lang.Object
    Memory cache for FlatFields. Maintains a fixed number of cache arrays in memory. When a cache member is requested which is not currently available in the cache it is loaded directly into one of the cache arrays. This prevents the allocation or garbage collection of data arrays when they are created. This allows caching to happen close to the data, rather than the rendering and is intended to allow for large animation loops with as little an affect as possible on rendering. This can however lead to large latency at startup due to reading data sources and copying them to the cache arrays.

    Most of this class was modeled after the FileFlatField. This cache, however, is not a static cache, it is a instance cache. The affect of this is that if you create several large caches you can very quickly run out of memory.

    • Constructor Summary

      Constructors 
      Constructor and Description
      FlatFieldCache(int cacheSize)
      Create a cache with a fixed size and the default strategy.
      FlatFieldCache(int cacheSize, visad.data.FlatFieldCacheStrategy strategy)
      Initialize cache.
    • Constructor Detail

      • FlatFieldCache

        public FlatFieldCache(int cacheSize)
        Create a cache with a fixed size and the default strategy.
        Parameters:
        cacheSize -
      • FlatFieldCache

        public FlatFieldCache(int cacheSize,
                              visad.data.FlatFieldCacheStrategy strategy)
        Initialize cache.
        Parameters:
        cacheSize - Number of FlatFields to maintain in cache, >= 1.
        strategy - How cache allocation is performed.
    • Method Detail

      • flushCache

        public void flushCache(visad.data.FlatFieldCache.Entry entry,
                               FlatFieldCacheAccessor fileAccessor)
                        throws VisADException
        Not currently implemented.
        Parameters:
        entry -
        fileAccessor -
        Throws:
        java.lang.UnsupportedOperationException - All the time.
        VisADException
      • setDirty

        public void setDirty(AreaImageCacheAdapter owner,
                             boolean dirty)
        Don't do this.
        Parameters:
        owner - The owner of the cache entry to mark as dirty.
        dirty -
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getSize

        public int getSize()

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.