Interface AuditlogEventStore
- All Known Implementing Classes:
NoopAuditlogEventStore
public interface AuditlogEventStore
Store that temporarily persist the event stream as automation rules execute.
This can then be used to write the final audit log.
-
Method Summary
Modifier and TypeMethodDescriptioncollateAuditlog(TenantExecution execution) longdecrementAuditEventsToProcess(TenantExecution tenantExecution, long decrement) Decrements the number of audit events that are still needing to be persisted.longdecrementQueuedItems(TenantExecution tenantExecution, long decrement) Stores the number of items queued for execution for a particular rule execution.booleanhasRuleExecutionCompleted(TenantExecution tenantExecution) Checks the queueditem count and audit log events processed to see if we've reached zero yet and if we've received a RULE_EXECUTION_COMPLETED eventlongincrementAuditEventsToProcess(TenantExecution tenantExecution, long increment) Stores the number of audit events that need to be processed (persisted).longincrementQueuedItems(TenantExecution tenantExecution, long increment) Stores the number of items queued for execution for a particular rule execution.booleanmarkAsAborted(TenantExecution tenantExecution) Sets a rule execution as aborted.voidsave(TenantExecution tenantExecution, AutomationEventBusEvent event)
-
Method Details
-
incrementAuditEventsToProcess
Stores the number of audit events that need to be processed (persisted).- Parameters:
tenantExecution- The rule execution that's runningincrement- Value to increment by- Returns:
- Updated count of items
-
decrementAuditEventsToProcess
Decrements the number of audit events that are still needing to be persisted.- Parameters:
tenantExecution- The rule execution that's runningdecrement- Value to decrement by- Returns:
- Updated count of items
-
incrementQueuedItems
Stores the number of items queued for execution for a particular rule execution.- Parameters:
tenantExecution- The rule execution that's runningincrement- Value to increment by- Returns:
- Updated count of items
-
decrementQueuedItems
Stores the number of items queued for execution for a particular rule execution.- Parameters:
tenantExecution- The rule execution that's runningdecrement- Value to decrement by- Returns:
- Updated count of items
-
hasRuleExecutionCompleted
Checks the queueditem count and audit log events processed to see if we've reached zero yet and if we've received a RULE_EXECUTION_COMPLETED event- Parameters:
tenantExecution- The rule execution that's running- Returns:
- true if the rule has finished
-
markAsAborted
Sets a rule execution as aborted. Returns true if this was the first time we set this execution as aborted.- Parameters:
tenantExecution- the rule execution to mark as aborted.- Returns:
- true if this was the first time we called abort on this execution
-
save
-
collateAuditlog
-