Write operations that use this write concern will wait for acknowledgement from the primary server before returning.
Write operations that use this write concern will wait for acknowledgement from the primary server before returning. Exceptions are raised for network issues, and server errors.
2.7
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 flush the data to disk.
Exceptions are raised for network issues, and server errors; the write operation waits for the server to flush the data to disk.
2.7
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; 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; the write operation waits for the server to group commit to the journal file on disk.
2.7
Exceptions are raised for network issues and server errors; waits on a majority of servers for the write operation
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 for at least 2 servers for the write operation.
2.7
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
Write operations that use this write concern will return as soon as the message is written to the socket.
Write operations that use this write concern will return as soon as the message is written to the socket. Exceptions are raised for network issues, but not server errors.
2.7
Create a new WriteConcern object.
Create a new WriteConcern object.
w represents # of servers:
w=-1
None, no checking is donew=0
None, network socket errors raisedw=1
Checks server for errors as well as network socket errors raisedw>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.
If true and the server is running without journaling, blocks until the server has synced all data
files to disk. If the server is running with journaling, this acts the same as the j
option,
blocking until write operations have been committed to the journal.
Cannot be used in combination with j
.
Defaults to False
whether writes should wait for a journaling group commit. Cannot be used with fsync
.
if an error occurs during a bulk insert should the inserts continue anyway
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.
If true and the server is running without journaling, blocks until the server has synced all data
files to disk. If the server is running with journaling, this acts the same as the j
option,
blocking until write operations have been committed to the journal.
Cannot be used in combination with j
.
Defaults to False
whether writes should wait for a journaling group commit. Cannot be used with fsync
.
if an error occurs during a bulk insert should the inserts continue anyway
No exceptions are raised, even for network issues.
No exceptions are raised, even for network issues.
(Since version 2.7.0) This write concern will no longer supported
2.7
No exceptions are raised, even for network issues
No exceptions are raised, even for network issues
(Since version 2.7.0) This write concern will no longer supported
Helper class for creating WriteConcern instances
2.0
JWriteConcern