MongoClient mongo = new MongoClient(new MongoClientURI(conf.getDatabaseUrl()));
DB db = mongo.getDB(conf.getNamespace());
WriteConcern concern = mongo.getWriteConcern();
long documentsToKeep = conf.getOldMaxCount();
int oldDocsMaxSizeMB = conf.getOldMaxSize();
StatusUpdater updater = new StatusUpdater(new MongoConnector(conf));
GridFS documentFs = new GridFS(db);
MongoDocumentIO io = new MongoDocumentIO(db, concern, documentsToKeep,
oldDocsMaxSizeMB, updater, documentFs);
io.prepare();