public class CleanupCronJobStrategy extends java.lang.Object implements MaintenanceCleanupStrategy<CronJobModel,CronJobModel>
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 and Description |
|---|
CleanupCronJobStrategy() |
| Modifier and Type | Method and Description |
|---|---|
FlexibleSearchQuery |
createFetchQuery(CronJobModel cjm)
Implement and return a
FlexibleSearchQuery object here which searches for the items to be removed. |
void |
process(java.util.List<CronJobModel> elements)
Based on the given
FlexibleSearchQuery of MaintenanceCleanupStrategy.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. |
void |
setExcludedCronJobCodes(java.util.Set<java.lang.String> excludedCronjobCodes) |
void |
setModelService(ModelService modelService) |
void |
setResult(java.util.Set<CronJobResult> result) |
void |
setStatus(java.util.Set<CronJobStatus> status) |
void |
setTypeService(TypeService typeService) |
public FlexibleSearchQuery createFetchQuery(CronJobModel cjm)
MaintenanceCleanupStrategyFlexibleSearchQuery object here which searches for the items to be removed.createFetchQuery in interface MaintenanceCleanupStrategy<CronJobModel,CronJobModel>public void process(java.util.List<CronJobModel> elements)
MaintenanceCleanupStrategyFlexibleSearchQuery of MaintenanceCleanupStrategy.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.process in interface MaintenanceCleanupStrategy<CronJobModel,CronJobModel>public void setExcludedCronJobCodes(java.util.Set<java.lang.String> excludedCronjobCodes)
public void setResult(java.util.Set<CronJobResult> result)
public void setStatus(java.util.Set<CronJobStatus> status)
public void setModelService(ModelService modelService)
public void setTypeService(TypeService typeService)
Copyright © 2018 SAP SE. All Rights Reserved.