pt.tecnico.dsi.vault.secretEngines.databases.models.MongoDB
WriteConcern
Companion object WriteConcern
case class WriteConcern(minNumberOfWrites: Option[Int] = Some(1), writeMode: Option[String] = None, timeout: FiniteDuration = Duration.Zero, j: Option[Boolean] = Some(true), fsync: Option[Boolean] = None) extends Product with Serializable
This class does not correspond directly to MongoDB Write Concern but rather to mgo Safe. See Vault MongoDB.
- minNumberOfWrites
how many servers should confirm a write before the operation is considered successful. When set to 0 - requests no acknowledgment of the write operation. If you also set waitForAcknowledge to true, that prevails to request acknowledgment from the standalone mongod or the primary of a replica set. When set to 1 - requests acknowledgment that the write operation has propagated to the standalone mongod or the primary in a replica set. This is the default. When set to greater than 1 - requires acknowledgment from the primary and as many additional data-bearing secondaries to meet the specified value. For example, consider a 3-member replica set with no arbiters. Specifying 2 would require acknowledgment from the primary and one of the secondaries. Specifying 3 would require acknowledgment from the primary and both secondaries.
- writeMode
When set to "majority" - requests acknowledgment that write operations have propagated to the calculated majority of the data-bearing voting members (i.e. primary and secondaries with members[n].votes greater than 0). When set to a
custom write concern name
- Requests acknowledgment that the write operations have propagated to tagged members that satisfy the custom write concern defined in settings.getLastErrorModes. This takes priority over minNumberOfWrites.- timeout
specifies a time limit for the write concern. This is only applicable for minNumberOfWrites values greater than 1.
- j
if set to true, servers will block until write operations have been committed to the journal. Cannot be used in combination with
fsync
. Prior to MongoDB 2.6 this option was ignored if the server was running without journaling. Starting with MongoDB 2.6 write operations will fail with an exception if this option is used when the server is running without journaling.- fsync
If set to 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 withj
.
- Source
- WriteConcern.scala
- Alphabetic
- By Inheritance
- WriteConcern
- Serializable
- Product
- Equals
- AnyRef
- Any
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new WriteConcern(minNumberOfWrites: Option[Int] = Some(1), writeMode: Option[String] = None, timeout: FiniteDuration = Duration.Zero, j: Option[Boolean] = Some(true), fsync: Option[Boolean] = None)
- minNumberOfWrites
how many servers should confirm a write before the operation is considered successful. When set to 0 - requests no acknowledgment of the write operation. If you also set waitForAcknowledge to true, that prevails to request acknowledgment from the standalone mongod or the primary of a replica set. When set to 1 - requests acknowledgment that the write operation has propagated to the standalone mongod or the primary in a replica set. This is the default. When set to greater than 1 - requires acknowledgment from the primary and as many additional data-bearing secondaries to meet the specified value. For example, consider a 3-member replica set with no arbiters. Specifying 2 would require acknowledgment from the primary and one of the secondaries. Specifying 3 would require acknowledgment from the primary and both secondaries.
- writeMode
When set to "majority" - requests acknowledgment that write operations have propagated to the calculated majority of the data-bearing voting members (i.e. primary and secondaries with members[n].votes greater than 0). When set to a
custom write concern name
- Requests acknowledgment that the write operations have propagated to tagged members that satisfy the custom write concern defined in settings.getLastErrorModes. This takes priority over minNumberOfWrites.- timeout
specifies a time limit for the write concern. This is only applicable for minNumberOfWrites values greater than 1.
- j
if set to true, servers will block until write operations have been committed to the journal. Cannot be used in combination with
fsync
. Prior to MongoDB 2.6 this option was ignored if the server was running without journaling. Starting with MongoDB 2.6 write operations will fail with an exception if this option is used when the server is running without journaling.- fsync
If set to 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 withj
.
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- def ->[B](y: B): (WriteConcern, B)
- Implicit
- This member is added by an implicit conversion from WriteConcern toArrowAssoc[WriteConcern] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc
- Annotations
- @inline()
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def ensuring(cond: (WriteConcern) => Boolean, msg: => Any): WriteConcern
- Implicit
- This member is added by an implicit conversion from WriteConcern toEnsuring[WriteConcern] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
- def ensuring(cond: (WriteConcern) => Boolean): WriteConcern
- Implicit
- This member is added by an implicit conversion from WriteConcern toEnsuring[WriteConcern] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
- def ensuring(cond: Boolean, msg: => Any): WriteConcern
- Implicit
- This member is added by an implicit conversion from WriteConcern toEnsuring[WriteConcern] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
- def ensuring(cond: Boolean): WriteConcern
- Implicit
- This member is added by an implicit conversion from WriteConcern toEnsuring[WriteConcern] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def formatted(fmtstr: String): String
- Implicit
- This member is added by an implicit conversion from WriteConcern toStringFormat[WriteConcern] performed by method StringFormat in scala.Predef.
- Definition Classes
- StringFormat
- Annotations
- @inline()
- val fsync: Option[Boolean]
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val j: Option[Boolean]
- val minNumberOfWrites: Option[Int]
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- val timeout: FiniteDuration
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- val writeMode: Option[String]
Deprecated Value Members
- def →[B](y: B): (WriteConcern, B)
- Implicit
- This member is added by an implicit conversion from WriteConcern toArrowAssoc[WriteConcern] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc
- Annotations
- @deprecated
- Deprecated
(Since version 2.13.0) Use
->
instead. If you still wish to display it as one character, consider using a font with programming ligatures such as Fira Code.