Class DirectorySynchroniserImpl
java.lang.Object
com.atlassian.crowd.manager.directory.DirectorySynchroniserImpl
- All Implemented Interfaces:
DirectorySynchroniser
An implementation of a
DirectorySynchroniser
.-
Constructor Summary
ConstructorDescriptionDirectorySynchroniserImpl
(com.atlassian.beehive.ClusterLockService lockService, TransactionalDirectoryDao directoryDao, InternalSynchronisationStatusManager synchronisationStatusManager, com.atlassian.event.api.EventPublisher eventPublisher, AuditLogContext auditLogContext, DirectorySynchronisationEventHelper syncEventHelper) -
Method Summary
Modifier and TypeMethodDescriptionvoid
handleEvent
(DirectoryUpdatedEvent event) boolean
isSynchronising
(long directoryId) Returns whether the directory is currently synchronising.void
synchronise
(SynchronisableDirectory remoteDirectory, SynchronisationMode mode) Synchronises a remote directory.
-
Constructor Details
-
DirectorySynchroniserImpl
public DirectorySynchroniserImpl(com.atlassian.beehive.ClusterLockService lockService, TransactionalDirectoryDao directoryDao, InternalSynchronisationStatusManager synchronisationStatusManager, com.atlassian.event.api.EventPublisher eventPublisher, AuditLogContext auditLogContext, DirectorySynchronisationEventHelper syncEventHelper)
-
-
Method Details
-
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 interfaceDirectorySynchroniser
- Parameters:
remoteDirectory
- directory to synchronise.mode
- synchronisation mode.- Throws:
DirectoryNotFoundException
OperationFailedException
-
isSynchronising
Description copied from interface:DirectorySynchroniser
Returns whether the directory is currently synchronising.- Specified by:
isSynchronising
in interfaceDirectorySynchroniser
- 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
-
handleEvent
-