Exceptions are raised for network issues and server errors; Write operations wait for the server to flush data to disk
Exceptions are raised for network issues, and server errors; the write operation waits for the server to group commit to the journal file on disk
Exceptions are raised for network issues and server errors; waits on a majority of servers for the write operation
No exceptions are raised, even for network issues
Exceptions are raised for network issues but not server errors.
Exceptions are raised for network issues and server errors; waits for at least 2 servers for the write operation.
Exceptions are raised for network issues and server errors; waits on a server for the write operation
Create a new WriteConcern object.
Create a new WriteConcern object.
w represents # of servers:
w=-1
None, no checking is done w=0
None, network socket errors raised w=1
Checks server for errors as well as network socket errors raised w>1
Checks servers (w) for errors as well as network socket errors raised(Int) Specifies the number of servers to wait for on the write operation, and exception raising behavior. Defaults to 0
(Int) Specifies the number MS to wait for the server operations to write. Defaults to 0 (no timeout)
(Boolean) Indicates whether write operations should require a sync to disk. Defaults to False
whether writes should wait for a journaling group commit
Get the WriteConcern constants by name: NONE, NORMAL, SAFE, MAJORITY, FSYNC_SAFE, JOURNAL_SAFE, REPLICAS_SAFE.
Get the WriteConcern constants by name: NONE, NORMAL, SAFE, MAJORITY, FSYNC_SAFE, JOURNAL_SAFE, REPLICAS_SAFE. (matching is done case insensitively)
NOTE: This only supports the java versions, no support for the local scala aliases.
Create a new WriteConcern object.
Create a new WriteConcern object.
w is a String representing a valid getLastErrorMode rule (or "majority")
(Int) Specifies the getLastErrorMode to apply to the write
(Int) Specifies the number MS to wait for the server operations to write. Defaults to 0 (no timeout)
(Boolean) Indicates whether write operations should require a sync to disk. Defaults to False
whether writes should wait for a journaling group commit
Helper class for creating WriteConcern instances
2.0
com.mongodb.WriteConcern