Package com.sleepycat.je

Examples of com.sleepycat.je.Environment.openDatabase()


                                databaseName));
                    }
                }
                DatabaseConfig dbConfig = new DatabaseConfig();
                dbConfig.setAllowCreate(true);
                Database openDatabase = environment.openDatabase(null, databaseName, dbConfig);
                openDatabase.close();
                environment.flushLog(true);
                environment.close();
                environment = createEnvironment(readOnly);
            }
View Full Code Here


      /* Verify the database name by trying to open it. */
      Environment env = new Environment(new File(envHome), null);
      DatabaseConfig dbConfig = new DatabaseConfig();
      dbConfig.setTransactional(transactional);
      Database db = env.openDatabase(null, dbName, dbConfig);
      db.close();
      env.close();
   }

   /**
 
View Full Code Here

   * @throws EnvironmentLockedException if provided File is locked by another application
   */
  public InstrumentDatabaseMap(final File dbFolder) throws EnvironmentLockedException {
   
    final Environment env = new Environment(dbFolder, envConfig);
    dbase = env.openDatabase(null, "InstrumentDef", dbConfig);
   
    map = new StoredMap<String, InstrumentDefinition>(dbase, new SymbolBinding(),
        new InstDefBinding(), true);
   
  }
View Full Code Here

   * @param inStream
   */
  public InstrumentDatabaseMap(final File dbFolder, final InputStream inStream) {
   
    final Environment env = new Environment(dbFolder, envConfig);
    dbase = env.openDatabase(null, "InstrumentDef", dbConfig);
    map =  new StoredMap<String, InstrumentDefinition>(dbase, new SymbolBinding(),
        new InstDefBinding(), true);
   
    populateDB(inStream);
   
View Full Code Here

   */
  public InstrumentDatabaseMap(final File dbFolder, final File instDefZip)
      throws ZipException, IOException {
   
    final Environment env = new Environment(dbFolder, envConfig);
    dbase = env.openDatabase(null, "InstrumentDef", dbConfig);
    map = new StoredMap<String, InstrumentDefinition>(dbase, new SymbolBinding(),
        new InstDefBinding(), true);
   
    InputStream inStream = null;
   
View Full Code Here

   * @throws EnvironmentLockedException if provided File is locked by another application
   */
  public LocalInstrumentDBMap(final File dbFolder) throws EnvironmentLockedException {
   
    final Environment env = new Environment(dbFolder, envConfig);
    dbase = env.openDatabase(null, "InstrumentDef", dbConfig);
   
    map = new StoredMap<String, InstrumentDefinition>(dbase, new SymbolBinding(),
        new InstDefBinding(), true);
   
  }
View Full Code Here

   * @param inStream
   */
  public LocalInstrumentDBMap(final File dbFolder, final InputStream inStream) {
   
    final Environment env = new Environment(dbFolder, envConfig);
    dbase = env.openDatabase(null, "InstrumentDef", dbConfig);
    map =  new StoredMap<String, InstrumentDefinition>(dbase, new SymbolBinding(),
        new InstDefBinding(), true);
   
    populateDB(inStream);
   
View Full Code Here

   */
  public LocalInstrumentDBMap(final File dbFolder, final File instDefZip)
      throws ZipException, IOException {
   
    final Environment env = new Environment(dbFolder, envConfig);
    dbase = env.openDatabase(null, "InstrumentDef", dbConfig);
    map = new StoredMap<String, InstrumentDefinition>(dbase, new SymbolBinding(),
        new InstDefBinding(), true);
   
    InputStream inStream = null;
   
View Full Code Here

   * @throws EnvironmentLockedException if provided File is locked by another application
   */
  public LocalInstrumentDBMap(final File dbFolder) throws EnvironmentLockedException {
   
    final Environment env = new Environment(dbFolder, envConfig);
    dbase = env.openDatabase(null, "InstrumentDef", dbConfig);
   
    map = new StoredMap<String, InstrumentDefinition>(dbase, new SymbolBinding(),
        new InstDefBinding(), true);
   
  }
View Full Code Here

   * @param inStream
   */
  public LocalInstrumentDBMap(final File dbFolder, final InputStream inStream) {
   
    final Environment env = new Environment(dbFolder, envConfig);
    dbase = env.openDatabase(null, "InstrumentDef", dbConfig);
    map =  new StoredMap<String, InstrumentDefinition>(dbase, new SymbolBinding(),
        new InstDefBinding(), true);
   
    populateDB(inStream);
   
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.