Class WriteConcernConfig

java.lang.Object
io.quarkus.mongodb.runtime.WriteConcernConfig

public class WriteConcernConfig extends Object
Configures the write concern.
  • Field Details

    • safe

      @ConfigItem(defaultValue="true") public boolean safe
      Configures the safety. If set to 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.
    • journal

      @ConfigItem(defaultValue="true") public boolean journal
      Configures the journal writing aspect. If set to 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.
    • w

      When set, the driver adds 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.
    • retryWrites

      @ConfigItem public boolean retryWrites
      If set to true, 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 adds wtimeout : ms to all write commands. It requires safe to be true.
  • Constructor Details

    • WriteConcernConfig

      public WriteConcernConfig()