Package | Description |
---|---|
com.mongodb |
The core mongodb package
|
com.mongodb.connection |
Contains classes that manage connecting to MongoDB servers.
|
Modifier and Type | Field and Description |
---|---|
private java.util.List<TagSet> |
TaggableReadPreference.tagSetList |
Modifier and Type | Method and Description |
---|---|
private TagSet |
ConnectionString.getTags(java.lang.String tagSetString) |
Modifier and Type | Method and Description |
---|---|
java.util.List<TagSet> |
TaggableReadPreference.getTagSetList()
Gets the list of tag sets as a list of
TagSet instances. |
Modifier and Type | Method and Description |
---|---|
boolean |
TagSet.containsAll(TagSet tagSet)
Returns true if this tag set contains all of the elements of the specified tag set.
|
static TaggableReadPreference |
ReadPreference.nearest(TagSet tagSet)
Gets a read preference that forces reads to the primary or a secondary with the given set of tags.
|
static TaggableReadPreference |
ReadPreference.nearest(TagSet tagSet,
long maxStaleness,
java.util.concurrent.TimeUnit timeUnit)
Gets a read preference that forces reads to the primary or a secondary with the given set of tags that is less stale than the
given maximum.
|
static TaggableReadPreference |
ReadPreference.primaryPreferred(TagSet tagSet)
Gets a read preference that forces reads to the primary if available, otherwise to a secondary with the given set of tags.
|
static TaggableReadPreference |
ReadPreference.primaryPreferred(TagSet tagSet,
long maxStaleness,
java.util.concurrent.TimeUnit timeUnit)
Gets a read preference that forces reads to the primary if available, otherwise to a secondary with the given set of tags
that is less stale than the given maximum.
|
static TaggableReadPreference |
ReadPreference.secondary(TagSet tagSet)
Gets a read preference that forces reads to a secondary with the given set of tags.
|
static TaggableReadPreference |
ReadPreference.secondary(TagSet tagSet,
long maxStaleness,
java.util.concurrent.TimeUnit timeUnit)
Gets a read preference that forces reads to a secondary with the given set of tags that is less stale than the given maximum.
|
static TaggableReadPreference |
ReadPreference.secondaryPreferred(TagSet tagSet)
Gets a read preference that forces reads to a secondary with the given set of tags, or the primary is none are available.
|
static TaggableReadPreference |
ReadPreference.secondaryPreferred(TagSet tagSet,
long maxStaleness,
java.util.concurrent.TimeUnit timeUnit)
Gets a read preference that forces reads to a secondary with the given set of tags that is less stale than the given maximum,
or the primary is none are available.
|
private BsonDocument |
TaggableReadPreference.toDocument(TagSet tagSet) |
Modifier and Type | Method and Description |
---|---|
private ReadPreference |
ConnectionString.buildReadPreference(java.lang.String readPreferenceType,
java.util.List<TagSet> tagSetList,
long maxStalenessSeconds) |
static TaggableReadPreference |
ReadPreference.nearest(java.util.List<TagSet> tagSetList)
Gets a read preference that forces reads to the primary or a secondary with one of the given sets of tags.
|
static TaggableReadPreference |
ReadPreference.nearest(java.util.List<TagSet> tagSetList,
long maxStaleness,
java.util.concurrent.TimeUnit timeUnit)
Gets a read preference that forces reads to the primary or a secondary with one of the given sets of tags that is less stale than
the given maximum.
|
static TaggableReadPreference |
ReadPreference.primaryPreferred(java.util.List<TagSet> tagSetList)
Gets a read preference that forces reads to the primary if available, otherwise to a secondary with one of the given sets of tags.
|
static TaggableReadPreference |
ReadPreference.primaryPreferred(java.util.List<TagSet> tagSetList,
long maxStaleness,
java.util.concurrent.TimeUnit timeUnit)
Gets a read preference that forces reads to the primary if available, otherwise to a secondary with one of the given sets of tags
that is less stale than the given maximum.
|
static TaggableReadPreference |
ReadPreference.secondary(java.util.List<TagSet> tagSetList)
Gets a read preference that forces reads to a secondary with one of the given sets of tags.
|
static TaggableReadPreference |
ReadPreference.secondary(java.util.List<TagSet> tagSetList,
long maxStaleness,
java.util.concurrent.TimeUnit timeUnit)
Gets a read preference that forces reads to a secondary with one of the given sets of tags that is less stale than
the given maximum.
|
static TaggableReadPreference |
ReadPreference.secondaryPreferred(java.util.List<TagSet> tagSetList)
Gets a read preference that forces reads to a secondary with one of the given sets of tags.
|
static TaggableReadPreference |
ReadPreference.secondaryPreferred(java.util.List<TagSet> tagSetList,
long maxStaleness,
java.util.concurrent.TimeUnit timeUnit)
Gets a read preference that forces reads to a secondary with one of the given sets of tags that is less stale than
the given maximum.
|
static TaggableReadPreference |
ReadPreference.valueOf(java.lang.String name,
java.util.List<TagSet> tagSetList)
Creates a taggable read preference from the given read preference name and list of tag sets.
|
static TaggableReadPreference |
ReadPreference.valueOf(java.lang.String name,
java.util.List<TagSet> tagSetList,
long maxStaleness,
java.util.concurrent.TimeUnit timeUnit)
Creates a taggable read preference from the given read preference name, list of tag sets, and max allowable staleness of secondaries.
|
private static TaggableReadPreference |
ReadPreference.valueOf(java.lang.String name,
java.util.List<TagSet> tagSetList,
java.lang.Long maxStaleness,
java.util.concurrent.TimeUnit timeUnit) |
Constructor and Description |
---|
NearestReadPreference(java.util.List<TagSet> tagSetList,
java.lang.Long maxStaleness,
java.util.concurrent.TimeUnit timeUnit) |
PrimaryPreferredReadPreference(java.util.List<TagSet> tagSetList,
java.lang.Long maxStaleness,
java.util.concurrent.TimeUnit timeUnit) |
SecondaryPreferredReadPreference(java.util.List<TagSet> tagSetList,
java.lang.Long maxStaleness,
java.util.concurrent.TimeUnit timeUnit) |
SecondaryReadPreference(java.util.List<TagSet> tagSetList,
java.lang.Long maxStaleness,
java.util.concurrent.TimeUnit timeUnit) |
TaggableReadPreference(java.util.List<TagSet> tagSetList,
java.lang.Long maxStaleness,
java.util.concurrent.TimeUnit timeUnit) |
Modifier and Type | Field and Description |
---|---|
private TagSet |
ServerDescription.tagSet |
private TagSet |
ServerDescription.Builder.tagSet |
Modifier and Type | Method and Description |
---|---|
TagSet |
ServerDescription.getTagSet()
A set of all tags assigned to this member.
|
private static TagSet |
DescriptionHelper.getTagSetFromDocument(BsonDocument tagsDocuments) |
Modifier and Type | Method and Description |
---|---|
java.util.List<ServerDescription> |
ClusterDescription.getAnyPrimaryOrSecondary(TagSet tagSet)
Deprecated.
Replace with a filter on ServerDescription in the caller
|
java.util.List<ServerDescription> |
ClusterDescription.getSecondaries(TagSet tagSet)
Deprecated.
Replace with a filter on ServerDescription in the caller
|
boolean |
ServerDescription.hasTags(TagSet desiredTags)
Returns true if the server has the given tags.
|
ServerDescription.Builder |
ServerDescription.Builder.tagSet(TagSet tagSet)
A set of any tags assigned to this member.
|