public class WriteConcernConfig extends Object
| Modifier and Type | Field and Description |
|---|---|
boolean |
journal
Configures the journal writing aspect.
|
boolean |
retryWrites
If set to
true, the driver will retry supported write operations if they fail due to a network error. |
boolean |
safe
Configures the safety.
|
Optional<String> |
w
When set, the driver adds
w: wValue to all write commands. |
Optional<Duration> |
wTimeout
When set, the driver adds
wtimeout : ms to all write commands. |
| Constructor and Description |
|---|
WriteConcernConfig() |
@ConfigItem(defaultValue="true") public boolean safe
true: the driver ensures that all writes are acknowledged by the MongoDB server, or else
throws an exception. (see also w and wtimeoutMS).
If set fo
false: the driver does not ensure that all writes are acknowledged by the MongoDB server.@ConfigItem(defaultValue="true") public boolean journal
true: the driver waits for the server to group commit to the journal file on disk.
If set to false: the driver does not wait for the server to group commit to the journal file on disk.@ConfigItem public Optional<String> w
w: wValue to all write commands. It requires safe to be true.
The value is typically a number, but can also be the majority string.@ConfigItem public boolean retryWrites
true, the driver will retry supported write operations if they fail due to a network error.@ConfigItem public Optional<Duration> wTimeout
wtimeout : ms to all write commands. It requires safe to be
true.Copyright © 2021 JBoss by Red Hat. All rights reserved.