Method: Mongo::JavaImpl::Db_#write_concern

Defined in:
lib/jmongo/mongo/db.rb

#write_concern(safe_) ⇒ Object

@collection.save(=> ‘foo’, :safe => nil) —> NONE = new WriteConcern(-1) @collection.save(=> ‘foo’, :safe => true) —> NORMAL = new WriteConcern(0) @collection.save(=> ‘foo’, :safe => => 2) —> new WriteConcern( 2 , 0 , false) @collection.save(=> ‘foo’, :safe => => 2, :wtimeout => 200) —> new WriteConcern( 2 , 200 , false) @collection.save(=> ‘foo’, :safe => => 2, :wtimeout => 200, :fsync => true) —> new WriteConcern( 2 , 0 , true) @collection.save(=> ‘foo’, :safe => => true) —> FSYNC_SAFE = new WriteConcern( 1 , 0 , true)



16
17
18
# File 'lib/jmongo/mongo/db.rb', line 16

def write_concern(safe_)
  self.class.write_concern(safe_ || self.safe || @connection.write_concern)
end