vert-x/mod-mongo-persistor — pull request #14 by bytor99999 (2012-10-26 21:46:52+00:00)
Title: Added WriteConcern to save, update and delete. Updated Java Driver to 2.9.2

Updated the Java Mongo Driver to version 2.9.2.
Updated tests and documentation with changes made.

Added WriteConcern attribute to messages for insert, update and delete. This allows each call/use case to overwrite the db's default WriteConcern setting. Since certain use cases might need more or less consistency than the databases default setting. By default MongoDB sets the database to the least restrictive async call and forget WriteConcern, which can lead to data loss. By being able to set it to a higher setting you can get to your eventual consistency. The property is "writeConcern" and can be set to any of the constant names in the Java MongoDB Driver WriteConcern class as a String. WriteConcern has a valueOf method that takes that String and converts it to a fully configured WriteConcern class.

Valid values are
"NONE", "NORMAL", "SAFE", "MAJORITY", "FSYNC_SAFE", "JOURNAL_SAFE" and "REPLICAS_SAFE"

An example for delete would be

{
"action": "delete",
"collection": ,
"matcher": ,
"writeConcert": "SAFE"
}