Class StreamingChangesCollector
- java.lang.Object
-
- de.hybris.platform.outboundsync.job.impl.StreamingChangesCollector
-
- All Implemented Interfaces:
ChangesCollector,CountingChangesCollector
public class StreamingChangesCollector extends java.lang.Object implements CountingChangesCollector
-
-
Constructor Summary
Constructors Constructor Description StreamingChangesCollector(@NotNull ItemChangeSender itemChangeSender, @NotNull CronJobModel jobModel, @NotNull OutboundSyncStreamConfigurationModel streamConfiguration)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancollect(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.intgetNumberOfChangesCollected()Reports how many changes were collected so far.
-
-
-
Constructor Detail
-
StreamingChangesCollector
public StreamingChangesCollector(@NotNull @NotNull ItemChangeSender itemChangeSender, @NotNull @NotNull CronJobModel jobModel, @NotNull @NotNull OutboundSyncStreamConfigurationModel streamConfiguration)
-
-
Method Detail
-
collect
public boolean collect(ItemChangeDTO itemChangeDTO)
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.
-
-