Package org.apache.jdbm

Examples of org.apache.jdbm.DBMaker


    // if file doesn't exist, make it read-only
    if(readonly && !new File(f+JDBM_SUFFIX ).exists())
      readonly = false;
   
    // init record manager
    DBMaker d = DBMaker.openFile(f);
    // set options
    d.disableTransactions();
    d.closeOnExit();
    d.enableMRUCache();
    d.useRandomAccessFile();
    //d.enableHardCache();
    //d.disableCache();
    if(readonly){
      d.disableLocking();
      d.readonly();
    }
    db = d.make();
   
      // create or load hashtable from given file
    map = db.getHashMap(tablename);
    if(map == null)
      map = db.createHashMap(tablename);
View Full Code Here


    // if file doesn't exist, make it read-only
    if(readonly && !new File(f+JDBM_SUFFIX ).exists())
      readonly = false;
   
    // init record manager
    DBMaker d = DBMaker.openFile(f);
    // set options
    d.disableTransactions();
    d.closeOnExit();
    d.enableMRUCache();
    d.useRandomAccessFile();
    //d.enableHardCache();
    //d.disableCache();
    if(readonly){
      d.disableLocking();
      d.readonly();
    }
    db = d.make();
   
      // create or load hashtable from given file
    map = db.getHashMap(tablename);
    if(map == null)
      map = db.createHashMap(tablename);
View Full Code Here

TOP

Related Classes of org.apache.jdbm.DBMaker

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.