public boolean insert(Page target) {
        try {
            synchronized (this) {
                db.put(target.getRequestedUrl(), target);
                if (target.getRedirectedURL() != null) {
                    db.put(target.getRedirectedURL().toString(), target);
                }
            }
            return true;
        } catch (Exception e) {
            logger.error("Failed to store object in repository.", e);
            return false;
        }
    }
A target repository that stores pages in a (RocksDB) key-value store.

@author aeciosantos
ache/src/main/java/achecrawler/target/repository/RocksDBTargetRepository.java