public static ICrawlerDB getCrawlerDBInstance(String type, IDBConnection con, String dbName, String dbNameQueues, Logger logger) {
if (!type.equals(con.getType())) return null;
if ("mongodb".equals(type)) {
try {
return new MongoDBCrawlerDB((MongoDBConnection) con, dbName, dbNameQueues, logger);
} catch (UnknownHostException e) {
e.printStackTrace();
return null;
}
}