Package org.archive.util.bdbje

Examples of org.archive.util.bdbje.EnhancedEnvironment.openDatabase()


        // open the source env history DB, copying entries to target env
        EnhancedEnvironment sourceEnv = setupCopyEnvironment(sourceDir, true);
        StoredClassCatalog sourceClassCatalog = sourceEnv.getClassCatalog();
        DatabaseConfig historyDbConfig = HISTORY_DB_CONFIG.toDatabaseConfig();
        historyDbConfig.setReadOnly(true);
        Database sourceHistoryDB = sourceEnv.openDatabase(
                null, URI_HISTORY_DBNAME, historyDbConfig);
        StoredSortedMap<String,Map> sourceHistoryMap = new StoredSortedMap<String,Map>(sourceHistoryDB,
                new StringBinding(), new SerialBinding<Map>(sourceClassCatalog,
                        Map.class), true);
View Full Code Here


        if (envFile != null) {
            // set up target environment
            FileUtils.ensureWriteableDirectory(envFile);
            targetEnv = setupCopyEnvironment(envFile);
            classCatalog = targetEnv.getClassCatalog();
            historyDB = targetEnv.openDatabase(null, URI_HISTORY_DBNAME,
                    HISTORY_DB_CONFIG.toDatabaseConfig());
            historyMap = new StoredSortedMap<String,Map>(historyDB,
                    new StringBinding(), new SerialBinding<Map>(classCatalog,
                        Map.class), true);
        }
View Full Code Here

        FileUtils.ensureWriteableDirectory(env);
       
        // setup target environment
        EnhancedEnvironment targetEnv = PersistProcessor.setupCopyEnvironment(env);
        StoredClassCatalog classCatalog = targetEnv.getClassCatalog();
        Database historyDB = targetEnv.openDatabase(
                null,
                PersistProcessor.URI_HISTORY_DBNAME,
                PersistProcessor.HISTORY_DB_CONFIG.toDatabaseConfig());
        @SuppressWarnings({ "rawtypes", "unchecked" })
        StoredSortedMap<String, Object> historyMap = new StoredSortedMap<String, Object>(historyDB,
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.