Interface DirectorySynchronisationStatusDao

All Known Implementing Classes:
DirectorySynchronisationStatusDAOHibernate

@ExperimentalSpi public interface DirectorySynchronisationStatusDao
A DAO to store synchronisation progress and results
  • Method Details

    • findActiveForDirectory

      Optional<DirectorySynchronisationStatus> findActiveForDirectory(long directoryId)
      Returns:
      the status of the latest active synchronization for the given directory if present
    • findLastForDirectory

      Optional<DirectorySynchronisationStatus> findLastForDirectory(long directoryId)
      Returns:
      the status of the latest completed synchronization for the given directory if present
    • add

      Saves a new synchronisation status
      Returns:
      the newly saved status
    • update

      Updates an existing directory status
      Returns:
      the updated status. Must have an id set
      Throws:
      ObjectNotFoundException - if a status with the given id doesn't exist
    • removeStatusesForDirectory

      long removeStatusesForDirectory(Long directoryId)
      Removes all stored status information for the directory with the specified id
      Parameters:
      directoryId - the directory id to remove for
      Returns:
      the number of entries removed
    • removeAll

      long removeAll()
      Removes all stored status information
      Returns:
      the number of entries removed
    • removeAllExcept

      long removeAllExcept(long directoryId, int statusId)
      Removes all stored status information for the directory except the indicated one
      Parameters:
      directoryId - the directory id
      statusId - the id of the status to keep
      Returns:
      the number of entries removed
    • findActiveSyncsWhereNodeIdNotIn

      Collection<DirectorySynchronisationStatus> findActiveSyncsWhereNodeIdNotIn(Set<String> nodesIds)
      Parameters:
      nodesIds - the set of node ids to filter on
      Returns:
      entries for synchronisations that are indicated as active but not owned by any of the nodes ids