Package org.opencms.loader.imagecache
Class CmsS3ImageCacheMaintenance
java.lang.Object
org.opencms.loader.imagecache.CmsS3ImageCacheMaintenance
- All Implemented Interfaces:
I_CmsImageCacheMaintenance
Maintenance adapter for the S3 image cache.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a maintenance adapter.CmsS3ImageCacheMaintenance(CmsS3ImageCache cache, int deleteBatchSize, int deleteConcurrency) Creates a maintenance adapter.CmsS3ImageCacheMaintenance(CmsS3ImageCache cache, int deleteBatchSize, int deleteConcurrency, int copyConcurrency, int maxCopiesPerSecond, int renewalQueueCapacity) Creates a maintenance adapter. -
Method Summary
Modifier and TypeMethodDescriptionexecute(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.voidStreams all image cache entries to a visitor.
-
Constructor Details
-
CmsS3ImageCacheMaintenance
Creates a maintenance adapter.- Parameters:
cache- the S3 cache
-
CmsS3ImageCacheMaintenance
public CmsS3ImageCacheMaintenance(CmsS3ImageCache cache, int deleteBatchSize, int deleteConcurrency) Creates a maintenance adapter.- Parameters:
cache- the S3 cachedeleteBatchSize- the maximum number of keys per delete requestdeleteConcurrency- the number of concurrent delete requests
-
CmsS3ImageCacheMaintenance
public CmsS3ImageCacheMaintenance(CmsS3ImageCache cache, int deleteBatchSize, int deleteConcurrency, int copyConcurrency, int maxCopiesPerSecond, int renewalQueueCapacity) Creates a maintenance adapter.- Parameters:
cache- the S3 cachedeleteBatchSize- the maximum number of keys per delete requestdeleteConcurrency- the number of concurrent delete requestscopyConcurrency- the number of concurrent copy requestsmaxCopiesPerSecond- the maximum number of copy requests started per secondrenewalQueueCapacity- the maximum number of waiting renewal tasks
-
-
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:
-