Interface DirectorySynchronisationInformationStore
- All Known Implementing Classes:
DirectorySynchronisationInformationStoreImpl
,InDatabaseDirectorySynchronisationInformationStore
public interface DirectorySynchronisationInformationStore
Storage for directory synchronisation information.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Clears directory synchronisation information of all directories.void
clear
(long directoryId) Clears directory synchronisation information for the given directory.getActive
(long directoryId) Provides information about the status of the active synchronisation for the directory.getLast
(long directoryId) Provides information about the last completed (either succeeded or failed) synchronisation.Attempts to find synchronizations that have been marked as in-progress, but don't seem to be running anymore.default 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, SynchronisationStatusKey statusKey, List<Serializable> parameters) Updates active directory synchronisation status.void
syncStatus
(long directoryId, String statusKey, List<Serializable> parameters) Updates active directory synchronisation status
-
Method Details
-
getActive
Provides information about the status of the active synchronisation for the directory.- Parameters:
directoryId
- directory id- Returns:
- information about the active synchronisation if present
-
getLast
Provides information about the last completed (either succeeded or failed) synchronisation.- Parameters:
directoryId
- directory id- Returns:
- an optional either containing information about the last synchronisation if present
-
clear
void clear(long directoryId) Clears directory synchronisation information for the given directory.- Parameters:
directoryId
- directory id
-
clear
void clear()Clears directory synchronisation information of all directories. -
syncStatus
Updates active directory synchronisation status- Parameters:
directoryId
- directory idstatusKey
- new status i18n keyparameters
- parameters for the statusKey
-
syncStatus
void syncStatus(long directoryId, SynchronisationStatusKey statusKey, List<Serializable> parameters) Updates active directory synchronisation status.- Parameters:
directoryId
- directory idstatusKey
- new status i18n keyparameters
- paramaters for the statusKey
-
syncStarted
void syncStarted(long directoryId, long timestamp) Starts the synchronisation, creating new directory synchronisation information.- Parameters:
directoryId
- directory idtimestamp
- synchronisation start
-
syncFailure
Updates active directory synchronisation status with a failure reason.- Parameters:
directoryId
- directory idsyncMode
- synchronisation modefailureReason
- failure reason
-
syncFinished
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.- Parameters:
directoryId
- directory idtimestamp
- synchronisation endstatusKey
- ending status (should indicate failure or success)parameters
- parameters for the statusKey
-
getStalledSynchronizations
Collection<DirectorySynchronisationStatus> getStalledSynchronizations()Attempts to find synchronizations that have been marked as in-progress, but don't seem to be running anymore. The exact method of finding those depends on the implementation and configuration.- Returns:
- a list of synchronizations that are potentially stalled, or an empty list if stalled synchronisations can't be determined.
-