Class StreamingChangesCollector

    • 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:
        collect in interface ChangesCollector
        Parameters:
        itemChangeDTO - change to be collected
        Returns:
        true, if the collecting process should continue, false otherwise
      • finish

        public void finish()
        Description copied from interface: ChangesCollector
        Finishes 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:
        finish in interface ChangesCollector
      • 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:
        getNumberOfChangesCollected in interface CountingChangesCollector
        Returns:
        number of changes collected or 0, if no changes collected.
      • setInfoParser

        public void setInfoParser​(ChangeInfoParser parser)
        Injects implementation of an info parser to be used instead of the default implementation.
        Parameters:
        parser - a custom parser to be used for parsing the ItemChangeDTO.getInfo() data. null value is ignored.