Interface SynchronisationStatusManager

All Known Subinterfaces:
InternalSynchronisationStatusManager
All Known Implementing Classes:
SynchronisationStatusManagerImpl

public interface SynchronisationStatusManager
  • Method Details

    • syncStarted

      void syncStarted(Directory directory)
      Notify that directory synchronisation has started.
      Parameters:
      directory - directory
    • syncStatus

      @Deprecated void syncStatus(long directoryId, String key, Serializable... parameters)
      Deprecated.
      Notify that directory synchronisation status has changed.
      Parameters:
      directoryId - directory id
      key - synchronisation status message key
      parameters - 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 id
      statusKey - synchronisation status message key
      parameters - synchronisation status message parameters
    • syncFailure

      default void syncFailure(long directoryId, SynchronisationMode mode, Throwable throwable)
      Notify about a failure that occurs during synchronisation.
      Parameters:
      directoryId - directory id
      mode - synchronisation mode
      throwable - throwable that carries information about the failure
    • syncFinished

      @Deprecated void syncFinished(long directoryId)
      Deprecated.
      since 2.12.0, use SynchronisationStatusManager#syncFinished(long, SynchronisationStatusKey, List, String) instead
      Notify 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 id
      statusKey - synchronisation status
      parameters - 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.
      Returns 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

      @Nullable String getLastSynchronisationTokenForDirectory(long directoryId)
      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

      void storeSynchronisationTokenForDirectory(long directoryId, String synchronisationToken)
      Store a new synchronisation token for the given directory. This will overwrite the old token.
      Parameters:
      directoryId - the id of the directory
      synchronisationToken - the new token to store
    • clearSynchronisationTokenForDirectory

      void clearSynchronisationTokenForDirectory(long directoryId)
      Clears the synchronisation token for the given directory
      Parameters:
      directoryId - directory id