Beispiel #1
0
 private void init__wrappee__base(Environment env, DatabaseConfig config)
     throws DatabaseException {
   handleLocker = null;
   envHandle = env;
   configuration = config.cloneConfig();
   isWritable = !configuration.getReadOnly();
   state = OPEN;
 }
Beispiel #2
0
 void initNew__wrappee__base(
     Environment env, Locker locker, String databaseName, DatabaseConfig dbConfig)
     throws DatabaseException {
   if (dbConfig.getReadOnly()) {
     throw new DatabaseException(
         "DatabaseConfig.setReadOnly() must be set to false " + "when creating a Database");
   }
   init(env, dbConfig);
   EnvironmentImpl environmentImpl = DbInternal.envGetEnvironmentImpl(envHandle);
   databaseImpl = environmentImpl.createDb(locker, databaseName, dbConfig, this);
   databaseImpl.addReferringHandle(this);
 }