title: MongoDB, WriteConcern: need some clarification
body: <p>I need some help to clarify the concept of WriteConcern
  I'm using MongoDb 4.0.2 (with a replicaset) and java-mongo-driver 3.8.1</p>
  
  <p>I already added on mongo configuration the last default write concern with</p>
  
  <pre><code>{
      "w": "majority",
      "wtimeout": 5000
  }
  </code></pre>
  
  <p>In code-side, when can I use the ack response from the database?
  I found that the library, when you use delete or update, return an object of Result (as DeleteResult) that contain a function <code>wasAcknowledged()</code> for take the result of delete/update on the majority replica in the set.</p>
  
  <p>But I'm not able to find a similar Result for all insert function. Someone could explain me how to use WriteConcern in order to avoid data loss?</p>
  
  <p><strong>My goal is catch an Exception when insert/write/update on replica-set going in error</strong></p>
  
  <p>Hope the question is clear, I'm waiting for your answer. Thanks</p>
  
  <p>Just to know, is enough set this preferences on db, or I have to set the write-concern preferences also on my code?</p>