Class 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 Detail

      • DistributedExecutorMassIndexer

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

      • 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
      • 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.