Package org.molgenis.data.index
Class IndexActionRegisterServiceImpl
- java.lang.Object
-
- org.molgenis.data.index.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 Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddExcludedEntity(String entityFullName)Excludes an entity from being indexed.booleanforgetIndexActions(String transactionId)Removes all index actions registered for a transaction.Set<org.molgenis.data.EntityKey>getDirtyEntities()Set<String>getDirtyRepositories()Set<String>getEntirelyDirtyRepositories()booleanisEntireRepositoryDirty(org.molgenis.data.meta.model.EntityType entityType)booleanisEntityDirty(org.molgenis.data.EntityKey entityKey)booleanisRepositoryCompletelyClean(org.molgenis.data.meta.model.EntityType entityType)voidregister(org.molgenis.data.meta.model.EntityType entityType, Object entityId)Log and create locks for an add/update/delete operation on a RepositoryvoidstoreIndexActions(String transactionId)Stores the index actions in the repository.
-
-
-
Method Detail
-
addExcludedEntity
public void addExcludedEntity(String entityFullName)
Description copied from interface:IndexActionRegisterServiceExcludes an entity from being indexed.- Specified by:
addExcludedEntityin interfaceIndexActionRegisterService- Parameters:
entityFullName- fully qualified name of the entity to exclude
-
register
@Transactional public void register(org.molgenis.data.meta.model.EntityType entityType, Object entityId)Description copied from interface:IndexActionRegisterServiceLog and create locks for an add/update/delete operation on a Repository- Specified by:
registerin interfaceIndexActionRegisterServiceentityId- the ID of the entity, may be null to indicate change to entire repository
-
storeIndexActions
public void storeIndexActions(String transactionId)
Description copied from interface:IndexActionRegisterServiceStores 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:
storeIndexActionsin interfaceIndexActionRegisterService- Parameters:
transactionId- ID for the transaction the index actions were registered under
-
forgetIndexActions
public boolean forgetIndexActions(String transactionId)
Description copied from interface:IndexActionRegisterServiceRemoves all index actions registered for a transaction.- Specified by:
forgetIndexActionsin interfaceIndexActionRegisterService- 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:
isEntityDirtyin interfaceorg.molgenis.data.transaction.TransactionInformation
-
isEntireRepositoryDirty
public boolean isEntireRepositoryDirty(org.molgenis.data.meta.model.EntityType entityType)
- Specified by:
isEntireRepositoryDirtyin interfaceorg.molgenis.data.transaction.TransactionInformation
-
isRepositoryCompletelyClean
public boolean isRepositoryCompletelyClean(org.molgenis.data.meta.model.EntityType entityType)
- Specified by:
isRepositoryCompletelyCleanin interfaceorg.molgenis.data.transaction.TransactionInformation
-
getDirtyEntities
public Set<org.molgenis.data.EntityKey> getDirtyEntities()
- Specified by:
getDirtyEntitiesin interfaceorg.molgenis.data.transaction.TransactionInformation
-
getEntirelyDirtyRepositories
public Set<String> getEntirelyDirtyRepositories()
- Specified by:
getEntirelyDirtyRepositoriesin interfaceorg.molgenis.data.transaction.TransactionInformation
-
-