Package com.iizix.gyro
Interface IRuntimeImageCacheImpl
- All Superinterfaces:
IRuntimeImageCache
The runtime image cache interface with code implementation, except the cache map instance.
- Author:
- Christopher Mindus
Method Summary
Modifier and TypeMethodDescriptiondefault void
Clears the entire cache.default RuntimeImageDefinition
Gets an image definition from the image container from the cache.Gets the image cache hash table.default boolean
removeImage
(String name) Removes an image with a name from the cache.default boolean
setImage
(RuntimeImageDefinition image) Adds the image definition to the image container for the cache.
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
Gets an image definition from the image container from the cache.- Specified by:
getImage
in interfaceIRuntimeImageCache
- Parameters:
name
- The image name.- Returns:
- The predefined image definition, or null if not found.
setImage
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 interfaceIRuntimeImageCache
- Parameters:
image
- The image definition.- Returns:
- true if the container was changed, i.e. image was added or replaced, false for no change.
removeImage
Removes an image with a name from the cache.- Specified by:
removeImage
in interfaceIRuntimeImageCache
- 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 interfaceIRuntimeImageCache