@Service(value="blSystemEventSender") public class DatabaseSystemEventSender extends Object implements SystemEventSender
SystemEventSender
Modifier and Type | Field and Description |
---|---|
protected DatabaseSystemEventDao |
databaseSystemEventDao |
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 |
---|---|
void |
finalizeEvents(Long processMarker)
Mass activate events based on the process marker.
|
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.
|
protected DatabaseSystemEventDao databaseSystemEventDao
protected org.springframework.transaction.PlatformTransactionManager transactionManager
protected org.broadleafcommerce.common.util.StreamingTransactionCapableUtil transUtil
protected org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor taskExecutor
@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)
Copyright © 2019. All rights reserved.