Class CleanupCronJobStrategy
- java.lang.Object
-
- de.hybris.platform.jobs.maintenance.impl.CleanupCronJobStrategy
-
- All Implemented Interfaces:
MaintenanceCleanupStrategy<CronJobModel,CronJobModel>
public class CleanupCronJobStrategy extends java.lang.Object implements MaintenanceCleanupStrategy<CronJobModel,CronJobModel>
Implementation of theMaintenanceCleanupStrategyfor 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 Constructor Description CleanupCronJobStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FlexibleSearchQuerycreateFetchQuery(CronJobModel cjm)Implement and return aFlexibleSearchQueryobject here which searches for the items to be removed.voidprocess(java.util.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(java.util.Set<java.lang.String> excludedCronjobCodes)voidsetModelService(ModelService modelService)voidsetResult(java.util.Set<CronJobResult> result)voidsetStatus(java.util.Set<CronJobStatus> status)voidsetTypeService(TypeService typeService)
-
-
-
Method Detail
-
createFetchQuery
public FlexibleSearchQuery createFetchQuery(CronJobModel cjm)
Description copied from interface:MaintenanceCleanupStrategyImplement and return aFlexibleSearchQueryobject here which searches for the items to be removed.- Specified by:
createFetchQueryin interfaceMaintenanceCleanupStrategy<CronJobModel,CronJobModel>
-
process
public void process(java.util.List<CronJobModel> elements)
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
public void setExcludedCronJobCodes(java.util.Set<java.lang.String> excludedCronjobCodes)
-
setResult
public void setResult(java.util.Set<CronJobResult> result)
-
setStatus
public void setStatus(java.util.Set<CronJobStatus> status)
-
setModelService
public void setModelService(ModelService modelService)
-
setTypeService
public void setTypeService(TypeService typeService)
-
-