public class SynchronisationStatusManagerImpl extends Object implements InternalSynchronisationStatusManager
Constructor and Description |
---|
SynchronisationStatusManagerImpl(DirectorySynchronisationInformationStore store,
com.atlassian.event.api.EventPublisher eventPublisher,
DirectoryDao directoryDao,
Clock clock,
DirectorySynchronisationTokenStore directorySynchronisationTokenStore,
ClusterService clusterService) |
Modifier and Type | Method and Description |
---|---|
void |
clearSynchronisationTokenForDirectory(long directoryId)
Clears the synchronisation token for the given directory
|
DirectorySynchronisationInformation |
getDirectorySynchronisationInformation(Directory directory)
Returns directory synchronisation information.
|
DirectorySynchronisationInformation |
getDirectorySynchronisationInformation(long directoryId)
Returns directory synchronisation information.
|
String |
getLastSynchronisationTokenForDirectory(long directoryId)
Returns the last stored synchronisation token for the directory
|
Collection<DirectorySynchronisationStatus> |
getStalledSynchronizations() |
void |
handleEvent(XMLRestoreStartedEvent event) |
void |
removeStatusesForDirectory(long directoryId)
Removes statuses for the given directory
|
void |
storeSynchronisationTokenForDirectory(long directoryId,
String synchronisationToken)
Store a new synchronisation token for the given directory.
|
void |
syncFailure(long directoryId,
SynchronisationMode syncMode,
Throwable throwable)
Notify about a failure that occurs during synchronisation.
|
void |
syncFinished(long directoryId)
Notify that directory synchronisation has finished.
|
void |
syncFinished(long directoryId,
SynchronisationStatusKey statusKey,
List<Serializable> parameters)
Notify that directory synchronisation has finished.
|
void |
syncStarted(Directory directory)
Notify that directory synchronisation has started.
|
void |
syncStatus(long directoryId,
String key,
Serializable... parameters)
Notify that directory synchronisation status has changed.
|
void |
syncStatus(long directoryId,
SynchronisationStatusKey statusKey,
List<Serializable> parameters)
Notify that directory synchronisation status has changed.
|
public SynchronisationStatusManagerImpl(DirectorySynchronisationInformationStore store, com.atlassian.event.api.EventPublisher eventPublisher, DirectoryDao directoryDao, Clock clock, DirectorySynchronisationTokenStore directorySynchronisationTokenStore, ClusterService clusterService)
public void syncStarted(Directory directory)
SynchronisationStatusManager
syncStarted
in interface SynchronisationStatusManager
directory
- directorypublic void syncStatus(long directoryId, String key, Serializable... parameters)
SynchronisationStatusManager
syncStatus
in interface SynchronisationStatusManager
directoryId
- directory idkey
- synchronisation status message keyparameters
- synchronisation status message parameterspublic void syncStatus(long directoryId, SynchronisationStatusKey statusKey, List<Serializable> parameters)
SynchronisationStatusManager
syncStatus
in interface SynchronisationStatusManager
directoryId
- directory idstatusKey
- synchronisation status message keyparameters
- synchronisation status message parameterspublic void syncFinished(long directoryId)
SynchronisationStatusManager
syncFinished
in interface SynchronisationStatusManager
directoryId
- directory idpublic void syncFailure(long directoryId, SynchronisationMode syncMode, Throwable throwable)
SynchronisationStatusManager
syncFailure
in interface SynchronisationStatusManager
directoryId
- directory idsyncMode
- synchronisation modethrowable
- throwable that carries information about the failurepublic void syncFinished(long directoryId, SynchronisationStatusKey statusKey, List<Serializable> parameters)
SynchronisationStatusManager
syncFinished
in interface SynchronisationStatusManager
directoryId
- directory idstatusKey
- synchronisation statusparameters
- parameters for statusKeypublic DirectorySynchronisationInformation getDirectorySynchronisationInformation(Directory directory)
SynchronisationStatusManager
getDirectorySynchronisationInformation
in interface SynchronisationStatusManager
directory
- directory to retrieve information from@Transactional public DirectorySynchronisationInformation getDirectorySynchronisationInformation(long directoryId) throws DirectoryNotFoundException
SynchronisationStatusManager
getDirectorySynchronisationInformation
in interface SynchronisationStatusManager
directoryId
- directory id to retrieve information fromDirectoryNotFoundException
@Transactional public String getLastSynchronisationTokenForDirectory(long directoryId)
SynchronisationStatusManager
getLastSynchronisationTokenForDirectory
in interface SynchronisationStatusManager
directoryId
- the id of the directory@Transactional public void storeSynchronisationTokenForDirectory(long directoryId, String synchronisationToken)
SynchronisationStatusManager
storeSynchronisationTokenForDirectory
in interface SynchronisationStatusManager
directoryId
- the id of the directorysynchronisationToken
- the new token to storepublic void removeStatusesForDirectory(long directoryId)
SynchronisationStatusManager
removeStatusesForDirectory
in interface SynchronisationStatusManager
directoryId
- directory idpublic Collection<DirectorySynchronisationStatus> getStalledSynchronizations()
getStalledSynchronizations
in interface InternalSynchronisationStatusManager
@Transactional public void clearSynchronisationTokenForDirectory(long directoryId)
SynchronisationStatusManager
clearSynchronisationTokenForDirectory
in interface SynchronisationStatusManager
directoryId
- directory id@EventListener public void handleEvent(XMLRestoreStartedEvent event)
Copyright © 2021 Atlassian. All rights reserved.