Interface DirectorySynchronisationInformationStore

All Known Implementing Classes:
DirectorySynchronisationInformationStoreImpl, InDatabaseDirectorySynchronisationInformationStore

public interface DirectorySynchronisationInformationStore
Storage for directory synchronisation information.
  • Method Details

    • getActive

      @Nullable DirectorySynchronisationRoundInformation getActive(long directoryId)
      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

      void syncStatus(long directoryId, String statusKey, List<Serializable> parameters)
      Updates active directory synchronisation status
      Parameters:
      directoryId - directory id
      statusKey - new status i18n key
      parameters - parameters for the statusKey
    • syncStatus

      void syncStatus(long directoryId, SynchronisationStatusKey statusKey, List<Serializable> parameters)
      Updates active directory synchronisation status.
      Parameters:
      directoryId - directory id
      statusKey - new status i18n key
      parameters - paramaters for the statusKey
    • syncStarted

      void syncStarted(long directoryId, long timestamp)
      Starts the synchronisation, creating new directory synchronisation information.
      Parameters:
      directoryId - directory id
      timestamp - synchronisation start
    • syncFailure

      default void syncFailure(long directoryId, SynchronisationMode syncMode, String failureReason)
      Updates active directory synchronisation status with a failure reason.
      Parameters:
      directoryId - directory id
      syncMode - synchronisation mode
      failureReason - 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 id
      timestamp - synchronisation end
      statusKey - 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.