@Transactional public class InDatabaseDirectorySynchronisationInformationStore extends Object implements DirectorySynchronisationInformationStore
Constructor and Description |
---|
InDatabaseDirectorySynchronisationInformationStore(DirectorySynchronisationStatusDao statusDao,
DirectoryDao directoryDao,
ClusterService clusterService) |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clears directory synchronisation information of all directories.
|
void |
clear(long directoryId)
Clears directory synchronisation information for the given directory.
|
DirectorySynchronisationRoundInformation |
getActive(long directoryId)
Provides information about the status of the active synchronisation for the directory.
|
Optional<DirectorySynchronisationRoundInformation> |
getLast(long directoryId)
Provides information about the last completed (either succeeded or failed) synchronisation.
|
Collection<DirectorySynchronisationStatus> |
getStalledSynchronizations()
Attempts to find synchronizations that have been marked as in-progress, but don't seem to be running anymore.
|
void |
syncFailure(long directoryId,
SynchronisationMode syncMode,
String failureReason)
Updates active directory synchronisation status with a failure reason.
|
void |
syncFinished(long directoryId,
long timestamp,
SynchronisationStatusKey statusKey,
List<Serializable> parameters)
Finishes synchronisation status, marking it as last status information and clearing active synchronisation status.
|
void |
syncStarted(long directoryId,
long timestamp)
Starts the synchronisation, creating new directory synchronisation information.
|
void |
syncStatus(long directoryId,
String statusKey,
List<Serializable> parameters)
Updates active directory synchronisation status
|
void |
syncStatus(long directoryId,
SynchronisationStatusKey statusKey,
List<Serializable> parameters)
Updates active directory synchronisation status.
|
public InDatabaseDirectorySynchronisationInformationStore(DirectorySynchronisationStatusDao statusDao, DirectoryDao directoryDao, ClusterService clusterService)
public DirectorySynchronisationRoundInformation getActive(long directoryId)
DirectorySynchronisationInformationStore
getActive
in interface DirectorySynchronisationInformationStore
directoryId
- directory idpublic Optional<DirectorySynchronisationRoundInformation> getLast(long directoryId)
DirectorySynchronisationInformationStore
getLast
in interface DirectorySynchronisationInformationStore
directoryId
- directory idpublic void clear(long directoryId)
DirectorySynchronisationInformationStore
clear
in interface DirectorySynchronisationInformationStore
directoryId
- directory idpublic void clear()
DirectorySynchronisationInformationStore
clear
in interface DirectorySynchronisationInformationStore
public void syncStatus(long directoryId, String statusKey, List<Serializable> parameters)
DirectorySynchronisationInformationStore
syncStatus
in interface DirectorySynchronisationInformationStore
directoryId
- directory idstatusKey
- new status i18n keyparameters
- parameters for the statusKeypublic void syncStatus(long directoryId, SynchronisationStatusKey statusKey, List<Serializable> parameters)
DirectorySynchronisationInformationStore
syncStatus
in interface DirectorySynchronisationInformationStore
directoryId
- directory idstatusKey
- new status i18n keyparameters
- paramaters for the statusKeypublic void syncStarted(long directoryId, long timestamp)
DirectorySynchronisationInformationStore
syncStarted
in interface DirectorySynchronisationInformationStore
directoryId
- directory idtimestamp
- synchronisation startpublic void syncFailure(long directoryId, SynchronisationMode syncMode, String failureReason)
DirectorySynchronisationInformationStore
syncFailure
in interface DirectorySynchronisationInformationStore
directoryId
- directory idsyncMode
- synchronisation modefailureReason
- failure reasonpublic void syncFinished(long directoryId, long timestamp, SynchronisationStatusKey statusKey, List<Serializable> parameters)
DirectorySynchronisationInformationStore
syncFinished
in interface DirectorySynchronisationInformationStore
directoryId
- directory idtimestamp
- synchronisation endstatusKey
- ending status (should indicate failure or success)parameters
- parameters for the statusKeypublic Collection<DirectorySynchronisationStatus> getStalledSynchronizations()
DirectorySynchronisationInformationStore
getStalledSynchronizations
in interface DirectorySynchronisationInformationStore
Copyright © 2021 Atlassian. All rights reserved.