Interface IRuntimeImageCacheImpl

All Superinterfaces:
IRuntimeImageCache

public interface IRuntimeImageCacheImpl extends IRuntimeImageCache
The runtime image cache interface with code implementation, except the cache map instance.
Author:
Christopher Mindus
  • Method Details

    • getImageContainer

      Map<String,RuntimeImageDefinition> getImageContainer()
      Gets the image cache hash table. The instance is not synchronized.
      Returns:
      Always the same instance of a Map.
    • getImage

      default RuntimeImageDefinition getImage(String name)
      Gets an image definition from the image container from the cache.
      Specified by:
      getImage in interface IRuntimeImageCache
      Parameters:
      name - The image name.
      Returns:
      The predefined image definition, or null if not found.
    • setImage

      default boolean setImage(RuntimeImageDefinition image)
      Adds the image definition to the image container for the cache. If the image already exists, it is replaced with the new definition.
      Specified by:
      setImage in interface IRuntimeImageCache
      Parameters:
      image - The image definition.
      Returns:
      true if the container was changed, i.e. image was added or replaced, false for no change.
    • removeImage

      default boolean removeImage(String name)
      Removes an image with a name from the cache.
      Specified by:
      removeImage in interface IRuntimeImageCache
      Parameters:
      name - The image to remove.
      Returns:
      true for removed, false if not found.
    • clearImageCache

      default void clearImageCache()
      Clears the entire cache.
      Specified by:
      clearImageCache in interface IRuntimeImageCache