@Service(value="blSystemEventSender") public class DatabaseSystemEventSender extends Object implements SystemEventSender
SystemEventSender
Modifier and Type | Field and Description |
---|---|
protected DatabaseSystemEventDao |
databaseSystemEventDao |
protected IncognitoEnvironmentDetector |
detector |
protected List<String> |
incognitoUnboundedEventTypes |
protected long |
nodePurgeThresholdSeconds |
protected org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor |
taskExecutor |
protected org.springframework.transaction.PlatformTransactionManager |
transactionManager |
protected org.broadleafcommerce.common.util.StreamingTransactionCapableUtil |
transUtil |
Constructor and Description |
---|
DatabaseSystemEventSender() |
Modifier and Type | Method and Description |
---|---|
protected void |
addIncognitoCrossPollination(List<SystemEvent> clusterEvents,
SystemEvent event,
Set<String> activeNodes) |
void |
finalizeEvents(Long processMarker)
Mass activate events based on the process marker.
|
protected Set<String> |
findActiveNodes() |
void |
init() |
void |
sendEvents(List<SystemEvent> events)
Send the events to the backing system.
|
protected void |
sendEvents(List<SystemEvent> events,
boolean guaranteed) |
void |
unsafeSendEvents(List<SystemEvent> events)
Send the events to the backing system.
|
@Value(value="${node.purge.threshold.seconds:60}") protected long nodePurgeThresholdSeconds
protected DatabaseSystemEventDao databaseSystemEventDao
protected org.springframework.transaction.PlatformTransactionManager transactionManager
protected org.broadleafcommerce.common.util.StreamingTransactionCapableUtil transUtil
protected org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor taskExecutor
protected IncognitoEnvironmentDetector detector
@PostConstruct public void init()
public void sendEvents(List<SystemEvent> events)
SystemEventSender
sendEvents
in interface SystemEventSender
public void unsafeSendEvents(List<SystemEvent> events)
SystemEventSender
SystemEventSender.sendEvents(List)
in that the actual sending is performed on
a separate thread. This is faster for the calling thread and avoids some event
preparation overhead, but the caller will not know if the sending of the event
was successful. Therefore, it is recommended to use this method for non-critical events.unsafeSendEvents
in interface SystemEventSender
public void finalizeEvents(Long processMarker)
SystemEventSender
finalizeEvents
in interface SystemEventSender
SystemEvent.getProcessMarker()
protected void sendEvents(List<SystemEvent> events, boolean guaranteed)
protected void addIncognitoCrossPollination(List<SystemEvent> clusterEvents, SystemEvent event, Set<String> activeNodes)
Copyright © 2017. All rights reserved.