public interface MaintenanceCleanupStrategy<T extends ItemModel,C extends CronJobModel>
GenericMaintenanceJobPerformable. The implementation of this interface
consists of two parts. The search of the items (see createFetchQuery(CronJobModel)) and the removing of the
items (see process(List)). The GenericMaintenanceJobPerformable is responsible for the paging of the
large result list, this means if the search contains a large list of items the list in process(List)
contains only a small number of elements. (at the moment 100 elements, see
AbstractMaintenanceJobPerformable.setPageSize(int))| Modifier and Type | Method and Description |
|---|---|
FlexibleSearchQuery |
createFetchQuery(C cjm)
Implement and return a
FlexibleSearchQuery object here which searches for the items to be removed. |
void |
process(java.util.List<T> elements)
Based on the given
FlexibleSearchQuery of 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. |
FlexibleSearchQuery createFetchQuery(C cjm)
FlexibleSearchQuery object here which searches for the items to be removed.void process(java.util.List<T> elements)
FlexibleSearchQuery of 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.Copyright © 2018 SAP SE. All Rights Reserved.