@Internal @ThreadSafe public class TimingEventPublisher extends Object implements com.atlassian.event.api.EventPublisher
EventPublisher implementation that times how long it takes to publish an event,
and logs a warning if the time is above a threshold. Warnings are not started until the object receives an
ApplicationStartedEvent, to avoid warnings during the startup process
which are known to produce slow events.| Modifier and Type | Method and Description |
|---|---|
static TimingEventPublisher |
create(com.atlassian.event.api.EventPublisher delegate) |
void |
publish(Object event) |
void |
register(Object listener) |
void |
unregister(Object listener) |
void |
unregisterAll() |
public static TimingEventPublisher create(com.atlassian.event.api.EventPublisher delegate)
public void register(Object listener)
register in interface com.atlassian.event.api.EventListenerRegistrarpublic void unregister(Object listener)
unregister in interface com.atlassian.event.api.EventListenerRegistrarpublic void unregisterAll()
unregisterAll in interface com.atlassian.event.api.EventListenerRegistrarpublic void publish(Object event)
publish in interface com.atlassian.event.api.EventPublisherCopyright © 2003–2018 Atlassian. All rights reserved.