Package | Description |
---|---|
com.mongodb |
Main package with core files.
|
Modifier and Type | Class and Description |
---|---|
static class |
ReadPreference.TaggedReadPreference
Deprecated.
As of release 2.9, replaced by
ReadPreference.secondaryPreferred(DBObject firstTagSet, DBObject... remainingTagSets) |
class |
TaggableReadPreference
Abstract base class for all preference which can be combined with tags
|
Modifier and Type | Field and Description |
---|---|
static ReadPreference |
ReadPreference.PRIMARY
Deprecated.
As of release 2.9.0, replaced by
ReadPreference.primary() |
ReadPreference |
MongoOptions.readPreference
Specifies the read preference.
|
static ReadPreference |
ReadPreference.SECONDARY
Deprecated.
As of release 2.9.0, replaced by
ReadPreference.secondaryPreferred() |
Modifier and Type | Method and Description |
---|---|
ReadPreference |
DBCursor.getReadPreference()
Gets the default read preference
|
ReadPreference |
MapReduceCommand.getReadPreference()
Gets the read preference
|
ReadPreference |
MongoClientOptions.getReadPreference()
The read preference to use for queries, map-reduce, aggregation, and count.
|
ReadPreference |
DB.getReadPreference()
Gets the default read preference
|
ReadPreference |
Mongo.getReadPreference()
Gets the default read preference
|
ReadPreference |
MongoOptions.getReadPreference() |
ReadPreference |
DBCollection.getReadPreference()
Gets the read preference
|
static ReadPreference |
ReadPreference.nearest() |
static ReadPreference |
ReadPreference.primary() |
static ReadPreference |
ReadPreference.primaryPreferred() |
static ReadPreference |
ReadPreference.secondary() |
static ReadPreference |
ReadPreference.secondaryPreferred() |
static ReadPreference |
ReadPreference.valueOf(String name) |
static ReadPreference |
ReadPreference.withTags(DBObject tags)
Deprecated.
As of release 2.9.0, replaced by
ReadPreference.secondaryPreferred(DBObject firstTagSet, DBObject... remainingTagSets) |
static ReadPreference |
ReadPreference.withTags(Map<String,String> tags)
Deprecated.
As of release 2.9.0, replaced by
ReadPreference.secondaryPreferred(DBObject firstTagSet, DBObject... remainingTagSets) |
Modifier and Type | Method and Description |
---|---|
com.mongodb.Response |
DBTCPConnector.call(DB db,
DBCollection coll,
com.mongodb.OutMessage m,
ServerAddress hostNeeded,
int retries,
ReadPreference readPref,
DBDecoder decoder) |
com.mongodb.Response |
DBConnector.call(DB db,
DBCollection coll,
com.mongodb.OutMessage m,
ServerAddress hostNeeded,
int retries,
ReadPreference readPref,
DBDecoder decoder)
does a read operation on the database
|
CommandResult |
DB.command(DBObject cmd,
int options,
ReadPreference readPrefs)
Executes a database command.
|
CommandResult |
DB.command(DBObject cmd,
int options,
ReadPreference readPrefs,
DBEncoder encoder)
Executes a database command.
|
long |
DBCollection.count(DBObject query,
ReadPreference readPrefs)
returns the number of documents that match a query.
|
List |
DBCollection.distinct(String key,
DBObject query,
ReadPreference readPrefs)
find distinct values for a key
|
List |
DBCollection.distinct(String key,
ReadPreference readPrefs)
find distinct values for a key
|
DBObject |
DBCollection.findOne(DBObject o,
DBObject fields,
DBObject orderBy,
ReadPreference readPref)
Returns a single object from this collection matching the query.
|
DBObject |
DBCollection.findOne(DBObject o,
DBObject fields,
ReadPreference readPref)
Returns a single object from this collection matching the query.
|
long |
DBCollection.getCount(DBObject query,
DBObject fields,
long limit,
long skip,
ReadPreference readPrefs)
Returns the number of documents in the collection
that match the specified query
|
long |
DBCollection.getCount(DBObject query,
DBObject fields,
ReadPreference readPrefs)
calls
DBCollection.getCount(com.mongodb.DBObject, com.mongodb.DBObject, long, long, com.mongodb.ReadPreference) with limit=0 and skip=0 |
long |
DBCollection.getCount(ReadPreference readPrefs)
calls
DBCollection.getCount(com.mongodb.DBObject, com.mongodb.DBObject, com.mongodb.ReadPreference) with empty query and null fields. |
DBObject |
DBCollection.group(DBObject key,
DBObject cond,
DBObject initial,
String reduce,
String finalize,
ReadPreference readPrefs)
Applies a group operation
|
DBObject |
DBCollection.group(GroupCommand cmd,
ReadPreference readPrefs)
Applies a group operation
|
MapReduceOutput |
DBCollection.mapReduce(String map,
String reduce,
String outputTarget,
MapReduceCommand.OutputType outputType,
DBObject query,
ReadPreference readPrefs)
performs a map reduce operation
Specify an outputType to control job execution
* INLINE - Return results inline
* REPLACE - Replace the output collection with the job output
* MERGE - Merge the job output with the existing contents of outputTarget
* REDUCE - Reduce the job output with the existing contents of
outputTarget
|
MongoClientOptions.Builder |
MongoClientOptions.Builder.readPreference(ReadPreference readPreference)
Sets the read preference.
|
DBCursor |
DBCursor.setReadPreference(ReadPreference preference)
Sets the read preference for this cursor.
|
void |
MapReduceCommand.setReadPreference(ReadPreference preference)
Sets the read preference for this command.
|
void |
DB.setReadPreference(ReadPreference preference)
Sets the read preference for this database.
|
void |
Mongo.setReadPreference(ReadPreference preference)
Sets the read preference for this database.
|
void |
MongoOptions.setReadPreference(ReadPreference readPreference) |
void |
DBCollection.setReadPreference(ReadPreference preference)
Sets the read preference for this collection.
|
Constructor and Description |
---|
DBCursor(DBCollection collection,
DBObject q,
DBObject k,
ReadPreference preference)
Initializes a new database cursor
|