Interface SearchIndexMasterProcessLauncher

All Superinterfaces:
IndexableTypeAware
All Known Implementing Classes:
GenericSearchIndexMasterProcessLauncher

public interface SearchIndexMasterProcessLauncher extends IndexableTypeAware
Interface for launching a reindex process. This is the ultimate entry point, and implementations of this class must handle any locking, synchronization, distribution of data, event publishing, and cleanup. Most implementations will extend GenericSearchIndexMasterProcessLauncher.
Author:
Kelly Tisdell (ktisdell)
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Method to forcibly stop a running index job.
    long
    Returns the elapsed time in millis, or -1 if the system is not running or if this is not the master instance.
    boolean
    Indicates if this process is currently executing.
    void
    Rebuilds an entire index.
    void
    Rebuilds an entire index.

    Methods inherited from interface com.broadleafcommerce.search.index.core.IndexableTypeAware

    getIndexableType
  • Method Details

    • rebuildIndex

      void rebuildIndex() throws com.broadleafcommerce.search.api.SearchIndexException
      Rebuilds an entire index. Index is typically Solr or ElasticSearch, but could be any type of search-able index. This is the entry point for rebuilding an index, and is often run in a background thread.
      Throws:
      com.broadleafcommerce.search.api.SearchIndexException - if an error occurs preventing indexing
    • rebuildIndex

      void rebuildIndex(Map<String,Serializable> context) throws com.broadleafcommerce.search.api.SearchIndexException
      Rebuilds an entire index. Index is typically Solr or ElasticSearch, but could be any type of search-able index. This is the entry point for rebuilding an index, and is often run in a background thread.
      Parameters:
      context - arbitrary contextual information to be passed to the process launcher
      Throws:
      com.broadleafcommerce.search.api.SearchIndexException - if an error occurs preventing indexing
    • isActive

      boolean isActive()
      Indicates if this process is currently executing.
      Returns:
      whether this process is currently executing
    • forceStop

      void forceStop()
      Method to forcibly stop a running index job. If the job is not running, this will have no affect.
    • getElapsedTime

      long getElapsedTime()
      Returns the elapsed time in millis, or -1 if the system is not running or if this is not the master instance.
      Returns:
      the elapsed time in millis, or -1 if the system is not running or if this is not the master instance