DBCollection collection = getBlobCollection();
DBObject index = new BasicDBObject();
index.put(MongoBlob.KEY_ID, 1L);
DBObject options = new BasicDBObject();
options.put("unique", Boolean.TRUE);
collection.ensureIndex(index, options);
}
private MongoBlob getBlob(String id, long lastMod) {
DBObject query = getBlobQuery(id, lastMod);
return (MongoBlob) getBlobCollection().findOne(query);