ReadPreference

reactivemongo.api.ReadPreference$
See theReadPreference companion trait

ReadPreference utilities and factories.

Attributes

Companion:
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Concise view

Type members

Classlikes

final class Nearest extends ReadPreference

Reads from the faster node (e.g. the node which replies faster than all others), regardless its status (primary or secondary).

Reads from the faster node (e.g. the node which replies faster than all others), regardless its status (primary or secondary).

Attributes

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any
object Nearest

Attributes

Companion:
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Nearest.type
object Primary extends ReadPreference

Reads only from the primary. This is the default choice.

Reads only from the primary. This is the default choice.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Primary.type
final class PrimaryPreferred extends ReadPreference

Reads from the primary if it is available, or secondaries if it is not.

Reads from the primary if it is available, or secondaries if it is not.

Attributes

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any

Attributes

Companion:
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
final class Secondary extends ReadPreference

Reads only from any secondary.

Reads only from any secondary.

Attributes

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any
object Secondary

Attributes

Companion:
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Reads from any secondary, or from the primary if they are not available.

Reads from any secondary, or from the primary if they are not available.

Attributes

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any

Attributes

Companion:
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
object Taggable

Extractor for taggable read preference.

Extractor for taggable read preference.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Value members

Concrete methods

def nearest[T](tags: List[Map[String, String]]): Nearest

Reads from the fastest node (e.g. the node which replies faster than all others) that has the given tags, regardless its status (primary or secondary).

Reads from the fastest node (e.g. the node which replies faster than all others) that has the given tags, regardless its status (primary or secondary).

Attributes

def primary: Primary.type

Reads only from the primary. This is the default choice.

Reads only from the primary. This is the default choice.

Attributes

Reads from any node that has the given tags in the replica set (preferably the primary).

Reads from any node that has the given tags in the replica set (preferably the primary).

Attributes

Reads from a secondary that has the given tags in the replica set.

Reads from a secondary that has the given tags in the replica set.

Attributes

Reads from any node that has the given tags in the replica set (preferably a secondary).

Reads from any node that has the given tags in the replica set (preferably a secondary).

Attributes

Concrete fields

Reads from the nearest node (the node which replies faster than all others), regardless its status (primary or secondary).

Reads from the nearest node (the node which replies faster than all others), regardless its status (primary or secondary).

Attributes

Reads from the primary if it is available, or secondaries if it is not.

Reads from the primary if it is available, or secondaries if it is not.

Attributes

Reads from any secondary, or from the primary if they are not available.

Reads from any secondary, or from the primary if they are not available.

Attributes