com.atlassian.jira.user.util
Class DirectorySynchroniserBarrier

java.lang.Object
  extended by com.atlassian.jira.user.util.DirectorySynchroniserBarrier

@NotThreadSafe
public class DirectorySynchroniserBarrier
extends Object

Class that tries to wait for any "Crowd Embedded" synchronisations to finish. This class is *not* thread safe, only one thread may await on this class. NOTE: This is a complete hack. It does not work in all cases. It would be better if we could tell "Crowd Embedded" to shutdownAndWait be we can't currently so this is here to catch a majority of cases where this is a problem.

Since:
v5.0

Constructor Summary
DirectorySynchroniserBarrier(com.atlassian.crowd.embedded.api.ApplicationFactory applicationFactory, com.atlassian.crowd.embedded.api.CrowdDirectoryService crowdDirectoryService, com.atlassian.event.api.EventPublisher publisher)
           
 
Method Summary
 boolean await(long timeout, TimeUnit unit)
           
 void onDirectoryFinished(com.atlassian.crowd.event.directory.RemoteDirectorySynchronisedEvent finished)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DirectorySynchroniserBarrier

public DirectorySynchroniserBarrier(com.atlassian.crowd.embedded.api.ApplicationFactory applicationFactory,
                                    com.atlassian.crowd.embedded.api.CrowdDirectoryService crowdDirectoryService,
                                    com.atlassian.event.api.EventPublisher publisher)
Method Detail

await

public boolean await(long timeout,
                     TimeUnit unit)

onDirectoryFinished

@EventListener
public void onDirectoryFinished(com.atlassian.crowd.event.directory.RemoteDirectorySynchronisedEvent finished)


Copyright © 2002-2014 Atlassian. All Rights Reserved.