Class PruneRestingNotificationStatesHandler
- java.lang.Object
-
- com.broadleafcommerce.data.tracking.core.messaging.PruneRestingNotificationStatesHandler
-
public class PruneRestingNotificationStatesHandler extends Object
A handler for scheduled jobs of typePruneRestingNotificationStatesListener.PRUNE_RESTING_NOTIFICATION_STATES_JOBTYPE
that prunes outdated resting notification states from allTrackableRepositories
.- Author:
- Samarth Dhruva (samarthd)
- See Also:
PruneRestingNotificationStatesListener
-
-
Constructor Summary
Constructors Constructor Description PruneRestingNotificationStatesHandler(List<TrackableRepository<Trackable>> trackableRepositories, PruneRestingNotificationStatesConfigurationProperties configurationProperties)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected PruneRestingNotificationStatesConfigurationProperties
getConfigurationProperties()
protected List<TrackableRepository<Trackable>>
getTrackableRepositories()
void
handle(com.broadleafcommerce.common.messaging.domain.ScheduledJobRef pruneRestingNotificationStatesJob)
Simply callsTrackableRepository.pruneRestingNotificationStates(Duration)
on allTrackableRepositories
.
-
-
-
Constructor Detail
-
PruneRestingNotificationStatesHandler
public PruneRestingNotificationStatesHandler(@NonNull List<TrackableRepository<Trackable>> trackableRepositories, @NonNull PruneRestingNotificationStatesConfigurationProperties configurationProperties)
-
-
Method Detail
-
handle
public void handle(com.broadleafcommerce.common.messaging.domain.ScheduledJobRef pruneRestingNotificationStatesJob)
Simply callsTrackableRepository.pruneRestingNotificationStates(Duration)
on allTrackableRepositories
.- Parameters:
pruneRestingNotificationStatesJob
- the scheduled job event containing the details of thePruneRestingNotificationStatesListener.PRUNE_RESTING_NOTIFICATION_STATES_JOBTYPE
job
-
getTrackableRepositories
@NonNull protected List<TrackableRepository<Trackable>> getTrackableRepositories()
-
getConfigurationProperties
@NonNull protected PruneRestingNotificationStatesConfigurationProperties getConfigurationProperties()
-
-