Package com.db4o.config

Examples of com.db4o.config.Configuration.blockSize()


     * Add our own hook to rollback and close... */
    dbConfig.automaticShutDown(false);
    /* Block size 8 should have minimal impact since pointers are this
     * long, and allows databases of up to 16GB.
     * FIXME make configurable by user. */
    dbConfig.blockSize(8);
    dbConfig.diagnostic().addListener(new DB4ODiagnosticListener());

    dbConfig.exceptionsOnNotStorable(false);

    System.err.println("Optimise native queries: "+dbConfig.optimizeNativeQueries());
View Full Code Here


      /* Open Source DB */
      sourceDb = Db4o.openFile(createConfiguration(true), source.getAbsolutePath());

      Configuration destinationDbConfiguration = createConfiguration(true);
      if (useLargeBlockSize)
        destinationDbConfiguration.blockSize(LARGE_DB_BLOCK_SIZE);

      /* Open Destination DB */
      destinationDb = Db4o.openFile(destinationDbConfiguration, destination.getAbsolutePath());

      /* Copy (Defragment) */
 
View Full Code Here

    //efficient startup. For example, the following could be used. We'd have
    //to include a file when we need to evolve the schema or something similar
    //config.detectSchemaChanges(false)

    if (getLargeBlockSizeMarkerFile().exists())
      config.blockSize(LARGE_DB_BLOCK_SIZE); //The DB has been migrated to a larger block size

    config.setOut(new PrintStream(new ByteArrayOutputStream()) {
      @Override
      public void write(byte[] buf, int off, int len) {
        if (buf != null && len >= 0 && off >= 0 && off <= buf.length - len)
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.