Interface BufferedImageCache

  • public interface BufferedImageCache
    The BufferedImageCache interface defines a cache that is supposed to cache BufferedImages which are intended to be used more than once very quickly (e.g. Asset import). The impl. must make sure that the cache won't take too much memory from the overall jvm memory "pool" and that images won't life for ages in the cache.
    • Method Detail

      • getImage

        BufferedImageCache.Entry getImage​(Rendition rendition,
                                          AssetHandler handler)
        Returns the image for the given rendition. If the image is not in the cache, the asset handler is used to load the image.

        This method always returns a copy of the buffered image. Returns null if param rendition is null.

        rendition - of the image.
        handler - the asset handler that will load the image if not in cache.
        a cache entry which is already acquired. Consumers of the entry need to call BufferedImageCache.Entry.release() if they are done using the buffered image in order to free system resources.
        Throws: - if an error occurs