factory.close();
}
private void testMixedWritingReading(DataType dataType, DataInterfaceFactory factory, DatabaseCachingType cachingType, File largeTextFile, int numberOfThreads, long numberOfItems) throws FileNotFoundException, InterruptedException {
final DataInterface dataInterface = createDataInterface(dataType, cachingType, factory);
dataInterface.dropAllData();
final BufferedReader rdr = new BufferedReader(new FileReader(largeTextFile));
//first fill database by writing data
MutableLong numberOfItemsWritten = new MutableLong(0);
CountDownLatch writeLatch = new CountDownLatch(numberOfThreads);