Java com.mongodb ReadPreference fields, constructors, methods, implement or subclass

Example usage for Java com.mongodb ReadPreference fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for com.mongodb ReadPreference.

The text is from its open source code.

Field

ReadPreferencePRIMARY_PREFERRED

Method

StringgetName()
Gets the name of this read preference.
booleanisSlaveOk()
True if this read preference allows reading from a secondary member of a replica set.
ReadPreferenceprimaryPreferred(final long maxStaleness, final TimeUnit timeUnit)
Gets a read preference that forces reads to the primary if available, otherwise to a secondary.
ReadPreferenceprimaryPreferred()
Gets a read preference that forces reads to the primary if available, otherwise to a secondary.
ReadPreferencesecondaryPreferred()
Gets a read preference that forces reads to a secondary if one is available, otherwise to the primary.
ReadPreferencesecondaryPreferred(final long maxStaleness, final TimeUnit timeUnit)
Gets a read preference that forces reads to a secondary that is less stale than the given maximumm if one is available, otherwise to the primary.
TaggableReadPreferencevalueOf(final String name, final List tagSetList)
Creates a taggable read preference from the given read preference name and list of tag sets.
ReadPreferencevalueOf(final String name)
Creates a read preference from the given read preference name.