Class DbSolutionRepositoryImportSource

  • All Implemented Interfaces:
    ImportSource

    public class DbSolutionRepositoryImportSource
    extends AbstractImportSource
    An ImportSource that connects to the legacy database-based solution repository.

    This implementation works in the following way:

    1. Fetch all (joined) rows in a single query.
    2. Process the result set, creating files, ACLs, and possibly temporary files containing the files' data.
    3. Write this info to disk in batches.
    4. Close the result set.
    5. Iterate over the batches, one at a time.

    This implementation saves memory at the expense of disk space.

    Author:
    mlowery
    • Constructor Detail

      • DbSolutionRepositoryImportSource

        public DbSolutionRepositoryImportSource​(DataSource dataSource,
                                                String srcCharset,
                                                String requiredCharset,
                                                String ownerName)
    • Method Detail

      • getCount

        public int getCount()
        The set is created dynamically - so we can't know this
      • getFiles

        public Iterable<ImportSource.IRepositoryFileBundle> getFiles()
        Description copied from interface: ImportSource
        Returns the set of files available by this Import Source.

        NOTE: the Iterable object MUST support the Iterator.remove() method as the consumer of this information will be iterating over the data and will remove items that they process (and shouldn't be processed by down-stream consumers)
        Returns: