class PersistOnlineProcessor extends PersistProcessor 
implements Lifecycle {
    
    @SuppressWarnings("unused")
    private static final long serialVersionUID = -666479480942267268L;
    
    protected BdbModule bdb;
    @Autowired
    public void setBdbModule(BdbModule bdb) {
        this.bdb = bdb;
    }
    
    protected String historyDbName = "uri_history";
    public String getHistoryDbName() {
        return this.historyDbName;
    }
    public void setHistoryDbName(String name) {
        this.historyDbName = name; 
    }

    @SuppressWarnings("unchecked")
    protected StoredSortedMap<String,Map> store;
    protected Database historyDb;

    public PersistOnlineProcessor() {
    }

    @SuppressWarnings("unchecked")
    public void start() {
        // TODO: share single store instance between Load and Store processors
        // (shared context? EnhancedEnvironment?)

        if (isRunning()) {
            return;
        }
        StoredSortedMap<String,Map> historyMap;
        try {
            StoredClassCatalog classCatalog = bdb.getClassCatalog();
            BdbModule.BdbConfig dbConfig = HISTORY_DB_CONFIG;

            historyDb = bdb.openDatabase(getHistoryDbName(), dbConfig, true);
            historyMap = 
                new StoredSortedMap<String,Map>(
                        historyDb,
                        new StringBinding(), 
                        new SerialBinding<Map>(classCatalog,Map.class), 
                        true);
        } catch (DatabaseException e) {
        	throw new RuntimeException(e);
        }
        store = historyMap;
    }
    
    public boolean isRunning() {
        return historyDb != null; 
    }

    public void stop() {<FILL_FUNCTION_BODY>}

}

        if (!isRunning()) {
            return;
        }
        // leave other cleanup to BdbModule
        historyDb = null;
    
<methods>public void <init>() ,public static int copyPersistSourceToHistoryMap(java.io.File, StoredSortedMap<java.lang.String,Map#RAW>) throws DatabaseException, java.io.IOException,public static int copyPersistSourceToHistoryMap(java.net.URL, StoredSortedMap<java.lang.String,Map#RAW>) throws DatabaseException, java.io.IOException,public static void main(java.lang.String[]) throws DatabaseException, java.io.IOException,public static java.lang.String persistKeyFor(org.archive.modules.CrawlURI) ,public static java.lang.String persistKeyFor(java.lang.String) ,public static int populatePersistEnv(java.lang.String, java.io.File) throws java.io.IOException,public static org.archive.util.bdbje.EnhancedEnvironment setupCopyEnvironment(java.io.File) throws DatabaseException,public static org.archive.util.bdbje.EnhancedEnvironment setupCopyEnvironment(java.io.File, boolean) throws DatabaseException<variables>public static final non-sealed org.archive.bdb.BdbModule.BdbConfig HISTORY_DB_CONFIG,public static final java.lang.String URI_HISTORY_DBNAME,private static final java.util.logging.Logger logger,private static final long serialVersionUID