Interface MaintenanceCleanupStrategy<T extends ItemModel,C extends CronJobModel>

All Known Implementing Classes:
CleanupCronJobStrategy, CleanupDroolsRulesStrategy, CleanupDynamicProcessDefinitionsStrategy, CleanupExpiredRulesStrategy, CleanUpLogsStrategy, CleanUpOAuthAccessTokenStrategy, CleanUpOAuthAuthorizationCodeStrategy, CleanUpOAuthRefreshTokenStrategy, CleanupSavedValuesStrategy, CxPersonalizationProcessCleanupStrategy, CxResultsCleanupStrategy, DefaultKieModuleCleanupStrategy, MediaMigrationStrategy

public interface MaintenanceCleanupStrategy<T extends ItemModel,C extends CronJobModel>
This is the strategy interface for the 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))
  • Method Details

    • createFetchQuery

      FlexibleSearchQuery createFetchQuery(C cjm)
      Implement and return a FlexibleSearchQuery object here which searches for the items to be removed.
    • process

      void process(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. Implement here the remove logic for each item element.