ReadPreference.secondaryPreferred(DBObject, DBObject...)
@Deprecated public static class ReadPreference.TaggedReadPreference extends ReadPreference
ReadPreference.TaggedReadPreference
PRIMARY, SECONDARY
Constructor and Description |
---|
TaggedReadPreference(DBObject tags)
Deprecated.
|
TaggedReadPreference(Map<String,String> tags)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
String |
getName()
Deprecated.
The name of this read preference.
|
DBObject |
getTags()
Deprecated.
|
boolean |
isSlaveOk()
Deprecated.
True if this read preference allows reading from a secondary member of a replica set.
|
DBObject |
toDBObject()
Deprecated.
Converts this read preference into a
DBObject . |
nearest, nearest, nearest, nearest, primary, primaryPreferred, primaryPreferred, primaryPreferred, primaryPreferred, secondary, secondary, secondary, secondary, secondaryPreferred, secondaryPreferred, secondaryPreferred, secondaryPreferred, valueOf, valueOf, valueOf, withTags, withTags
public TaggedReadPreference(DBObject tags)
public DBObject getTags()
public boolean isSlaveOk()
ReadPreference
isSlaveOk
in class ReadPreference
public DBObject toDBObject()
ReadPreference
DBObject
.toDBObject
in class ReadPreference
DBObject
representation of this preferencepublic String getName()
ReadPreference
getName
in class ReadPreference