Class OutboundSyncCronJobPerformable
- java.lang.Object
-
- de.hybris.platform.servicelayer.cronjob.AbstractJobPerformable<OutboundSyncCronJobModel>
-
- de.hybris.platform.outboundsync.job.impl.OutboundSyncCronJobPerformable
-
- All Implemented Interfaces:
JobPerformable<OutboundSyncCronJobModel>
public class OutboundSyncCronJobPerformable extends AbstractJobPerformable<OutboundSyncCronJobModel>
ThisJobPerformablecollects the changes specified in theStreamConfigurationand send them out via theItemChangeSender.
-
-
Field Summary
-
Fields inherited from class de.hybris.platform.servicelayer.cronjob.AbstractJobPerformable
flexibleSearchService, modelService, sessionService
-
-
Constructor Summary
Constructors Constructor Description OutboundSyncCronJobPerformable()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected ChangeDetectionServicegetChangeDetectionService()protected StreamConfigurationgetStreamConfiguration(OutboundSyncStreamConfigurationModel deltaStream)booleanisAbortable()Checks whether the execution is implemented abortable.PerformResultperform(OutboundSyncCronJobModel cronJob)The execution body for aServicelayerJob.protected intprocessChanges(OutboundSyncCronJobModel cronJob, OutboundSyncStreamConfigurationModel deltaStream)Processes the changes from the given stream configurationprotected intprocessChangesForContainer(OutboundSyncCronJobModel cronJob)Process changes for all stream configurations in the containervoidsetChangeDetectionService(ChangeDetectionService changeDetectionService)voidsetChangesCollectorFactory(ChangesCollectorFactory changesCollectorFactory)voidsetEventService(EventService eventService)voidsetGettableChangesCollectorProvider(GettableChangesCollectorProvider changesCollectorProvider)Deprecated, for removal: This API element is subject to removal in a future version.voidsetItemChangeSender(ItemChangeSender itemChangeSender)Deprecated, for removal: This API element is subject to removal in a future version.not used anymore.voidsetJobRegister(@NotNull OutboundSyncJobRegister register)Injects specificOutboundSyncJobRegisterimplementation.-
Methods inherited from class de.hybris.platform.servicelayer.cronjob.AbstractJobPerformable
clearAbortRequestedIfNeeded, isPerformable, setFlexibleSearchService, setModelService, setSessionService
-
-
-
-
Method Detail
-
isAbortable
public boolean isAbortable()
Description copied from interface:JobPerformableChecks whether the execution is implemented abortable.- Specified by:
isAbortablein interfaceJobPerformable<OutboundSyncCronJobModel>- Overrides:
isAbortablein classAbstractJobPerformable<OutboundSyncCronJobModel>- Returns:
- true if the execution can be aborted
-
perform
public PerformResult perform(OutboundSyncCronJobModel 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<OutboundSyncCronJobModel>- Specified by:
performin classAbstractJobPerformable<OutboundSyncCronJobModel>- 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.
-
processChangesForContainer
protected int processChangesForContainer(OutboundSyncCronJobModel cronJob)
Process changes for all stream configurations in the container- Parameters:
cronJob- a cron job processing changes- Returns:
- number of changes processed by the job or 0, if there are not changes detected.
-
processChanges
protected int processChanges(OutboundSyncCronJobModel cronJob, OutboundSyncStreamConfigurationModel deltaStream)
Processes the changes from the given stream configuration- Parameters:
cronJob- a cron job processing changes in the specified streamdeltaStream- a stream containing changes to be processed by the job- Returns:
- number of changes processed for the specified stream or 0, if the stream has no changes detected.
-
getStreamConfiguration
protected StreamConfiguration getStreamConfiguration(OutboundSyncStreamConfigurationModel deltaStream)
-
getChangeDetectionService
protected ChangeDetectionService getChangeDetectionService()
-
setChangeDetectionService
public void setChangeDetectionService(ChangeDetectionService changeDetectionService)
-
setItemChangeSender
@Deprecated(since="1905.2003-CEP", forRemoval=true) public void setItemChangeSender(ItemChangeSender itemChangeSender)Deprecated, for removal: This API element is subject to removal in a future version.not used anymore.
-
setGettableChangesCollectorProvider
@Deprecated(since="1905.2003-CEP", forRemoval=true) public void setGettableChangesCollectorProvider(GettableChangesCollectorProvider changesCollectorProvider)Deprecated, for removal: This API element is subject to removal in a future version.
-
setChangesCollectorFactory
public void setChangesCollectorFactory(ChangesCollectorFactory changesCollectorFactory)
-
setEventService
public void setEventService(EventService eventService)
-
setJobRegister
public void setJobRegister(@NotNull @NotNull OutboundSyncJobRegister register)Injects specificOutboundSyncJobRegisterimplementation.- Parameters:
register- an implementation to use
-
-