Class ContentCacheInvalidationNotificationSender
java.lang.Object
com.broadleafcommerce.content.service.messaging.cache.ContentCacheInvalidationNotificationSender
- 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 ContentCacheInvalidationNotificationSender
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
This service is responsible for sending the cache invalidation notification to the
 
ContentCacheInvalidationProducer.contentCacheInvalidationOutput() channel if the entity
 is modified.- Author:
 - Dima Myroniuk (dmyroniuk)
 - See Also:
 - 
MutationNotifyEvent
 
- 
Field Summary
FieldsFields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE - 
Constructor Summary
ConstructorsConstructorDescriptionContentCacheInvalidationNotificationSender(Supplier<com.broadleafcommerce.common.messaging.notification.NotificationManager> notificationManagerSupplier, com.broadleafcommerce.common.messaging.notification.MessageFactory<ContentCacheInvalidationRemoteEvent> factory, ContentCacheInvalidationMessagingProperties properties, com.broadleafcommerce.common.messaging.notification.ChannelSupplier producer, ContentCacheInvalidationNotificationStateMapperMember mapper, ContentCacheInvalidationHelper helper)  - 
Method Summary
Modifier and TypeMethodDescriptionprotected com.broadleafcommerce.common.messaging.notification.MessageFactory<ContentCacheInvalidationRemoteEvent>protected ContentCacheInvalidationHelperprotected com.broadleafcommerce.common.messaging.notification.NotificationManagerprotected Supplier<com.broadleafcommerce.common.messaging.notification.NotificationManager>intgetOrder()protected com.broadleafcommerce.common.messaging.notification.ChannelSuppliervoidhandleCacheInvalidation(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) voidonApplicationEvent(com.broadleafcommerce.data.tracking.core.service.MutationNotifyEvent event) voidsendCacheInvalidation(com.broadleafcommerce.data.tracking.core.TrackableRepository<? extends com.broadleafcommerce.data.tracking.core.Trackable> repository, com.broadleafcommerce.data.tracking.core.Trackable entity) voidsendCacheRegionInvalidation(Class<?> projectionType) protected booleanvalidate(com.broadleafcommerce.data.tracking.core.TrackableRepository<? extends com.broadleafcommerce.data.tracking.core.Trackable> repository, com.broadleafcommerce.data.tracking.core.Trackable entity, boolean forceSend) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.context.ApplicationListener
supportsAsyncExecution 
- 
Field Details
- 
EVENT_ORDER
public static final int EVENT_ORDER- See Also:
 
 
 - 
 - 
Constructor Details
- 
ContentCacheInvalidationNotificationSender
public ContentCacheInvalidationNotificationSender(Supplier<com.broadleafcommerce.common.messaging.notification.NotificationManager> notificationManagerSupplier, com.broadleafcommerce.common.messaging.notification.MessageFactory<ContentCacheInvalidationRemoteEvent> factory, ContentCacheInvalidationMessagingProperties properties, com.broadleafcommerce.common.messaging.notification.ChannelSupplier producer, ContentCacheInvalidationNotificationStateMapperMember mapper, ContentCacheInvalidationHelper helper)  
 - 
 - 
Method Details
- 
onApplicationEvent
public void onApplicationEvent(com.broadleafcommerce.data.tracking.core.service.MutationNotifyEvent event) - Specified by:
 onApplicationEventin 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:
 sendCacheInvalidationin interfacecom.broadleafcommerce.data.tracking.core.cache.CacheInvalidationNotificationImmediateSender
 - 
sendCacheRegionInvalidation
- Specified by:
 sendCacheRegionInvalidationin 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:
 getOrderin interfaceorg.springframework.core.Ordered
 - 
getNotificationManagerSupplier
protected Supplier<com.broadleafcommerce.common.messaging.notification.NotificationManager> getNotificationManagerSupplier() - 
getFactory
protected com.broadleafcommerce.common.messaging.notification.MessageFactory<ContentCacheInvalidationRemoteEvent> getFactory() - 
getProperties
 - 
getProducer
protected com.broadleafcommerce.common.messaging.notification.ChannelSupplier getProducer() - 
getMapper
 - 
getHelper
 - 
getNotificationManager
protected com.broadleafcommerce.common.messaging.notification.NotificationManager getNotificationManager() 
 -