Class TimingEventPublisher

java.lang.Object
com.atlassian.confluence.event.TimingEventPublisher
All Implemented Interfaces:
com.atlassian.event.api.EventListenerRegistrar, com.atlassian.event.api.EventPublisher

@ThreadSafe @Internal public class TimingEventPublisher extends Object implements com.atlassian.event.api.EventPublisher
An 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.
Since:
5.5.5
  • Field Details

  • Method Details

    • create

      public static TimingEventPublisher create(com.atlassian.event.api.EventPublisher delegate)
    • register

      public void register(Object listener)
      Specified by:
      register in interface com.atlassian.event.api.EventListenerRegistrar
    • unregister

      public void unregister(Object listener)
      Specified by:
      unregister in interface com.atlassian.event.api.EventListenerRegistrar
    • unregisterAll

      public void unregisterAll()
      Specified by:
      unregisterAll in interface com.atlassian.event.api.EventListenerRegistrar
    • publish

      public void publish(Object event)
      Specified by:
      publish in interface com.atlassian.event.api.EventPublisher