public void write(final K key, final V value) throws IOException {
final DBObject o = new BasicDBObject();
if (value instanceof MongoUpdateWritable) {
//ignore the key - just use the update directly.
MongoUpdateWritable muw = (MongoUpdateWritable) value;
try {
DBCollection dbCollection = getDbCollectionByRoundRobin();
dbCollection.update(new BasicDBObject(muw.getQuery()), new BasicDBObject(muw.getModifiers()), muw.isUpsert(),
muw.isMultiUpdate());
return;
} catch (final MongoException e) {
throw new IOException("can't write to mongo", e);
}
}