Package | Description |
---|---|
com.mongodb |
Main package with core files.
|
com.mongodb.gridfs |
GridFS tools.
|
Modifier and Type | Class and Description |
---|---|
class |
DBApiLayer
Deprecated.
This class is NOT part of the public API. It will be dropped in 3.x releases.
|
Modifier and Type | Method and Description |
---|---|
static DB |
Mongo.connect(DBAddress addr)
Deprecated.
Please use
Mongo.getDB(String) instead. |
DB |
MongoURI.connectDB()
Returns the DB object from a newly created Mongo instance based on this URI.
|
DB |
MongoURI.connectDB(Mongo mongo)
Returns the URI's DB object from a given Mongo instance.
|
DB |
DBRefBase.getDB()
Deprecated.
deprecated because
DBRefBase.fetch() is deprecated |
DB |
DBCollection.getDB()
Returns the database this collection is a member of.
|
DB |
Mongo.getDB(String dbname)
Gets a database object from this MongoDB instance.
|
DB |
DB.getSisterDB(String name)
Gets another database on same server
|
Modifier and Type | Method and Description |
---|---|
Collection<DB> |
Mongo.getUsedDatabases()
Returns the list of databases used by the driver since this Mongo instance was created.
|
Modifier and Type | Method and Description |
---|---|
com.mongodb.Response |
DBTCPConnector.call(DB db,
DBCollection coll,
com.mongodb.OutMessage m,
ServerAddress hostNeeded,
DBDecoder decoder)
Deprecated.
|
com.mongodb.Response |
DBConnector.call(DB db,
DBCollection coll,
com.mongodb.OutMessage m,
ServerAddress hostNeeded,
DBDecoder decoder)
Deprecated.
does a read operation on the database
|
com.mongodb.Response |
DBTCPConnector.call(DB db,
DBCollection coll,
com.mongodb.OutMessage m,
ServerAddress hostNeeded,
int retries)
Deprecated.
|
com.mongodb.Response |
DBConnector.call(DB db,
DBCollection coll,
com.mongodb.OutMessage m,
ServerAddress hostNeeded,
int retries)
Deprecated.
does a read operation on the database
|
com.mongodb.Response |
DBTCPConnector.call(DB db,
DBCollection coll,
com.mongodb.OutMessage m,
ServerAddress hostNeeded,
int retries,
ReadPreference readPref,
DBDecoder decoder)
Deprecated.
|
com.mongodb.Response |
DBConnector.call(DB db,
DBCollection coll,
com.mongodb.OutMessage m,
ServerAddress hostNeeded,
int retries,
ReadPreference readPref,
DBDecoder decoder)
Deprecated.
does a read operation on the database
|
DBCollection |
MongoURI.connectCollection(DB db)
Returns the URI's Collection from a given DB object.
|
static DBObject |
DBRef.fetch(DB db,
DBObject ref)
Deprecated.
use
DBCollection.findOne(Object) instead |
WriteResult |
DBTCPConnector.say(DB db,
com.mongodb.OutMessage m,
WriteConcern concern)
Deprecated.
|
WriteResult |
DBConnector.say(DB db,
com.mongodb.OutMessage m,
WriteConcern concern)
Deprecated.
does a write operation
|
WriteResult |
DBTCPConnector.say(DB db,
com.mongodb.OutMessage m,
WriteConcern concern,
ServerAddress hostNeeded)
Deprecated.
|
WriteResult |
DBConnector.say(DB db,
com.mongodb.OutMessage m,
WriteConcern concern,
ServerAddress hostNeeded)
Deprecated.
does a write operation
|
Constructor and Description |
---|
DBCollection(DB base,
String name)
Initializes a new collection.
|
DBRef(DB db,
BSONObject o)
Deprecated.
Deprecated because
DBRefBase.fetch() is deprecated. Use DBRef.DBRef(String, Object) instead |
DBRef(DB db,
String ns,
Object id)
Deprecated.
Deprecated because
DBRefBase.fetch() is deprecated. Use DBRef.DBRef(String, Object) instead |
DBRefBase(DB db,
String ns,
Object id)
Deprecated.
Deprecated because
DBRefBase.fetch() is deprecated. Use DBRefBase.DBRefBase(String, Object) instead |
Modifier and Type | Field and Description |
---|---|
protected DB |
GridFS._db
Deprecated.
Please use
GridFS.getDB() for access. |
Modifier and Type | Method and Description |
---|---|
DB |
GridFS.getDB()
Gets the database used.
|
Constructor and Description |
---|
GridFS(DB db)
Creates a GridFS instance for the default bucket "fs" in the given database.
|
GridFS(DB db,
String bucket)
Creates a GridFS instance for the specified bucket in the given database.
|