Interface ArchiveService

  • All Known Implementing Classes:
    ArchiveServiceImpl

    public interface ArchiveService
    Since:
    6.0
    Author:
    Feng Hui, Matthieu Chaffotte
    • Method Detail

      • recordInsert

        void recordInsert​(long time,
                          ArchiveInsertRecord record)
                   throws SRecorderException
        Archive the given entity in sliding archive if relevant and in the appropriate definitive archive
        Parameters:
        time - The archive date
        record - Archive insert record containing the entity to be archived
        Throws:
        SRecorderException
      • recordInserts

        void recordInserts​(long time,
                           ArchiveInsertRecord... records)
                    throws SRecorderException
        Archive the given entities in the definitive archive
        Parameters:
        time - the time of archiving
        records - Archive inserts record containing the entity to be archived
        Throws:
        SRecorderException - in case of a write error
      • recordDelete

        void recordDelete​(DeleteRecord record)
                   throws SRecorderException
        Remove the given entity from both sliding archive (if present) and the right archive level (if present) This operation should normally to be used. This is for admin purpose only
        Parameters:
        record - The delete record containing archived entity to be deleted
        Throws:
        SRecorderException
      • getDefinitiveArchiveReadPersistenceService

        ReadPersistenceService getDefinitiveArchiveReadPersistenceService()
        Get the ReadPersistenceService corresponding to the definitive archive
        Returns:
        the ReadPersistenceService corresponding to the definitive archive
      • isArchivable

        boolean isArchivable​(java.lang.Class<? extends PersistentObject> sourceObjectClass)
        Parameters:
        sourceObjectClass - Persistent object to be judged achievable or not
        Returns:
        Return true if the objects of the given class can be archived.
      • deleteFromQuery

        int deleteFromQuery​(java.lang.String queryName,
                            java.util.Map<java.lang.String,​java.lang.Object> parameters)
                     throws SRecorderException
        Throws:
        SRecorderException