Package no.priv.garshol.duke.databases

Examples of no.priv.garshol.duke.databases.MapDBBlockingDatabase


import no.priv.garshol.duke.databases.MapDBBlockingDatabase;

public class MapDBBlockingDatabaseTest extends DatabaseTest {

  public Database createDatabase(Configuration config) {
    MapDBBlockingDatabase db = new MapDBBlockingDatabase();
    db.setConfiguration(config);

    Collection<KeyFunction> functions = new ArrayList();
    functions.add(new TestKeyFunction());
    db.setKeyFunctions(functions);
    return db;
  }
View Full Code Here


  public Database createDatabase(Configuration config) throws IOException {
    if (dbfile == null)
      dbfile = tmpdir.newFile().getAbsolutePath(); // ensure same every time

    MapDBBlockingDatabase db = new MapDBBlockingDatabase();
    db.setConfiguration(config);
    db.setOverwrite(false);
    db.setFile(dbfile);
    db.setAsync(false); // slows down tests too much
    db.setWindowSize(0); // otherwise we'll find way too many candidates
 
    Collection<KeyFunction> functions = new ArrayList();
    functions.add(new TestKeyFunction());
    db.setKeyFunctions(functions);
    return db;
  }
View Full Code Here

TOP

Related Classes of no.priv.garshol.duke.databases.MapDBBlockingDatabase

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.