com.atlassian.confluence.event
Class TimingEventPublisher

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

@Internal
@ThreadSafe
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

Method Summary
static TimingEventPublisher create(com.atlassian.event.api.EventPublisher delegate)
           
 void publish(Object event)
           
 void register(Object listener)
           
 void unregister(Object listener)
           
 void unregisterAll()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

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


Copyright © 2003–2015 Atlassian. All rights reserved.