Interface IPollingService
- All Known Implementing Classes:
PollingService
public interface IPollingService
-
Method Summary
Modifier and TypeMethodDescriptionvoid
enqueue
(ComplianceRepositoryReply reply) Add the given compliance reply to the queue.boolean
hasQueuedEvents
(UUID sagaEventId) Check if a given saga event id has related queued events.boolean
queuedEventHasTimedOut
(QueuedEvent queuedEvent) Check if a queued event has timed out.void
resetQueuedEventTimeOut
(UUID sagaEventId, String repositoryId) Reset the timeout of a queued event.void
Run all pending queued events.void
runQueuedEvents
(UUID sagaEventId) Run all related queued events for a given saga event id.void
runQueuedEvents
(UUID sagaEventId, String repositoryId) Run all related queued events for a given saga event id and compliance repository id.
-
Method Details
-
enqueue
Add the given compliance reply to the queue.- Parameters:
reply
- the reply to be added to the queue
-
hasQueuedEvents
Check if a given saga event id has related queued events.- Parameters:
sagaEventId
- the id of the event- Returns:
- true if there are queued events related to the saga event id, false otherwise
-
runQueuedEvents
Run all related queued events for a given saga event id.- Parameters:
sagaEventId
- the id of the event- Throws:
PollingServiceException
-
runQueuedEvents
Run all related queued events for a given saga event id and compliance repository id.- Parameters:
sagaEventId
- the id of the eventrepositoryId
- the id of the compliance repository- Throws:
PollingServiceException
-
runAllQueuedEvents
Run all pending queued events.- Throws:
PollingServiceException
-
resetQueuedEventTimeOut
Reset the timeout of a queued event.- Parameters:
sagaEventId
- the ID of the eventrepositoryId
- the ID of the compliance repository
-
queuedEventHasTimedOut
Check if a queued event has timed out.- Parameters:
queuedEvent
- the queued event- Returns:
- true if the queued event has timed out, false otherwise
-