Class PositionBatcher

    • Field Detail

      • dataCube

        private final DataCube dataCube
        The datacube this batcher inserts data for.
      • queuedInsertCount

        private int queuedInsertCount
        The number of queued inserts. Used to check when a flush is needed.
      • totalInsertCount

        private int totalInsertCount
        The total number of inserts done by this batcher.
      • maxPosition

        private int maxPosition
        The maximum position number inserted by the batcher.
      • bytes

        private long bytes
        The number of bytes this batcher has added to the data cube and experiment.
      • bytesPerRow

        private final long bytesPerRow
        The number of bytes used by a single row.
      • positionSql

        private PreparedStatement positionSql
        The statement that inserts the position/reporter link.
        INSERT INTO Dynamic#PerPosition (cube, position, reporter_id)
        VALUES (cube, ?, ?)
        
      • positionSqlStatement

        private String positionSqlStatement
        The SQL string for the positionSql statement.
    • Constructor Detail

      • PositionBatcher

        PositionBatcher​(DbControl dc,
                        DataCube dataCube)
        Create a new position batcher for a data cube. It is assumed that the calling code has checked that the cube is allowed to receive more data (ie. it hasn't been committed to the database).