Packages

o

org.mongodb.scala

ReadPreference

object ReadPreference

The preferred replica set members to which a query or command can be sent.

Since

1.0

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ReadPreference
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
  10. def hashCode(): Int
    Definition Classes
    AnyRef → Any
  11. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  12. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. def nearest(tagSetList: Seq[TagSet], maxStaleness: Duration): TaggableReadPreference

    Gets a read preference that forces reads to the primary or a secondary with one of the given sets of tags.

    Gets a read preference that forces reads to the primary or a secondary with one of the given sets of tags. The driver will look for a secondary with each tag set in the given list, stopping after one is found, or the primary if none are available.

    tagSetList

    the list of tag sets to limit the list of secondaries to

    maxStaleness

    the max allowable staleness of secondaries. The minimum value is either 90 seconds, or the heartbeat frequency plus 10 seconds, whichever is greatest.

    returns

    ReadPreference which reads nearest node respective of tags.

    Since

    1.2

    Note

    Requires MongoDB 3.4 or greater

  14. def nearest(tagSetList: Seq[TagSet]): TaggableReadPreference

    Gets a read preference that forces reads to the primary or a secondary with one of the given sets of tags.

    Gets a read preference that forces reads to the primary or a secondary with one of the given sets of tags. The driver will look for a secondary with each tag set in the given list, stopping after one is found, or the primary if none are available.

    tagSetList

    the list of tag sets to limit the list of secondaries to

    returns

    ReadPreference which reads nearest node respective of tags.

  15. def nearest(tagSet: TagSet, maxStaleness: Duration): TaggableReadPreference

    Gets a read preference that forces reads to the primary or a secondary with the given set of tags.

    Gets a read preference that forces reads to the primary or a secondary with the given set of tags.

    tagSet

    the set of tags to limit the list of secondaries to

    maxStaleness

    the max allowable staleness of secondaries. The minimum value is either 90 seconds, or the heartbeat frequency plus 10 seconds, whichever is greatest.

    returns

    ReadPreference which reads nearest node respective of tags.

    Since

    1.2

    Note

    Requires MongoDB 3.4 or greater

  16. def nearest(tagSet: TagSet): TaggableReadPreference

    Gets a read preference that forces reads to the primary or a secondary with the given set of tags.

    Gets a read preference that forces reads to the primary or a secondary with the given set of tags.

    tagSet

    the set of tags to limit the list of secondaries to

    returns

    ReadPreference which reads nearest node respective of tags.

  17. def nearest(maxStaleness: Duration): ReadPreference

    Gets a read preference that forces reads to a primary or a secondary.

    Gets a read preference that forces reads to a primary or a secondary.

    maxStaleness

    the max allowable staleness of secondaries. The minimum value is either 90 seconds, or the heartbeat frequency plus 10 seconds, whichever is greatest.

    returns

    ReadPreference which reads nearest

    Since

    1.2

    Note

    Requires MongoDB 3.4 or greater

  18. def nearest(): ReadPreference

    Gets a read preference that forces reads to a primary or a secondary.

    Gets a read preference that forces reads to a primary or a secondary.

    returns

    ReadPreference which reads nearest

  19. final def notify(): Unit
    Definition Classes
    AnyRef
  20. final def notifyAll(): Unit
    Definition Classes
    AnyRef
  21. def primary(): ReadPreference

    Gets a read preference that forces read to the primary.

    Gets a read preference that forces read to the primary.

    returns

    ReadPreference which reads from primary only

  22. def primaryPreferred(tagSetList: Seq[TagSet], maxStaleness: Duration): TaggableReadPreference

    Gets a read preference that forces reads to the primary if available, otherwise to a secondary with one of the given sets of tags.

    Gets a read preference that forces reads to the primary if available, otherwise to a secondary with one of the given sets of tags. The driver will look for a secondary with each tag set in the given list, stopping after one is found, or failing if no secondary can be found that matches any of the tag sets in the list.

    tagSetList

    the list of tag sets to limit the list of secondaries to

    maxStaleness

    the max allowable staleness of secondaries. The minimum value is either 90 seconds, or the heartbeat frequency plus 10 seconds, whichever is greatest.

    returns

    ReadPreference which reads primary if available, otherwise a secondary respective of tags.

    Since

    1.2

    Note

    Requires MongoDB 3.4 or greater

  23. def primaryPreferred(tagSetList: Seq[TagSet]): TaggableReadPreference

    Gets a read preference that forces reads to the primary if available, otherwise to a secondary with one of the given sets of tags.

    Gets a read preference that forces reads to the primary if available, otherwise to a secondary with one of the given sets of tags. The driver will look for a secondary with each tag set in the given list, stopping after one is found, or failing if no secondary can be found that matches any of the tag sets in the list.

    tagSetList

    the list of tag sets to limit the list of secondaries to

    returns

    ReadPreference which reads primary if available, otherwise a secondary respective of tags.

  24. def primaryPreferred(tagSet: TagSet, maxStaleness: Duration): TaggableReadPreference

    Gets a read preference that forces reads to the primary if available, otherwise to a secondary with the given set of tags.

    Gets a read preference that forces reads to the primary if available, otherwise to a secondary with the given set of tags.

    tagSet

    the set of tags to limit the list of secondaries to.

    maxStaleness

    the max allowable staleness of secondaries. The minimum value is either 90 seconds, or the heartbeat frequency plus 10 seconds, whichever is greatest.

    returns

    ReadPreference which reads primary if available, otherwise a secondary respective of tags.

    Since

    1.2

    Note

    Requires MongoDB 3.4 or greater

  25. def primaryPreferred(tagSet: TagSet): TaggableReadPreference

    Gets a read preference that forces reads to the primary if available, otherwise to a secondary with the given set of tags.

    Gets a read preference that forces reads to the primary if available, otherwise to a secondary with the given set of tags.

    tagSet

    the set of tags to limit the list of secondaries to.

    returns

    ReadPreference which reads primary if available, otherwise a secondary respective of tags.

  26. def primaryPreferred(maxStaleness: Duration): ReadPreference

    Gets a read preference that forces reads to the primary if available, otherwise to a secondary.

    Gets a read preference that forces reads to the primary if available, otherwise to a secondary.

    maxStaleness

    the max allowable staleness of secondaries. The minimum value is either 90 seconds, or the heartbeat frequency plus 10 seconds, whichever is greatest.

    returns

    ReadPreference which reads primary if available.

    Since

    1.2

    Note

    Requires MongoDB 3.4 or greater

  27. def primaryPreferred(): ReadPreference

    Gets a read preference that forces reads to the primary if available, otherwise to a secondary.

    Gets a read preference that forces reads to the primary if available, otherwise to a secondary.

    returns

    ReadPreference which reads primary if available.

  28. def secondary(tagSetList: Seq[TagSet], maxStaleness: Duration): TaggableReadPreference

    Gets a read preference that forces reads to a secondary with one of the given sets of tags.

    Gets a read preference that forces reads to a secondary with one of the given sets of tags. The driver will look for a secondary with each tag set in the given list, stopping after one is found, or failing if no secondary can be found that matches any of the tag sets in the list.

    tagSetList

    the list of tag sets to limit the list of secondaries to

    maxStaleness

    the max allowable staleness of secondaries. The minimum value is either 90 seconds, or the heartbeat frequency plus 10 seconds, whichever is greatest.

    returns

    ReadPreference which reads secondary respective of tags.

    Since

    1.2

    Note

    Requires MongoDB 3.4 or greater

  29. def secondary(tagSetList: Seq[TagSet]): TaggableReadPreference

    Gets a read preference that forces reads to a secondary with one of the given sets of tags.

    Gets a read preference that forces reads to a secondary with one of the given sets of tags. The driver will look for a secondary with each tag set in the given list, stopping after one is found, or failing if no secondary can be found that matches any of the tag sets in the list.

    tagSetList

    the list of tag sets to limit the list of secondaries to

    returns

    ReadPreference which reads secondary respective of tags.

  30. def secondary(tagSet: TagSet, maxStaleness: Duration): TaggableReadPreference

    Gets a read preference that forces reads to a secondary with the given set of tags.

    Gets a read preference that forces reads to a secondary with the given set of tags.

    tagSet

    the set of tags to limit the list of secondaries to

    maxStaleness

    the max allowable staleness of secondaries. The minimum value is either 90 seconds, or the heartbeat frequency plus 10 seconds, whichever is greatest.

    returns

    ReadPreference which reads secondary respective of tags.

    Since

    1.2

    Note

    Requires MongoDB 3.4 or greater

  31. def secondary(tagSet: TagSet): TaggableReadPreference

    Gets a read preference that forces reads to a secondary with the given set of tags.

    Gets a read preference that forces reads to a secondary with the given set of tags.

    tagSet

    the set of tags to limit the list of secondaries to

    returns

    ReadPreference which reads secondary respective of tags.

  32. def secondary(maxStaleness: Duration): ReadPreference

    Gets a read preference that forces reads to a secondary.

    Gets a read preference that forces reads to a secondary.

    maxStaleness

    the max allowable staleness of secondaries. The minimum value is either 90 seconds, or the heartbeat frequency plus 10 seconds, whichever is greatest.

    returns

    ReadPreference which reads secondary.

    Since

    1.2

    Note

    Requires MongoDB 3.4 or greater

  33. def secondary(): ReadPreference

    Gets a read preference that forces reads to a secondary.

    Gets a read preference that forces reads to a secondary.

    returns

    ReadPreference which reads secondary.

  34. def secondaryPreferred(tagSetList: Seq[TagSet], maxStaleness: Duration): TaggableReadPreference

    Gets a read preference that forces reads to a secondary with one of the given sets of tags.

    Gets a read preference that forces reads to a secondary with one of the given sets of tags. The driver will look for a secondary with each tag set in the given list, stopping after one is found, or the primary if none are available.

    tagSetList

    the list of tag sets to limit the list of secondaries to

    maxStaleness

    the max allowable staleness of secondaries. The minimum value is either 90 seconds, or the heartbeat frequency plus 10 seconds, whichever is greatest.

    returns

    ReadPreference which reads secondary if available respective of tags, otherwise from primary irrespective of tags.

    Since

    1.2

    Note

    Requires MongoDB 3.4 or greater

  35. def secondaryPreferred(tagSetList: Seq[TagSet]): TaggableReadPreference

    Gets a read preference that forces reads to a secondary with one of the given sets of tags.

    Gets a read preference that forces reads to a secondary with one of the given sets of tags. The driver will look for a secondary with each tag set in the given list, stopping after one is found, or the primary if none are available.

    tagSetList

    the list of tag sets to limit the list of secondaries to

    returns

    ReadPreference which reads secondary if available respective of tags, otherwise from primary irrespective of tags.

  36. def secondaryPreferred(tagSet: TagSet, maxStaleness: Duration): TaggableReadPreference

    Gets a read preference that forces reads to a secondary with the given set of tags, or the primary is none are available.

    Gets a read preference that forces reads to a secondary with the given set of tags, or the primary is none are available.

    tagSet

    the set of tags to limit the list of secondaries to

    maxStaleness

    the max allowable staleness of secondaries. The minimum value is either 90 seconds, or the heartbeat frequency plus 10 seconds, whichever is greatest.

    returns

    ReadPreference which reads secondary if available respective of tags, otherwise from primary irrespective of tags.

    Since

    1.2

    Note

    Requires MongoDB 3.4 or greater

  37. def secondaryPreferred(tagSet: TagSet): TaggableReadPreference

    Gets a read preference that forces reads to a secondary with the given set of tags, or the primary is none are available.

    Gets a read preference that forces reads to a secondary with the given set of tags, or the primary is none are available.

    tagSet

    the set of tags to limit the list of secondaries to

    returns

    ReadPreference which reads secondary if available respective of tags, otherwise from primary irrespective of tags.

  38. def secondaryPreferred(maxStaleness: Duration): ReadPreference

    Gets a read preference that forces reads to a secondary if one is available, otherwise to the primary.

    Gets a read preference that forces reads to a secondary if one is available, otherwise to the primary.

    maxStaleness

    the max allowable staleness of secondaries. The minimum value is either 90 seconds, or the heartbeat frequency plus 10 seconds, whichever is greatest.

    returns

    ReadPreference which reads secondary if available, otherwise from primary.

    Since

    1.2

    Note

    Requires MongoDB 3.4 or greater

  39. def secondaryPreferred(): ReadPreference

    Gets a read preference that forces reads to a secondary if one is available, otherwise to the primary.

    Gets a read preference that forces reads to a secondary if one is available, otherwise to the primary.

    returns

    ReadPreference which reads secondary if available, otherwise from primary.

  40. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  41. def toString(): String
    Definition Classes
    AnyRef → Any
  42. def valueOf(name: String, tagSetList: Seq[TagSet], maxStaleness: Duration): TaggableReadPreference

    Creates a taggable read preference from the given read preference name and list of tag sets.

    Creates a taggable read preference from the given read preference name and list of tag sets.

    name

    the name of the read preference

    tagSetList

    the list of tag sets

    maxStaleness

    the max allowable staleness of secondaries. The minimum value is either 90 seconds, or the heartbeat frequency plus 10 seconds, whichever is greatest.

    returns

    the taggable read preference

    Since

    1.2

    Note

    Requires MongoDB 3.4 or greater

  43. def valueOf(name: String, tagSetList: Seq[TagSet]): TaggableReadPreference

    Creates a taggable read preference from the given read preference name and list of tag sets.

    Creates a taggable read preference from the given read preference name and list of tag sets.

    name

    the name of the read preference

    tagSetList

    the list of tag sets

    returns

    the taggable read preference

  44. def valueOf(name: String): ReadPreference

    Creates a read preference from the given read preference name.

    Creates a read preference from the given read preference name.

    name

    the name of the read preference

    returns

    the read preference

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

Inherited from AnyRef

Inherited from Any

Ungrouped