Class StreamingChangesCollector
java.lang.Object
de.hybris.platform.outboundsync.job.impl.StreamingChangesCollector
- All Implemented Interfaces:
ChangesCollector,CountingChangesCollector
-
Constructor Summary
ConstructorsConstructorDescriptionStreamingChangesCollector(@NotNull FilteringService filteringService, @NotNull ItemChangeSender changeSender, @NotNull CronJobModel jobModel, @NotNull OutboundSyncStreamConfigurationModel streamCfg) -
Method Summary
Modifier and TypeMethodDescriptionbooleancollect(ItemChangeDTO itemChangeDTO) Collects the given change in a specified way.voidfinish()Finishes the collecting changes, depending on implementation, may be used as kind of post processing after finalizing collecting the changes.intReports how many changes were collected so far.voidsetInfoParser(ChangeInfoParser parser) Injects implementation of an info parser to be used instead of the default implementation.
-
Constructor Details
-
StreamingChangesCollector
public StreamingChangesCollector(@NotNull @NotNull FilteringService filteringService, @NotNull @NotNull ItemChangeSender changeSender, @NotNull @NotNull CronJobModel jobModel, @NotNull @NotNull OutboundSyncStreamConfigurationModel streamCfg)
-
-
Method Details
-
collect
Collects the given change in a specified way. Sends each individual change to the spring integration channel gateway.- Specified by:
collectin interfaceChangesCollector- Parameters:
itemChangeDTO- change to be collected- Returns:
true, if the collecting process should continue,falseotherwise
-
finish
public void finish()Description copied from interface:ChangesCollectorFinishes the collecting changes, depending on implementation, may be used as kind of post processing after finalizing collecting the changes. E.g. a csv report can be generated here.- Specified by:
finishin interfaceChangesCollector
-
getNumberOfChangesCollected
public int getNumberOfChangesCollected()Reports how many changes were collected so far. This collector counts all changes processed during the lifetime of this specific instance. If "reset" is required, then a new instance of the collector must be created.- Specified by:
getNumberOfChangesCollectedin interfaceCountingChangesCollector- Returns:
- number of changes collected or 0, if no changes collected.
-
setInfoParser
Injects implementation of an info parser to be used instead of the default implementation.- Parameters:
parser- a custom parser to be used for parsing theItemChangeDTO.getInfo()data.nullvalue is ignored.
-