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>
This
JobPerformable collects
the changes specified in the StreamConfiguration and send them out
via the ItemChangeSender.-
Field Summary
Fields inherited from class de.hybris.platform.servicelayer.cronjob.AbstractJobPerformable
flexibleSearchService, modelService, sessionService -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ChangeDetectionServiceprotected StreamConfigurationbooleanChecks whether the execution is implemented abortable.perform(OutboundSyncCronJobModel cronJob) The execution body for aServicelayerJob.protected intprocessChanges(OutboundSyncCronJobModel cronJob, OutboundSyncStreamConfigurationModel deltaStream) Processes the changes from the given stream configurationprotected intProcess changes for all stream configurations in the containervoidsetChangeDetectionService(ChangeDetectionService changeDetectionService) voidsetChangesCollectorFactory(ChangesCollectorFactory changesCollectorFactory) voidsetEventService(EventService eventService) voidsetJobRegister(@NotNull OutboundSyncJobRegister register) Injects specificOutboundSyncJobRegisterimplementation.Methods inherited from class de.hybris.platform.servicelayer.cronjob.AbstractJobPerformable
clearAbortRequestedIfNeeded, isPerformable, setFlexibleSearchService, setModelService, setSessionService
-
Constructor Details
-
OutboundSyncCronJobPerformable
public OutboundSyncCronJobPerformable()
-
-
Method Details
-
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
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
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
-
setChangeDetectionService
-
setChangesCollectorFactory
-
setEventService
-
setJobRegister
Injects specificOutboundSyncJobRegisterimplementation.- Parameters:
register- an implementation to use
-