Class IndexActionRegisterServiceImpl

  • All Implemented Interfaces:
    IndexActionRegisterService, org.molgenis.data.transaction.TransactionInformation

    @Component
    public class IndexActionRegisterServiceImpl
    extends Object
    implements org.molgenis.data.transaction.TransactionInformation, IndexActionRegisterService
    Registers changes made to an indexed repository that need to be fixed by indexing the relevant data.
    • Method Detail

      • register

        @Transactional
        public void register​(org.molgenis.data.meta.model.EntityType entityType,
                             Object entityId)
        Description copied from interface: IndexActionRegisterService
        Log and create locks for an add/update/delete operation on a Repository
        Specified by:
        register in interface IndexActionRegisterService
        entityId - the ID of the entity, may be null to indicate change to entire repository
      • storeIndexActions

        public void storeIndexActions​(String transactionId)
        Description copied from interface: IndexActionRegisterService
        Stores the index actions in the repository. Creates a ReindexActionJob to group them by. storeIndexActions uses a set as optimization to remove the double index actions before the index actions are stored in database.
        Specified by:
        storeIndexActions in interface IndexActionRegisterService
        Parameters:
        transactionId - ID for the transaction the index actions were registered under
      • forgetIndexActions

        public boolean forgetIndexActions​(String transactionId)
        Description copied from interface: IndexActionRegisterService
        Removes all index actions registered for a transaction.
        Specified by:
        forgetIndexActions in interface IndexActionRegisterService
        Parameters:
        transactionId - ID for the transaction the index actions were registered under
        Returns:
        boolean indicating if any work was present
      • isEntityDirty

        public boolean isEntityDirty​(org.molgenis.data.EntityKey entityKey)
        Specified by:
        isEntityDirty in interface org.molgenis.data.transaction.TransactionInformation
      • isEntireRepositoryDirty

        public boolean isEntireRepositoryDirty​(org.molgenis.data.meta.model.EntityType entityType)
        Specified by:
        isEntireRepositoryDirty in interface org.molgenis.data.transaction.TransactionInformation
      • isRepositoryCompletelyClean

        public boolean isRepositoryCompletelyClean​(org.molgenis.data.meta.model.EntityType entityType)
        Specified by:
        isRepositoryCompletelyClean in interface org.molgenis.data.transaction.TransactionInformation
      • getDirtyEntities

        public Set<org.molgenis.data.EntityKey> getDirtyEntities()
        Specified by:
        getDirtyEntities in interface org.molgenis.data.transaction.TransactionInformation
      • getEntirelyDirtyRepositories

        public Set<String> getEntirelyDirtyRepositories()
        Specified by:
        getEntirelyDirtyRepositories in interface org.molgenis.data.transaction.TransactionInformation
      • getDirtyRepositories

        public Set<String> getDirtyRepositories()
        Specified by:
        getDirtyRepositories in interface org.molgenis.data.transaction.TransactionInformation