Пример #1
0
 void initExisting__wrappee__base(
     Environment env, Locker locker, DatabaseImpl databaseImpl, DatabaseConfig dbConfig)
     throws DatabaseException {
   validateConfigAgainstExistingDb(dbConfig, databaseImpl);
   init(env, dbConfig);
   this.databaseImpl = databaseImpl;
   databaseImpl.addReferringHandle(this);
   configuration.setSortedDuplicates(databaseImpl.getSortedDuplicates());
   configuration.setTransactional(databaseImpl.isTransactional());
 }
Пример #2
0
  /** Open a database, called by Environment. */
  void initExisting(
      Environment env, Locker locker, DatabaseImpl databaseImpl, DatabaseConfig dbConfig)
      throws DatabaseException {

    /*
     * Make sure the configuration used for the open is compatible with the
     * existing databaseImpl.
     */
    validateConfigAgainstExistingDb(dbConfig, databaseImpl);

    init(env, dbConfig);
    this.databaseImpl = databaseImpl;
    databaseImpl.addReferringHandle(this);

    /*
     * Copy the duplicates and transactional properties of the underlying
     * database, in case the useExistingConfig property is set.
     */
    configuration.setSortedDuplicates(databaseImpl.getSortedDuplicates());
    configuration.setTransactional(databaseImpl.isTransactional());
  }