|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.confluence.user.crowd.ConfluenceDirectoryEventListener
public final class ConfluenceDirectoryEventListener
Propagates DirectoryUpdatedEvent and DirectoryDeletedEvent to other nodes in a cluster
to trigger the relevant updates to caches and directory monitors on each node.
ClusterManager.publishEvent(ConfluenceEvent).
The same listener on the other nodes receives the cluster wrapper event, unwraps the original event and republishes it.
Republished events have a null source to distinguish them from original events occurring on the the local node.
| Nested Class Summary | |
|---|---|
static class |
ConfluenceDirectoryEventListener.ClusterDirectoryDeletedEvent
|
protected static class |
ConfluenceDirectoryEventListener.ClusterDirectoryEvent
Crowd's event classes are not Serializable, so we need to extract the event class and directory, then reconstruct the event on the other nodes. |
static class |
ConfluenceDirectoryEventListener.ClusterDirectoryUpdatedEvent
|
| Constructor Summary | |
|---|---|
ConfluenceDirectoryEventListener(ClusterManager clusterManager,
com.atlassian.event.api.EventPublisher eventPublisher)
|
|
| Method Summary | |
|---|---|
void |
handleEventOnThisNode(com.atlassian.crowd.event.directory.DirectoryDeletedEvent directoryDeletedEvent)
Handles directory modification events on the current node, republishing this to other nodes in the cluster once the current transaction is complete. |
void |
handleEventOnThisNode(com.atlassian.crowd.event.directory.DirectoryUpdatedEvent directoryUpdatedEvent)
Handles directory modification events on the current node, republishing this to other nodes in the cluster once the current transaction is complete. |
void |
onApplicationEvent(org.springframework.context.ApplicationEvent event)
Handles cluster events from other nodes. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ConfluenceDirectoryEventListener(ClusterManager clusterManager,
com.atlassian.event.api.EventPublisher eventPublisher)
| Method Detail |
|---|
@EventListener public void handleEventOnThisNode(com.atlassian.crowd.event.directory.DirectoryDeletedEvent directoryDeletedEvent)
@EventListener public void handleEventOnThisNode(com.atlassian.crowd.event.directory.DirectoryUpdatedEvent directoryUpdatedEvent)
public void onApplicationEvent(org.springframework.context.ApplicationEvent event)
ClusterManager.publishEvent(ConfluenceEvent) above actually ends up
invoking the legacy EventManager on all nodes to publish a Spring ApplicationEvent with the
relevant information.
onApplicationEvent in interface org.springframework.context.ApplicationListener
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||