Class CleanupCronJobStrategy
java.lang.Object
de.hybris.platform.jobs.maintenance.impl.CleanupCronJobStrategy
- All Implemented Interfaces:
MaintenanceCleanupStrategy<CronJobModel,CronJobModel>
public class CleanupCronJobStrategy
extends Object
implements MaintenanceCleanupStrategy<CronJobModel,CronJobModel>
Implementation of the
MaintenanceCleanupStrategy for cleaning up old CronJobModels. This impl searches for
CronJobModels of a certain age, status and result (default: 14 days old, successfull and finish).-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionImplement and return aFlexibleSearchQueryobject here which searches for the items to be removed.voidprocess(List<CronJobModel> elements) Based on the givenFlexibleSearchQueryofMaintenanceCleanupStrategy.createFetchQuery(CronJobModel)the job pages through the results and with each sublist (contains the concrete instances of the items) of the large result this method is called.voidsetExcludedCronJobCodes(Set<String> excludedCronjobCodes) voidsetModelService(ModelService modelService) voidsetResult(Set<CronJobResult> result) voidsetStatus(Set<CronJobStatus> status) voidsetTypeService(TypeService typeService)
-
Constructor Details
-
CleanupCronJobStrategy
public CleanupCronJobStrategy()
-
-
Method Details
-
createFetchQuery
Description copied from interface:MaintenanceCleanupStrategyImplement and return aFlexibleSearchQueryobject here which searches for the items to be removed.- Specified by:
createFetchQueryin interfaceMaintenanceCleanupStrategy<CronJobModel,CronJobModel>
-
process
Description copied from interface:MaintenanceCleanupStrategyBased on the givenFlexibleSearchQueryofMaintenanceCleanupStrategy.createFetchQuery(CronJobModel)the job pages through the results and with each sublist (contains the concrete instances of the items) of the large result this method is called. Implement here the remove logic for each item element.- Specified by:
processin interfaceMaintenanceCleanupStrategy<CronJobModel,CronJobModel>
-
setExcludedCronJobCodes
-
setResult
-
setStatus
-
setModelService
-
setTypeService
-