class BdbServerCache extends DefaultServerCache 
implements Lifecycle, Checkpointable {

    private static final long serialVersionUID = 1L;

    protected BdbModule bdb;
    @Autowired
    public void setBdbModule(BdbModule bdb) {
        this.bdb = bdb;
    }
    
    public BdbServerCache() {
    }
    
    public void start() {<FILL_FUNCTION_BODY>}

    protected boolean isRunning = false;
    protected boolean isCheckpointRecovery = false;
    
    public boolean isRunning() {
        return isRunning;
    }

    public void stop() {
        isRunning = false; 
        // TODO: release bigmaps? 
    }

    @Override
    public void startCheckpoint(Checkpoint checkpointInProgress) {
    }

    @Override
    public void doCheckpoint(Checkpoint checkpointInProgress)
            throws IOException {
        // handled in BdbModule
    }

    @Override
    public void finishCheckpoint(Checkpoint checkpointInProgress) {
        
    }

    @Override
    @Autowired(required = false)
    public void setRecoveryCheckpoint(Checkpoint recoveryCheckpoint) {
        // just remember that we are doing checkpoint-recovery;
        // actual state recovery happens via BdbModule
        isCheckpointRecovery = true; 
    }
}

        if(isRunning()) {
            return;
        }
        try {
            this.servers = bdb.getObjectCache("servers", isCheckpointRecovery, CrawlServer.class, CrawlServer.class);
            this.hosts = bdb.getObjectCache("hosts", isCheckpointRecovery, CrawlHost.class, CrawlHost.class);
        } catch (DatabaseException e) {
            throw new IllegalStateException(e);
        }
        isRunning = true;
    
<methods>public void <init>() ,public void <init>(ObjectIdentityCache<org.archive.modules.net.CrawlServer>, ObjectIdentityCache<org.archive.modules.net.CrawlHost>) ,public void close() ,public boolean containsHost(java.lang.String) ,public boolean containsServer(java.lang.String) ,public void forAllHostsDo(Closure) ,public org.archive.modules.net.CrawlHost getHostFor(java.lang.String) ,public org.archive.modules.net.CrawlServer getServerFor(java.lang.String) ,public Set<java.lang.String> hostKeys() <variables>protected ObjectIdentityCache<org.archive.modules.net.CrawlHost> hosts,private static java.util.logging.Logger logger,private static final long serialVersionUID,protected ObjectIdentityCache<org.archive.modules.net.CrawlServer> servers