Class AbstractSnIndexerJob<T extends AbstractSnIndexerCronJobModel>
- java.lang.Object
-
- de.hybris.platform.servicelayer.cronjob.AbstractJobPerformable<T>
-
- de.hybris.platform.searchservices.indexer.service.impl.AbstractSnIndexerJob<T>
-
- All Implemented Interfaces:
JobPerformable<T>
- Direct Known Subclasses:
FullSnIndexerJob,IncrementalSnIndexerJob
public abstract class AbstractSnIndexerJob<T extends AbstractSnIndexerCronJobModel> extends AbstractJobPerformable<T>
Implementation ofJobPerformablefor running indexer operations.
-
-
Field Summary
-
Fields inherited from class de.hybris.platform.servicelayer.cronjob.AbstractJobPerformable
flexibleSearchService, modelService, sessionService
-
-
Constructor Summary
Constructors Constructor Description AbstractSnIndexerJob()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.Optional<java.util.Date>getLastSuccessfulStartTime(T cronJob)Retrieve the lastSuccessfulStartTime from the cronjob.SnIndexerCronJobDaogetSnIndexerCronJobDao()SnIndexerItemSourceFactorygetSnIndexerItemSourceFactory()SnIndexerServicegetSnIndexerService()booleanisAbortable()Checks whether the execution is implemented abortable.booleanisPerformable()Checks whether the execution can be performed at the moment.protected voidsaveLastSuccessfulStartTime(T cronJob)Persist the start time of the cronjob as last successful start time.voidsetSnIndexerCronJobDao(SnIndexerCronJobDao snIndexerCronJobDao)voidsetSnIndexerItemSourceFactory(SnIndexerItemSourceFactory snIndexerItemSourceFactory)voidsetSnIndexerService(SnIndexerService snIndexerService)-
Methods inherited from class de.hybris.platform.servicelayer.cronjob.AbstractJobPerformable
clearAbortRequestedIfNeeded, perform, setFlexibleSearchService, setModelService, setSessionService
-
-
-
-
Method Detail
-
isAbortable
public boolean isAbortable()
Description copied from interface:JobPerformableChecks whether the execution is implemented abortable.- Specified by:
isAbortablein interfaceJobPerformable<T extends AbstractSnIndexerCronJobModel>- Overrides:
isAbortablein classAbstractJobPerformable<T extends AbstractSnIndexerCronJobModel>- Returns:
- true if the execution can be aborted
-
isPerformable
public boolean isPerformable()
Description copied from interface:JobPerformableChecks whether the execution can be performed at the moment.- Specified by:
isPerformablein interfaceJobPerformable<T extends AbstractSnIndexerCronJobModel>- Overrides:
isPerformablein classAbstractJobPerformable<T extends AbstractSnIndexerCronJobModel>- Returns:
- true if the execution is ready
-
getLastSuccessfulStartTime
protected java.util.Optional<java.util.Date> getLastSuccessfulStartTime(T cronJob)
Retrieve the lastSuccessfulStartTime from the cronjob. If the cronjob didn't finish successfully before, retrieve the maximum of the lastSuccessfulStartTime from the full indexing cronjobs for the sameSnIndexTypeModel. If both are not available, return an empty result.- Parameters:
cronJob- the cronjob- Returns:
- the last successful start time, or empty
-
saveLastSuccessfulStartTime
protected void saveLastSuccessfulStartTime(T cronJob)
Persist the start time of the cronjob as last successful start time.- Parameters:
cronJob- the cronjob
-
getSnIndexerService
public SnIndexerService getSnIndexerService()
-
setSnIndexerService
public void setSnIndexerService(SnIndexerService snIndexerService)
-
getSnIndexerCronJobDao
public SnIndexerCronJobDao getSnIndexerCronJobDao()
-
setSnIndexerCronJobDao
public void setSnIndexerCronJobDao(SnIndexerCronJobDao snIndexerCronJobDao)
-
getSnIndexerItemSourceFactory
public SnIndexerItemSourceFactory getSnIndexerItemSourceFactory()
-
setSnIndexerItemSourceFactory
public void setSnIndexerItemSourceFactory(SnIndexerItemSourceFactory snIndexerItemSourceFactory)
-
-