public class NotificationMessageDeliveryAutoRemovalServiceImpl extends ConcurrentJob<NotificationMessageDelivery> implements NotificationMessageDeliveryAutoRemovalService
executor, LOG, txManager
Constructor and Description |
---|
NotificationMessageDeliveryAutoRemovalServiceImpl(DataObjectService dataObjectService,
org.springframework.transaction.PlatformTransactionManager txManager,
ExecutorService executor,
NotificationMessageDeliveryService messageDeliveryService)
Constructs a NotificationMessageDeliveryDispatchServiceImpl instance.
|
Modifier and Type | Method and Description |
---|---|
protected Collection<String> |
autoRemove(NotificationMessageDeliverer messageDeliverer,
NotificationMessageDelivery messageDelivery)
Auto-removes a single message delivery
|
protected void |
markAutoRemoved(NotificationMessageDelivery messageDelivery)
Marks a MessageDelivery as having been auto-removed, and unlocks it
|
ProcessingResult |
processAutoRemovalOfDeliveredNotificationMessageDeliveries()
This implementation looks up all UNDELIVERED/DELIVERED message deliveries with an autoRemoveDateTime <= current date time and then iterates
over each to call the appropriate functions to do the "auto-removal" by "canceling" each associated notification
workflow document.
|
protected Collection<String> |
processWorkItems(Collection<NotificationMessageDelivery> messageDeliveries)
Template method that subclasses should override to process a given work item and mark it
as untaken afterwards
|
protected Collection<NotificationMessageDelivery> |
takeAvailableWorkItems()
Template method that subclasses should override to obtain a set of available work items
and mark them as taken
|
protected void |
unlockWorkItem(NotificationMessageDelivery delivery)
Template method that subclasses should override to unlock a given work item when procesing has failed.
|
createNewTransaction, groupWorkItems, run, unlockWorkItemAtomically
public NotificationMessageDeliveryAutoRemovalServiceImpl(DataObjectService dataObjectService, org.springframework.transaction.PlatformTransactionManager txManager, ExecutorService executor, NotificationMessageDeliveryService messageDeliveryService)
dataObjectService
- service persists data to datasourcetxManager
- executor
- messageDeliveryService
- protected Collection<NotificationMessageDelivery> takeAvailableWorkItems()
ConcurrentJob
takeAvailableWorkItems
in class ConcurrentJob<NotificationMessageDelivery>
ConcurrentJob.takeAvailableWorkItems()
protected Collection<String> processWorkItems(Collection<NotificationMessageDelivery> messageDeliveries)
ConcurrentJob
processWorkItems
in class ConcurrentJob<NotificationMessageDelivery>
messageDeliveries
- the work itemorg.kuali.rice.ken.service.impl.ConcurrentJob#processWorkItem(java.lang.Object)
protected Collection<String> autoRemove(NotificationMessageDeliverer messageDeliverer, NotificationMessageDelivery messageDelivery)
messageDeliverer
- the message deliverermessageDelivery
- the message delivery to auto-removeprotected void markAutoRemoved(NotificationMessageDelivery messageDelivery)
messageDelivery
- the messageDelivery instance to markprotected void unlockWorkItem(NotificationMessageDelivery delivery)
ConcurrentJob
unlockWorkItem
in class ConcurrentJob<NotificationMessageDelivery>
delivery
- the work item to unlockConcurrentJob.unlockWorkItem(java.lang.Object)
public ProcessingResult processAutoRemovalOfDeliveredNotificationMessageDeliveries()
processAutoRemovalOfDeliveredNotificationMessageDeliveries
in interface NotificationMessageDeliveryAutoRemovalService
org.kuali.rice.ken.service.NotificationMessageDeliveryDispatchService#processAutoRemovalOfDeliveredNotificationMessageDeliveries()
Copyright © 2005–2016 The Kuali Foundation. All rights reserved.