Class SolrExtIndexerJob<T extends SolrExtIndexerCronJobModel>
- java.lang.Object
-
- de.hybris.platform.servicelayer.cronjob.AbstractJobPerformable<T>
-
- de.hybris.platform.solrfacetsearch.indexer.cron.SolrExtIndexerJob<T>
-
- All Implemented Interfaces:
JobPerformable<T>,org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanFactoryAware
public class SolrExtIndexerJob<T extends SolrExtIndexerCronJobModel> extends AbstractJobPerformable<T> implements org.springframework.beans.factory.BeanFactoryAware
Job performable that triggers indexer operations. It allows you to have a separate query perSolrExtIndexerCronJobModelinstance. It also allows you to perform partial updates.
-
-
Field Summary
-
Fields inherited from class de.hybris.platform.servicelayer.cronjob.AbstractJobPerformable
flexibleSearchService, modelService, sessionService
-
-
Constructor Summary
Constructors Constructor Description SolrExtIndexerJob()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.Map<java.lang.String,java.lang.Object>createQueryParameters(T cronJob, IndexConfig indexConfig, IndexedType indexedType)protected org.springframework.beans.factory.BeanFactorygetBeanFactory()FacetSearchConfigServicegetFacetSearchConfigService()IndexerQueriesExecutorgetIndexerQueriesExecutor()IndexerServicegetIndexerService()PerformResultperform(T cronJob)The execution body for aServicelayerJob.protected voidperformIndexing(T cronJob, FacetSearchConfig facetSearchConfig, IndexedType indexedType, java.util.List<IndexedProperty> indexedProperties, java.util.List<PK> pks, java.util.Map<java.lang.String,java.lang.String> indexerHints)protected java.util.List<IndexedProperty>resolveIndexedProperties(T cronJob, IndexedType indexedType)protected IndexedTyperesolveIndexedType(T cronJob, IndexConfig indexConfig)voidsetBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)voidsetFacetSearchConfigService(FacetSearchConfigService facetSearchConfigService)voidsetIndexerQueriesExecutor(IndexerQueriesExecutor indexerQueriesExecutor)voidsetIndexerService(IndexerService indexerService)protected voidvalidateCronJobParameters(T cronJob)-
Methods inherited from class de.hybris.platform.servicelayer.cronjob.AbstractJobPerformable
clearAbortRequestedIfNeeded, isAbortable, isPerformable, setFlexibleSearchService, setModelService, setSessionService
-
-
-
-
Method Detail
-
setFacetSearchConfigService
public void setFacetSearchConfigService(FacetSearchConfigService facetSearchConfigService)
-
getFacetSearchConfigService
public FacetSearchConfigService getFacetSearchConfigService()
-
setIndexerService
public void setIndexerService(IndexerService indexerService)
-
getIndexerService
public IndexerService getIndexerService()
-
setIndexerQueriesExecutor
public void setIndexerQueriesExecutor(IndexerQueriesExecutor indexerQueriesExecutor)
-
getIndexerQueriesExecutor
public IndexerQueriesExecutor getIndexerQueriesExecutor()
-
setBeanFactory
public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
- Specified by:
setBeanFactoryin interfaceorg.springframework.beans.factory.BeanFactoryAware
-
getBeanFactory
protected org.springframework.beans.factory.BeanFactory getBeanFactory()
-
perform
public PerformResult perform(T cronJob)
Description copied from interface:JobPerformableThe execution body for aServicelayerJob. Implement here your execution logic. It can be called synchronous or asynchronous. So be aware of thread-safety. Method will return a result object saying if the execution has reached end and if it was successful.- Specified by:
performin interfaceJobPerformable<T extends SolrExtIndexerCronJobModel>- Specified by:
performin classAbstractJobPerformable<T extends SolrExtIndexerCronJobModel>- Parameters:
cronJob- the related CronJob in whose context the execution will be performed.- Returns:
- a
PerformResultthat indicates whether theexecutionwas successfully executed or not and has finished or not.
-
validateCronJobParameters
protected void validateCronJobParameters(T cronJob) throws IndexerJobException
- Throws:
IndexerJobException
-
resolveIndexedType
protected IndexedType resolveIndexedType(T cronJob, IndexConfig indexConfig) throws IndexerJobException
- Throws:
IndexerJobException
-
resolveIndexedProperties
protected java.util.List<IndexedProperty> resolveIndexedProperties(T cronJob, IndexedType indexedType) throws IndexerJobException
- Throws:
IndexerJobException
-
createQueryParameters
protected java.util.Map<java.lang.String,java.lang.Object> createQueryParameters(T cronJob, IndexConfig indexConfig, IndexedType indexedType) throws IndexerJobException
- Throws:
IndexerJobException
-
performIndexing
protected void performIndexing(T cronJob, FacetSearchConfig facetSearchConfig, IndexedType indexedType, java.util.List<IndexedProperty> indexedProperties, java.util.List<PK> pks, java.util.Map<java.lang.String,java.lang.String> indexerHints) throws IndexerJobException, IndexerException
- Throws:
IndexerJobExceptionIndexerException
-
-