Package org.opencms.loader.imagecache
Class CmsRfsImageCacheMaintenance
java.lang.Object
org.opencms.loader.imagecache.CmsRfsImageCacheMaintenance
- All Implemented Interfaces:
I_CmsImageCacheMaintenance
- Direct Known Subclasses:
CmsFsImageCacheMaintenance
Maintenance adapter for the classic RFS image cache.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a maintenance adapter. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidafterDelete(String key) Called after an entry has been deleted.execute(CmsImageCacheMaintenanceRequest request) Executes a maintenance request.Returns the backend identifier used for diagnostics and metrics.Returns the backend capabilities.Loads metadata for a single image cache entry.protected PathReturns the normalized repository path.protected voidRemoves empty repository subdirectories.protected PathReturns the normalized cache path for a key.voidStreams all image cache entries to a visitor.
-
Constructor Details
-
CmsRfsImageCacheMaintenance
Creates a maintenance adapter.- Parameters:
cache- the RFS cache
-
-
Method Details
-
execute
public CmsImageCacheMaintenanceResult execute(CmsImageCacheMaintenanceRequest request) throws Exception Description copied from interface:I_CmsImageCacheMaintenanceExecutes a maintenance request.- Specified by:
executein interfaceI_CmsImageCacheMaintenance- Parameters:
request- the request- Returns:
- the maintenance result
- Throws:
Exception- if the request can not be completed- See Also:
-
getBackendId
Description copied from interface:I_CmsImageCacheMaintenanceReturns the backend identifier used for diagnostics and metrics.- Specified by:
getBackendIdin interfaceI_CmsImageCacheMaintenance- Returns:
- the backend identifier
- See Also:
-
getCapabilities
Description copied from interface:I_CmsImageCacheMaintenanceReturns the backend capabilities.- Specified by:
getCapabilitiesin interfaceI_CmsImageCacheMaintenance- Returns:
- the backend capabilities
- See Also:
-
getEntry
Description copied from interface:I_CmsImageCacheMaintenanceLoads metadata for a single image cache entry.- Specified by:
getEntryin interfaceI_CmsImageCacheMaintenance- Parameters:
key- the image cache key- Returns:
- the entry metadata, or
nullif the entry does not exist - Throws:
Exception- if the metadata can not be loaded- See Also:
-
visitEntries
Description copied from interface:I_CmsImageCacheMaintenanceStreams all image cache entries to a visitor.- Specified by:
visitEntriesin interfaceI_CmsImageCacheMaintenance- Parameters:
visitor- the entry visitor- Throws:
Exception- if listing fails- See Also:
-
afterDelete
Called after an entry has been deleted.- Parameters:
key- the deleted cache key- Throws:
Exception- if post-processing fails
-
getRepository
Returns the normalized repository path.- Returns:
- the repository path
-
removeEmptyDirectories
Removes empty repository subdirectories.- Throws:
Exception
-
toPath
Returns the normalized cache path for a key.
-