Class PruneRestingNotificationStatesHandler
java.lang.Object
com.broadleafcommerce.data.tracking.core.messaging.PruneRestingNotificationStatesHandler
A handler for scheduled jobs of type
PruneRestingNotificationStatesListener.PRUNE_RESTING_NOTIFICATION_STATES_JOBTYPE
that
prunes outdated resting notification states from all TrackableRepositories
.- Author:
- Samarth Dhruva (samarthd)
- See Also:
-
Constructor Summary
ConstructorDescriptionPruneRestingNotificationStatesHandler
(List<TrackableRepository<Trackable>> trackableRepositories, PruneRestingNotificationStatesConfigurationProperties configurationProperties) -
Method Summary
Modifier and TypeMethodDescriptionprotected List<StandaloneCleanupRepository>
protected List<TrackableRepository<Trackable>>
void
handle
(com.broadleafcommerce.common.messaging.domain.ScheduledJobRef pruneRestingNotificationStatesJob) Simply calls#pruneRestingNotificationStates(Duration)
on allStandaloneCleanupRepository
instances.void
setStandaloneRepositories
(List<StandaloneCleanupRepository> standaloneRepositories)
-
Constructor Details
-
PruneRestingNotificationStatesHandler
public PruneRestingNotificationStatesHandler(@NonNull List<TrackableRepository<Trackable>> trackableRepositories, @NonNull PruneRestingNotificationStatesConfigurationProperties configurationProperties)
-
-
Method Details
-
handle
public void handle(com.broadleafcommerce.common.messaging.domain.ScheduledJobRef pruneRestingNotificationStatesJob) Simply calls#pruneRestingNotificationStates(Duration)
on allStandaloneCleanupRepository
instances. However, if none exist, will use allTrackableRepositories
.- Parameters:
pruneRestingNotificationStatesJob
- the scheduled job event containing the details of thePruneRestingNotificationStatesListener.PRUNE_RESTING_NOTIFICATION_STATES_JOBTYPE
job
-
getTrackableRepositories
-
getConfigurationProperties
@NonNull protected PruneRestingNotificationStatesConfigurationProperties getConfigurationProperties() -
getStandaloneRepositories
-
setStandaloneRepositories
@Autowired(required=false) public void setStandaloneRepositories(List<StandaloneCleanupRepository> standaloneRepositories)
-