Interface SearchIndexMasterProcessLauncher
- All Superinterfaces:
IndexableTypeAware
- All Known Implementing Classes:
GenericSearchIndexMasterProcessLauncher
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 TypeMethodDescriptionvoid
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
isActive()
Indicates if this process is currently executing.void
Rebuilds an entire index.void
rebuildIndex
(Map<String, Serializable> context) 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.SearchIndexExceptionRebuilds 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.SearchIndexExceptionRebuilds 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
-