Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • ReadPreference

Index

Constructors

constructor

Properties

mode

mode: string

The ReadPreference mode as listed above.

tags

tags: any

An object representing read preference tags.

Static NEAREST

NEAREST: string

All modes read from among the nearest candidates, but unlike other modes, NEAREST will include both the primary and all secondaries in the random selection.

Static PRIMARY

PRIMARY: string

Read from primary only. All operations produce an error (throw an exception where applicable) if primary is unavailable. Cannot be combined with tags (This is the default.).

Static PRIMARY_PREFERRED

PRIMARY_PREFERRED: string

Read from primary if available, otherwise a secondary.

Static SECONDARY

SECONDARY: string

Read from secondary if available, otherwise error.

Static SECONDARY_PREFERRED

SECONDARY_PREFERRED: string

Read from a secondary if available, otherwise read from the primary.

Methods

isValid

  • isValid(mode: string): boolean

Static isValid

  • isValid(mode: string): boolean

Generated using TypeDoc