Class DistributedExecutorMassIndexer
- java.lang.Object
-
- org.infinispan.query.impl.massindex.DistributedExecutorMassIndexer
-
- All Implemented Interfaces:
Indexer,MassIndexer
@MBean(objectName="MassIndexer", description="Component that rebuilds the Lucene index from the cached data") public class DistributedExecutorMassIndexer extends Object implements MassIndexer, Indexer- Since:
- 7.1
- Author:
- gustavonalle
-
-
Constructor Summary
Constructors Constructor Description DistributedExecutorMassIndexer(org.infinispan.AdvancedCache<?,?> cache, org.hibernate.search.spi.SearchIntegrator searchIntegrator, KeyTransformationHandler keyTransformationHandler, org.infinispan.commons.time.TimeService timeService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisRunning()CompletableFuture<Void>purge()Deletes all the indexes and skip the reindexing.CompletableFuture<Void>reindex(Object... keys)CompletionStage<Void>remove()Remove all the indexes from the cache.CompletionStage<Void>remove(Class<?>... entities)Remove all entities of particular class from the index of a cache.CompletionStage<Void>run()Deletes all the indexes from a cache and rebuilds them from the existing data.CompletionStage<Void>run(Object... keys)Re-indexes only the values associated with the provided keys.voidstart()CompletableFuture<Void>startAsync()
-
-
-
Constructor Detail
-
DistributedExecutorMassIndexer
public DistributedExecutorMassIndexer(org.infinispan.AdvancedCache<?,?> cache, org.hibernate.search.spi.SearchIntegrator searchIntegrator, KeyTransformationHandler keyTransformationHandler, org.infinispan.commons.time.TimeService timeService)
-
-
Method Detail
-
start
@ManagedOperation(description="Starts rebuilding the index", displayName="Rebuild index") public void start()- Specified by:
startin interfaceMassIndexer
-
purge
public CompletableFuture<Void> purge()
Description copied from interface:MassIndexerDeletes all the indexes and skip the reindexing.- Specified by:
purgein interfaceMassIndexer
-
startAsync
public CompletableFuture<Void> startAsync()
- Specified by:
startAsyncin interfaceMassIndexer- Returns:
CompletableFuture
-
reindex
public CompletableFuture<Void> reindex(Object... keys)
- Specified by:
reindexin interfaceMassIndexer
-
run
public CompletionStage<Void> run()
Description copied from interface:IndexerDeletes all the indexes from a cache and rebuilds them from the existing data. This operation can take a long time depending on the cache size, and searches during this process will be affected.
-
run
public CompletionStage<Void> run(Object... keys)
Description copied from interface:IndexerRe-indexes only the values associated with the provided keys.
-
remove
public CompletionStage<Void> remove()
Description copied from interface:IndexerRemove all the indexes from the cache.
-
remove
public CompletionStage<Void> remove(Class<?>... entities)
Description copied from interface:IndexerRemove all entities of particular class from the index of a cache.
-
isRunning
public boolean isRunning()
- Specified by:
isRunningin interfaceIndexer- Specified by:
isRunningin interfaceMassIndexer- Returns:
- true if the MassIndexer process was started on this node and hasn't finished yet.
-
-