Class ThreadedColumnsToRetrieveIterator

  • All Implemented Interfaces:
    Iterator<byte[][]>

    public class ThreadedColumnsToRetrieveIterator
    extends DBCThreadedIterator<byte[][]>
    An iterator that returns documents stored in the database identified by the primary keys delivered in a list upon creation of the iterator. The returned data corresponds to the columns marked to be retrieved in the table schema also given at iterator creation.
    The iterator employs two threads to retrieve new documents from the database while other documents, fetched before, can be processed concurrently. The idea is that the database can work in parallel to the program working with the retrieved documents.
    Author:
    hellrich
    • Constructor Detail

      • ThreadedColumnsToRetrieveIterator

        public ThreadedColumnsToRetrieveIterator​(DataBaseConnector dbc,
                                                 CoStoSysConnection conn,
                                                 List<Object[]> ids,
                                                 String[] tables,
                                                 String[] schemaNames)
        Retrieves data from the database over multiple tables. All tables will be joined on the given IDs. The columns to be retrieved for each table is determined by its table schema. For this purpose, the tables and schemaName arrays are required to be parallel.
        Parameters:
        dbc - A DataBaseConnector instance
        conn - An active database connection
        ids - A list of primary keys identifying the items to retrieve.
        tables - The tables from which the items should be retrieved that are identified by ids.
        schemaNames - A parallel array to tables thas specifies the table schema name of each table.