Package org.opencms.loader.imagecache
Class CmsImageCacheMaintenanceService
java.lang.Object
org.opencms.loader.imagecache.CmsImageCacheMaintenanceService
Capability-aware entry point for image cache maintenance clients.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a maintenance service. -
Method Summary
Modifier and TypeMethodDescriptioncreate(I_CmsImageCache cache) Creates a service for an image cache implementation.create(I_CmsImageCache cache, CmsImageCacheConfiguration configuration) Creates a service using the central image cache maintenance configuration.Creates a service for the image cache currently configured in the image loader.createForRfsRepository(String repositoryPath) Creates a service for the classic RFS image cache repository.execute(CmsImageCacheMaintenanceRequest request) Executes a maintenance request after checking backend capabilities.Returns the backend identifier.Returns the backend capabilities.Loads metadata for one cache entry.voidStreams all cache entries.
-
Constructor Details
-
CmsImageCacheMaintenanceService
Creates a maintenance service.- Parameters:
backend- the maintenance backend
-
-
Method Details
-
create
Creates a service for an image cache implementation.- Parameters:
cache- the image cache- Returns:
- the maintenance service
-
create
public static CmsImageCacheMaintenanceService create(I_CmsImageCache cache, CmsImageCacheConfiguration configuration) Creates a service using the central image cache maintenance configuration.- Parameters:
cache- the image cacheconfiguration- the image cache configuration- Returns:
- the maintenance service
-
createForConfiguredCache
Creates a service for the image cache currently configured in the image loader.- Returns:
- the maintenance service
- Throws:
Exception- if the configured cache can not be accessed
-
createForRfsRepository
public static CmsImageCacheMaintenanceService createForRfsRepository(String repositoryPath) throws Exception Creates a service for the classic RFS image cache repository.- Parameters:
repositoryPath- the repository path- Returns:
- the maintenance service
- Throws:
Exception- if the repository can not be initialized
-
execute
public CmsImageCacheMaintenanceResult execute(CmsImageCacheMaintenanceRequest request) throws Exception Executes a maintenance request after checking backend capabilities.- Parameters:
request- the request- Returns:
- the result
- Throws:
Exception- if execution fails
-
getBackendId
Returns the backend identifier. -
getCapabilities
Returns the backend capabilities. -
getEntry
Loads metadata for one cache entry.- 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
-
visitEntries
Streams all cache entries.- Parameters:
visitor- the visitor- Throws:
Exception- if listing fails
-