Example usage for Java com.mongodb ReadPreference fields, constructors, methods, implement or subclass
The text is from its open source code.
ReadPreference | PRIMARY_PREFERRED |
String | getName() Gets the name of this read preference. |
boolean | isSlaveOk() True if this read preference allows reading from a secondary member of a replica set. |
ReadPreference | primaryPreferred(final long maxStaleness, final TimeUnit timeUnit) Gets a read preference that forces reads to the primary if available, otherwise to a secondary. |
ReadPreference | primaryPreferred() Gets a read preference that forces reads to the primary if available, otherwise to a secondary. |
ReadPreference | secondaryPreferred() Gets a read preference that forces reads to a secondary if one is available, otherwise to the primary. |
ReadPreference | secondaryPreferred(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. |
TaggableReadPreference | valueOf(final String name, final List Creates a taggable read preference from the given read preference name and list of tag sets. |
ReadPreference | valueOf(final String name) Creates a read preference from the given read preference name. |