Class PromotionCacheInvalidationNotificationSender
java.lang.Object
com.broadleafcommerce.promotion.offer.service.messaging.cache.PromotionCacheInvalidationNotificationSender
- All Implemented Interfaces:
com.broadleafcommerce.data.tracking.core.cache.CacheInvalidationNotificationImmediateSender
,EventListener
,org.springframework.context.ApplicationListener<com.broadleafcommerce.data.tracking.core.service.MutationNotifyEvent>
,org.springframework.core.Ordered
public class PromotionCacheInvalidationNotificationSender
extends Object
implements org.springframework.context.ApplicationListener<com.broadleafcommerce.data.tracking.core.service.MutationNotifyEvent>, com.broadleafcommerce.data.tracking.core.cache.CacheInvalidationNotificationImmediateSender, org.springframework.core.Ordered
-
Field Summary
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
Constructor Summary
ConstructorDescriptionPromotionCacheInvalidationNotificationSender
(Supplier<com.broadleafcommerce.common.messaging.notification.NotificationManager> notificationManagerSupplier, com.broadleafcommerce.common.messaging.notification.MessageFactory<PromotionCacheInvalidationRemoteEvent> factory, PromotionCacheInvalidationMessagingProperties properties, com.broadleafcommerce.common.messaging.notification.ChannelSupplier producer, PromotionCacheInvalidationNotificationStateMapperMember mapper, PromotionCacheInvalidationHelper helper) -
Method Summary
Modifier and TypeMethodDescriptionint
getOrder()
void
handleCacheInvalidation
(com.broadleafcommerce.data.tracking.core.TrackableRepository<? extends com.broadleafcommerce.data.tracking.core.Trackable> repository, com.broadleafcommerce.data.tracking.core.Trackable entity, boolean forceSend, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) void
onApplicationEvent
(com.broadleafcommerce.data.tracking.core.service.MutationNotifyEvent event) void
sendCacheInvalidation
(com.broadleafcommerce.data.tracking.core.TrackableRepository<? extends com.broadleafcommerce.data.tracking.core.Trackable> repository, com.broadleafcommerce.data.tracking.core.Trackable entity) void
sendCacheRegionInvalidation
(Class<?> projectionType) protected boolean
validate
(com.broadleafcommerce.data.tracking.core.TrackableRepository<? extends com.broadleafcommerce.data.tracking.core.Trackable> repository, com.broadleafcommerce.data.tracking.core.Trackable entity, boolean forceSend)
-
Field Details
-
EVENT_ORDER
public static final int EVENT_ORDER- See Also:
-
-
Constructor Details
-
PromotionCacheInvalidationNotificationSender
public PromotionCacheInvalidationNotificationSender(Supplier<com.broadleafcommerce.common.messaging.notification.NotificationManager> notificationManagerSupplier, com.broadleafcommerce.common.messaging.notification.MessageFactory<PromotionCacheInvalidationRemoteEvent> factory, PromotionCacheInvalidationMessagingProperties properties, com.broadleafcommerce.common.messaging.notification.ChannelSupplier producer, PromotionCacheInvalidationNotificationStateMapperMember mapper, PromotionCacheInvalidationHelper helper)
-
-
Method Details
-
onApplicationEvent
public void onApplicationEvent(com.broadleafcommerce.data.tracking.core.service.MutationNotifyEvent event) - Specified by:
onApplicationEvent
in interfaceorg.springframework.context.ApplicationListener<com.broadleafcommerce.data.tracking.core.service.MutationNotifyEvent>
-
sendCacheInvalidation
public void sendCacheInvalidation(com.broadleafcommerce.data.tracking.core.TrackableRepository<? extends com.broadleafcommerce.data.tracking.core.Trackable> repository, com.broadleafcommerce.data.tracking.core.Trackable entity) - Specified by:
sendCacheInvalidation
in interfacecom.broadleafcommerce.data.tracking.core.cache.CacheInvalidationNotificationImmediateSender
-
sendCacheRegionInvalidation
- Specified by:
sendCacheRegionInvalidation
in interfacecom.broadleafcommerce.data.tracking.core.cache.CacheInvalidationNotificationImmediateSender
-
handleCacheInvalidation
public void handleCacheInvalidation(com.broadleafcommerce.data.tracking.core.TrackableRepository<? extends com.broadleafcommerce.data.tracking.core.Trackable> repository, com.broadleafcommerce.data.tracking.core.Trackable entity, boolean forceSend, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) -
validate
protected boolean validate(com.broadleafcommerce.data.tracking.core.TrackableRepository<? extends com.broadleafcommerce.data.tracking.core.Trackable> repository, com.broadleafcommerce.data.tracking.core.Trackable entity, boolean forceSend) -
getOrder
public int getOrder()- Specified by:
getOrder
in interfaceorg.springframework.core.Ordered
-