Class DistributedExecutorMassIndexer

java.lang.Object
org.infinispan.query.impl.massindex.DistributedExecutorMassIndexer
All Implemented Interfaces:
Indexer

@MBean(objectName="MassIndexer", description="Component that rebuilds the Lucene index from the cached data") public class DistributedExecutorMassIndexer extends Object implements Indexer
Since:
7.1
Author:
gustavonalle
  • Constructor Details

    • DistributedExecutorMassIndexer

      public DistributedExecutorMassIndexer(org.infinispan.AdvancedCache<?,?> cache)
  • Method Details

    • start

      @ManagedOperation(description="Starts rebuilding the index", displayName="Rebuild index") public void start()
    • run

      public CompletionStage<Void> run()
      Description copied from interface: Indexer
      Deletes all indexes for the cache and rebuilds them. The indexing operation can take a long time to complete, depending on the size of the cache. You should not query caches until the indexing operation is complete because it affects query performance and results.
      Specified by:
      run in interface Indexer
    • runLocal

      public CompletionStage<Void> runLocal()
      Description copied from interface: Indexer
      same as Indexer.run() but will only re-index data from the local member.
      Specified by:
      runLocal in interface Indexer
    • run

      public CompletionStage<Void> run(Object... keys)
      Description copied from interface: Indexer
      Re-indexes values associated with the provided keys only.
      Specified by:
      run in interface Indexer
    • remove

      public CompletionStage<Void> remove()
      Description copied from interface: Indexer
      Removes all indexes from the cache.
      Specified by:
      remove in interface Indexer
    • remove

      public CompletionStage<Void> remove(Class<?>... entities)
      Description copied from interface: Indexer
      Removes all entities of a particular class from the index of the cache.
      Specified by:
      remove in interface Indexer
    • isRunning

      public boolean isRunning()
      Specified by:
      isRunning in interface Indexer
      Returns:
      true if the indexer process was started on this node and has not finished yet.