com.atlassian.crowd.manager.directory
Class DirectorySynchroniserImpl

java.lang.Object
  extended by com.atlassian.crowd.manager.directory.DirectorySynchroniserImpl
All Implemented Interfaces:
DirectorySynchroniser

public class DirectorySynchroniserImpl
extends Object
implements DirectorySynchroniser

An implementation of a DirectorySynchroniser.


Constructor Summary
DirectorySynchroniserImpl(com.atlassian.beehive.ClusterLockService lockService, DirectorySynchroniserHelper directorySynchroniserHelper, SynchronisationStatusManager synchronisationStatusManager, com.atlassian.event.api.EventPublisher eventPublisher)
           
 
Method Summary
 boolean isSynchronising(long directoryId)
          Returns whether the directory is currently synchronising.
 void synchronise(SynchronisableDirectory remoteDirectory, SynchronisationMode mode)
          Synchronises a remote directory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DirectorySynchroniserImpl

public DirectorySynchroniserImpl(com.atlassian.beehive.ClusterLockService lockService,
                                 DirectorySynchroniserHelper directorySynchroniserHelper,
                                 SynchronisationStatusManager synchronisationStatusManager,
                                 com.atlassian.event.api.EventPublisher eventPublisher)
Method Detail

synchronise

@Transactional(propagation=NEVER)
public void synchronise(SynchronisableDirectory remoteDirectory,
                                      SynchronisationMode mode)
                 throws DirectoryNotFoundException,
                        OperationFailedException
Synchronises a remote directory. For performance reasons, this method must not run within a transaction. As a synchronisation may involve a huge amount of data, individual batches are run in their own transactions. Running overall synchronisation in a transaction would defeat this and is prevented.

Specified by:
synchronise in interface DirectorySynchroniser
Parameters:
remoteDirectory -
mode - synchronisation mode.
Throws:
DirectoryNotFoundException
OperationFailedException

isSynchronising

public boolean isSynchronising(long directoryId)
                        throws DirectoryNotFoundException
Description copied from interface: DirectorySynchroniser
Returns whether the directory is currently synchronising.

Specified by:
isSynchronising in interface DirectorySynchroniser
Parameters:
directoryId - ID of the directory
Returns:
true if the directory is current synchronising, otherwise false.
Throws:
DirectoryNotFoundException - if the directory could not be found


Copyright © 2016 Atlassian. All Rights Reserved.