com.mongodb.casbah

WriteConcern

object WriteConcern extends AnyRef

Helper class for creating WriteConcern instances

Source
WriteConcern.scala
Since

2.0

See also

JWriteConcern

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. WriteConcern
  2. AnyRef
  3. Any
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. val Acknowledged: WriteConcern

    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.

    Since

    2.7

  7. val FsyncSafe: WriteConcern

    Exceptions are raised for network issues and server errors; Write operations wait for the server to flush data to disk

  8. val Fsynced: WriteConcern

    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.

    Since

    2.7

  9. val JournalSafe: WriteConcern

    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

  10. val Journaled: WriteConcern

    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.

    Since

    2.7

  11. val Majority: WriteConcern

    Exceptions are raised for network issues and server errors; waits on a majority of servers for the write operation

  12. val Normal: WriteConcern

    Exceptions are raised for network issues but not server errors.

  13. val ReplicaAcknowledged: WriteConcern

    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.

    Since

    2.7

  14. val ReplicasSafe: WriteConcern

    Exceptions are raised for network issues and server errors; waits for at least 2 servers for the write operation.

  15. val Safe: WriteConcern

    Exceptions are raised for network issues and server errors; waits on a server for the write operation

  16. val Unacknowledged: WriteConcern

    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.

    Since

    2.7

  17. def apply(w: Int, wTimeout: Int = 0, fsync: Boolean = false, j: Boolean = false, continueInsertOnError: Boolean = false): WriteConcern

    Create a new WriteConcern object.

    Create a new WriteConcern object.

    w represents # of servers:

    • w=-1 None, no checking is done
    • w=0 None, network socket errors raised
    • w=1 Checks server for errors as well as network socket errors raised
    • w>1 Checks servers (w) for errors as well as network socket errors raised
    w

    (Int) Specifies the number of servers to wait for on the write operation, and exception raising behavior. Defaults to 0

    wTimeout

    (Int) Specifies the number MS to wait for the server operations to write. Defaults to 0 (no timeout)

    fsync

    (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

    j

    whether writes should wait for a journaling group commit. Cannot be used with fsync.

    continueInsertOnError

    if an error occurs during a bulk insert should the inserts continue anyway

  18. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  19. def clone(): AnyRef

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  20. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  21. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  22. def finalize(): Unit

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  23. final def getClass(): java.lang.Class[_]

    Definition Classes
    AnyRef → Any
  24. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  25. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  26. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  27. final def notify(): Unit

    Definition Classes
    AnyRef
  28. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  29. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  30. def toString(): String

    Definition Classes
    AnyRef → Any
  31. def valueOf(name: String): Option[WriteConcern]

    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.

  32. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  33. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  34. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  35. def withRule(w: String, wTimeout: Int = 0, fsync: Boolean = false, j: Boolean = false, continueInsertOnError: Boolean = false): WriteConcern

    Create a new WriteConcern object.

    Create a new WriteConcern object.

    w is a String representing a valid getLastErrorMode rule (or "majority")

    w

    (Int) Specifies the getLastErrorMode to apply to the write

    wTimeout

    (Int) Specifies the number MS to wait for the server operations to write. Defaults to 0 (no timeout)

    fsync

    (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

    j

    whether writes should wait for a journaling group commit. Cannot be used with fsync.

    continueInsertOnError

    if an error occurs during a bulk insert should the inserts continue anyway

Deprecated Value Members

  1. val ErrorsIgnored: WriteConcern

    No exceptions are raised, even for network issues.

    No exceptions are raised, even for network issues.

    Annotations
    @deprecated
    Deprecated

    (Since version 2.7.0) This write concern will no longer supported

    Since

    2.7

  2. val None: WriteConcern

    No exceptions are raised, even for network issues

    No exceptions are raised, even for network issues

    Annotations
    @deprecated
    Deprecated

    (Since version 2.7.0) This write concern will no longer supported

Inherited from AnyRef

Inherited from Any