Package io.quarkus.mongodb.runtime
Class WriteConcernConfig
- java.lang.Object
-
- io.quarkus.mongodb.runtime.WriteConcernConfig
-
public class WriteConcernConfig extends Object
Configures the write concern.
-
-
Field Summary
Fields Modifier and Type Field Description boolean
journal
Configures the journal writing aspect.boolean
retryWrites
If set totrue
, 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 addsw: wValue
to all write commands.Optional<Duration>
wTimeout
When set, the driver addswtimeout : ms
to all write commands.
-
Constructor Summary
Constructors Constructor Description WriteConcernConfig()
-
-
-
Field Detail
-
safe
@ConfigItem(defaultValue="true") public boolean safe
Configures the safety. If set totrue
: the driver ensures that all writes are acknowledged by the MongoDB server, or else throws an exception. (see alsow
andwtimeoutMS
). If set fofalse
: the driver does not ensure that all writes are acknowledged by the MongoDB server.
-
journal
@ConfigItem(defaultValue="true") public boolean journal
Configures the journal writing aspect. If set totrue
: the driver waits for the server to group commit to the journal file on disk. If set tofalse
: the driver does not wait for the server to group commit to the journal file on disk.
-
w
@ConfigItem public Optional<String> w
When set, the driver addsw: wValue
to all write commands. It requiressafe
to betrue
. The value is typically a number, but can also be themajority
string.
-
retryWrites
@ConfigItem public boolean retryWrites
If set totrue
, the driver will retry supported write operations if they fail due to a network error.
-
wTimeout
@ConfigItem public Optional<Duration> wTimeout
When set, the driver addswtimeout : ms
to all write commands. It requiressafe
to betrue
.
-
-