Interface SynchronisationStatusManager
- All Known Subinterfaces:
InternalSynchronisationStatusManager
- All Known Implementing Classes:
SynchronisationStatusManagerImpl
public interface SynchronisationStatusManager
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clearSynchronisationTokenForDirectory
(long directoryId) Clears the synchronisation token for the given directorygetDirectorySynchronisationInformation
(long directoryId) Returns directory synchronisation information.getDirectorySynchronisationInformation
(Directory directory) Deprecated.getLastSynchronisationTokenForDirectory
(long directoryId) Returns the last stored synchronisation token for the directoryvoid
removeStatusesForDirectory
(long directoryId) Removes statuses for the given directoryvoid
storeSynchronisationTokenForDirectory
(long directoryId, String synchronisationToken) Store a new synchronisation token for the given directory.default void
syncFailure
(long directoryId, SynchronisationMode mode, Throwable throwable) Notify about a failure that occurs during synchronisation.void
syncFinished
(long directoryId) Deprecated.since 2.12.0, useSynchronisationStatusManager#syncFinished(long, SynchronisationStatusKey, List, String)
insteadvoid
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, SynchronisationStatusKey statusKey, List<Serializable> parameters) Notify that directory synchronisation status has changed.void
syncStatus
(long directoryId, String key, Serializable... parameters) Deprecated.since 2.12.0, usesyncStatus(long, SynchronisationStatusKey, List)
instead
-
Method Details
-
syncStarted
Notify that directory synchronisation has started.- Parameters:
directory
- directory
-
syncStatus
Deprecated.since 2.12.0, usesyncStatus(long, SynchronisationStatusKey, List)
insteadNotify that directory synchronisation status has changed.- Parameters:
directoryId
- directory idkey
- synchronisation status message keyparameters
- synchronisation status message parameters- Throws:
IllegalStateException
- if the directory is not currently synchronising
-
syncStatus
void syncStatus(long directoryId, SynchronisationStatusKey statusKey, List<Serializable> parameters) Notify that directory synchronisation status has changed.- Parameters:
directoryId
- directory idstatusKey
- synchronisation status message keyparameters
- synchronisation status message parameters
-
syncFailure
Notify about a failure that occurs during synchronisation.- Parameters:
directoryId
- directory idmode
- synchronisation modethrowable
- throwable that carries information about the failure
-
syncFinished
Deprecated.since 2.12.0, useSynchronisationStatusManager#syncFinished(long, SynchronisationStatusKey, List, String)
insteadNotify that directory synchronisation has finished.- Parameters:
directoryId
- directory id
-
syncFinished
void syncFinished(long directoryId, SynchronisationStatusKey statusKey, List<Serializable> parameters) Notify that directory synchronisation has finished.- Parameters:
directoryId
- directory idstatusKey
- synchronisation statusparameters
- parameters for statusKey
-
removeStatusesForDirectory
void removeStatusesForDirectory(long directoryId) Removes statuses for the given directory- Parameters:
directoryId
- directory id
-
getDirectorySynchronisationInformation
@Deprecated DirectorySynchronisationInformation getDirectorySynchronisationInformation(Directory directory) Deprecated.since 2.12.0, usegetDirectorySynchronisationInformation(long)
insteadReturns directory synchronisation information. The returned value is never be null.- Parameters:
directory
- directory to retrieve information from- Returns:
- directory synchronisation information
-
getDirectorySynchronisationInformation
DirectorySynchronisationInformation getDirectorySynchronisationInformation(long directoryId) throws DirectoryNotFoundException Returns directory synchronisation information. The returned value is never be null.- Parameters:
directoryId
- directory id to retrieve information from- Returns:
- directory synchronisation information
- Throws:
DirectoryNotFoundException
-
getLastSynchronisationTokenForDirectory
Returns the last stored synchronisation token for the directory- Parameters:
directoryId
- the id of the directory- Returns:
- the last stored synchronisation token or null if there is no token stored in the database
-
storeSynchronisationTokenForDirectory
Store a new synchronisation token for the given directory. This will overwrite the old token.- Parameters:
directoryId
- the id of the directorysynchronisationToken
- the new token to store
-
clearSynchronisationTokenForDirectory
void clearSynchronisationTokenForDirectory(long directoryId) Clears the synchronisation token for the given directory- Parameters:
directoryId
- directory id
-
getDirectorySynchronisationInformation(long)
instead