@ParametersAreNonnullByDefault public class DefaultBufferingAuditService extends AbstractAuditHandler implements BufferingAuditService
AuditServicethat provides buffering capabilities during Jira start-up. The implementation of this class allows to process audit events from the components that
AuditServiceimplementation depends on. It allows to avoid circular dependencies and to audit events very early in the Jira start-up cycle by buffering incoming events until it receives
ComponentManagerStartedEventnotification. After that notification is received, the accumulated queue of events will be flushed and all subsequent events will be audited directly. Please be aware that the timestamps of the events that were deferred will not match the actual time they occurred.
|Constructor and Description|
|Modifier and Type||Method and Description|
Will buffer event suppliers without calling them until
public DefaultBufferingAuditService(com.atlassian.event.api.EventPublisher eventPublisher)
@EventListener public void onComponentManagerStartedEvent(ComponentManagerStartedEvent ignore)
public void auditOrPutToQueue(java.util.function.Supplier<com.atlassian.audit.entity.AuditEvent> eventSupplier)
ComponentManagerStartedEventis received, signalling that Jira has finished its start-up. After that notification is received, it will always forward calls to
AuditServicedirectly. If the capacity of the queue is exceeded, the exception will be logged but not thrown.
Copyright © 2002-2021 Atlassian. All Rights Reserved.