Interface SynchronisationStatusManager
- All Known Subinterfaces:
InternalSynchronisationStatusManager
- All Known Implementing Classes:
SynchronisationStatusManagerImpl
public interface SynchronisationStatusManager
-
Method Summary
Modifier and TypeMethodDescriptionvoidclearSynchronisationTokenForDirectory(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 directoryvoidremoveStatusesForDirectory(long directoryId) Removes statuses for the given directoryvoidstoreSynchronisationTokenForDirectory(long directoryId, String synchronisationToken) Store a new synchronisation token for the given directory.default voidsyncFailure(long directoryId, SynchronisationMode mode, Throwable throwable) Notify about a failure that occurs during synchronisation.voidsyncFinished(long directoryId) Deprecated.since 2.12.0, useSynchronisationStatusManager#syncFinished(long, SynchronisationStatusKey, List, String)insteadvoidsyncFinished(long directoryId, SynchronisationStatusKey statusKey, List<Serializable> parameters) Notify that directory synchronisation has finished.voidsyncStarted(Directory directory) Notify that directory synchronisation has started.voidsyncStatus(long directoryId, SynchronisationStatusKey statusKey, List<Serializable> parameters) Notify that directory synchronisation status has changed.voidsyncStatus(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