|
||||||||||
PREV NEXT | FRAMES NO FRAMES |
Packages that use MongoException | |
---|---|
com.mongodb | Main package with core files. |
com.mongodb.gridfs | GridFS tools. |
Uses of MongoException in com.mongodb |
---|
Subclasses of MongoException in com.mongodb | |
---|---|
static class |
DBPortPool.ConnectionWaitTimeOut
|
static class |
DBPortPool.NoMoreConnection
|
static class |
DBPortPool.SemaphoresOut
|
static class |
MongoException.CursorNotFound
Subclass of MongoException representing a cursor-not-found exception |
static class |
MongoException.DuplicateKey
Subclass of MongoException representing a duplicate key exception |
static class |
MongoException.Network
Subclass of MongoException representing a network-related exception |
class |
MongoInternalException
An Mongo exception internal to the driver, not carrying any error code |
Methods in com.mongodb that return MongoException | |
---|---|
MongoException |
CommandResult.getException()
utility method to create an exception with the command name |
Methods in com.mongodb that throw MongoException | |
---|---|
boolean |
DB.authenticate(String username,
char[] passwd)
Authenticates to db with the given name and password |
CommandResult |
DB.authenticateCommand(String username,
char[] passwd)
Authenticates to db with the given name and password |
com.mongodb.Response |
DBTCPConnector.call(DB db,
DBCollection coll,
com.mongodb.OutMessage m,
ServerAddress hostNeeded,
DBDecoder decoder)
|
com.mongodb.Response |
DBConnector.call(DB db,
DBCollection coll,
com.mongodb.OutMessage m,
ServerAddress hostNeeded,
DBDecoder decoder)
does a read operation on the database |
com.mongodb.Response |
DBTCPConnector.call(DB db,
DBCollection coll,
com.mongodb.OutMessage m,
ServerAddress hostNeeded,
int retries)
|
com.mongodb.Response |
DBConnector.call(DB db,
DBCollection coll,
com.mongodb.OutMessage m,
ServerAddress hostNeeded,
int retries)
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)
|
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 |
abstract void |
DB.cleanCursors(boolean force)
|
void |
DBApiLayer.cleanCursors(boolean force)
|
CommandResult |
DB.command(DBObject cmd)
Executes a database command. |
CommandResult |
DB.command(DBObject cmd,
DBEncoder encoder)
|
CommandResult |
DB.command(DBObject cmd,
int options)
Executes a database command. |
CommandResult |
DB.command(DBObject cmd,
int options,
DBEncoder encoder)
|
CommandResult |
DB.command(DBObject cmd,
int options,
ReadPreference readPrefs)
|
CommandResult |
DB.command(DBObject cmd,
int options,
ReadPreference readPrefs,
DBEncoder encoder)
Executes a database command. |
CommandResult |
DB.command(String cmd)
Executes a database command. |
CommandResult |
DB.command(String cmd,
int options)
Executes a database command. |
Mongo |
MongoURI.connect()
creates a Mongo instance based on the URI |
Mongo |
Mongo.Holder.connect(MongoURI uri)
Attempts to find an existing Mongo instance matching that URI in the holder, and returns it if exists. |
DB |
MongoURI.connectDB()
returns the DB object from a newly created Mongo instance based on this URI |
int |
DBCursor.count()
Counts the number of objects matching the query This does not take limit/skip into consideration |
long |
DBCollection.count()
returns the number of documents in this collection. |
long |
DBCollection.count(DBObject query)
returns the number of documents that match a query. |
void |
DBCollection.createIndex(DBObject keys)
calls DBCollection.createIndex(com.mongodb.DBObject, com.mongodb.DBObject) with default index options |
void |
DBCollection.createIndex(DBObject keys,
DBObject options)
Forces creation of an index on a set of fields, if one does not already exist. |
abstract void |
DBCollection.createIndex(DBObject keys,
DBObject options,
DBEncoder encoder)
Forces creation of an index on a set of fields, if one does not already exist. |
CommandResult |
DB.doEval(String code,
Object... args)
evaluates a function on the database. |
void |
DBCollection.drop()
Drops (deletes) this collection. |
void |
DB.dropDatabase()
Drops this database. |
void |
Mongo.dropDatabase(String dbName)
Drops the database if it exists. |
void |
DBCollection.dropIndex(DBObject keys)
Drops an index from this collection |
void |
DBCollection.dropIndex(String name)
Drops an index from this collection |
void |
DBCollection.dropIndexes()
Drops all indices from this collection |
void |
DBCollection.dropIndexes(String name)
Drops an index from this collection |
void |
DBCollection.ensureIndex(DBObject keys)
calls DBCollection.ensureIndex(com.mongodb.DBObject, com.mongodb.DBObject) with default options |
void |
DBCollection.ensureIndex(DBObject keys,
DBObject optionsIN)
Creates an index on a set of fields, if one does not already exist. |
void |
DBCollection.ensureIndex(DBObject keys,
String name)
calls DBCollection.ensureIndex(com.mongodb.DBObject, java.lang.String, boolean) with unique=false |
void |
DBCollection.ensureIndex(DBObject keys,
String name,
boolean unique)
Ensures an index on this collection (that is, the index will be created if it does not exist). |
Object |
DB.eval(String code,
Object... args)
calls DB.doEval(java.lang.String, java.lang.Object[]) . |
DBCursor |
DBCollection.find(DBObject query,
DBObject fields,
int numToSkip,
int batchSize,
int options)
Deprecated. |
DBObject |
DBCollection.findOne()
Returns a single object from this collection. |
DBObject |
DBCollection.findOne(DBObject o)
Returns a single object from this collection matching the query. |
DBObject |
DBCollection.findOne(Object obj)
Finds an object by its id. |
void |
DB.forceError()
For testing purposes only - this method forces an error to help test error handling |
Set<String> |
DB.getCollectionNames()
Returns a set containing the names of all collections in this database. |
long |
DBCollection.getCount()
calls DBCollection.getCount(com.mongodb.DBObject, com.mongodb.DBObject) with an empty query and null fields. |
long |
DBCollection.getCount(DBObject query)
calls DBCollection.getCount(com.mongodb.DBObject, com.mongodb.DBObject) with null fields. |
long |
DBCollection.getCount(DBObject query,
DBObject fields)
calls DBCollection.getCount(com.mongodb.DBObject, com.mongodb.DBObject, long, long) with limit=0 and skip=0 |
long |
DBCollection.getCount(DBObject query,
DBObject fields,
long limit,
long skip)
Returns the number of documents in the collection that match the specified query |
List<String> |
Mongo.getDatabaseNames()
gets a list of all database names present on the server |
CommandResult |
DB.getLastError()
Gets the the error (if there is one) from the previous operation on this connection. |
CommandResult |
DB.getLastError(int w,
int wtimeout,
boolean fsync)
|
CommandResult |
DB.getLastError(WriteConcern concern)
|
CommandResult |
DB.getPreviousError()
Returns the last error that occurred since start of database or a call to resetError()
The return object will look like |
DBObject |
DBCollection.group(DBObject args)
Deprecated. prefer the DBCollection.group(com.mongodb.GroupCommand) which is more standard
Applies a group operation |
DBObject |
DBCollection.group(DBObject key,
DBObject cond,
DBObject initial,
String reduce)
calls DBCollection.group(com.mongodb.DBObject, com.mongodb.DBObject, com.mongodb.DBObject, java.lang.String, java.lang.String) with finalize=null |
DBObject |
DBCollection.group(DBObject key,
DBObject cond,
DBObject initial,
String reduce,
String finalize)
Applies a group operation |
boolean |
DBCursor.hasNext()
Checks if there is another object available |
WriteResult |
DBCollection.insert(DBObject... arr)
Saves document(s) to the database. |
WriteResult |
DBCollection.insert(DBObject[] arr,
WriteConcern concern)
Saves document(s) to the database. |
abstract WriteResult |
DBCollection.insert(DBObject[] arr,
WriteConcern concern,
DBEncoder encoder)
Saves document(s) to the database. |
WriteResult |
DBCollection.insert(DBObject o,
WriteConcern concern)
Inserts a document into the database. |
WriteResult |
DBCollection.insert(List<DBObject> list)
Saves document(s) to the database. |
WriteResult |
DBCollection.insert(List<DBObject> list,
WriteConcern concern)
Saves document(s) to the database. |
WriteResult |
DBCollection.insert(WriteConcern concern,
DBObject... arr)
Saves document(s) to the database. |
int |
DBCursor.length()
pulls back all items into an array and returns the number of objects. |
MapReduceOutput |
DBCollection.mapReduce(DBObject command)
performs a map reduce operation |
MapReduceOutput |
DBCollection.mapReduce(MapReduceCommand command)
performs a map reduce operation |
MapReduceOutput |
DBCollection.mapReduce(String map,
String reduce,
String outputTarget,
DBObject query)
performs a map reduce operation Runs the command in REPLACE output mode (saves to named collection) |
MapReduceOutput |
DBCollection.mapReduce(String map,
String reduce,
String outputTarget,
MapReduceCommand.OutputType outputType,
DBObject query)
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 |
DBObject |
DBCursor.next()
Returns the object the cursor is at and moves the cursor ahead by one. |
WriteResult |
DBCollection.remove(DBObject o)
calls DBCollection.remove(com.mongodb.DBObject, com.mongodb.WriteConcern) with the default WriteConcern |
WriteResult |
DBCollection.remove(DBObject o,
WriteConcern concern)
Removes objects from the database collection. |
abstract WriteResult |
DBCollection.remove(DBObject o,
WriteConcern concern,
DBEncoder encoder)
Removes objects from the database collection. |
DBCollection |
DBCollection.rename(String newName)
Calls DBCollection.rename(java.lang.String, boolean) with dropTarget=false |
DBCollection |
DBCollection.rename(String newName,
boolean dropTarget)
renames of this collection to newName |
void |
DB.resetError()
Resets the error memory for this database. |
WriteResult |
DBCollection.save(DBObject jo,
WriteConcern concern)
Saves an object to this collection (does insert or update based on the object _id). |
WriteResult |
DBTCPConnector.say(DB db,
com.mongodb.OutMessage m,
WriteConcern concern)
|
WriteResult |
DBConnector.say(DB db,
com.mongodb.OutMessage m,
WriteConcern concern)
does a write operation |
WriteResult |
DBTCPConnector.say(DB db,
com.mongodb.OutMessage m,
WriteConcern concern,
ServerAddress hostNeeded)
|
WriteResult |
DBConnector.say(DB db,
com.mongodb.OutMessage m,
WriteConcern concern,
ServerAddress hostNeeded)
does a write operation |
int |
DBCursor.size()
Counts the number of objects matching the query this does take limit/skip into consideration |
void |
CommandResult.throwOnError()
throws an exception containing the cmd name, in case the command failed, or the "err/code" information |
List<DBObject> |
DBCursor.toArray()
Converts this cursor to an array. |
List<DBObject> |
DBCursor.toArray(int max)
Converts this cursor to an array. |
WriteResult |
DBCollection.update(DBObject q,
DBObject o)
calls DBCollection.update(com.mongodb.DBObject, com.mongodb.DBObject, boolean, boolean) with upsert=false and multi=false |
WriteResult |
DBCollection.update(DBObject q,
DBObject o,
boolean upsert,
boolean multi)
calls DBCollection.update(com.mongodb.DBObject, com.mongodb.DBObject, boolean, boolean, com.mongodb.WriteConcern) with default WriteConcern. |
WriteResult |
DBCollection.update(DBObject q,
DBObject o,
boolean upsert,
boolean multi,
WriteConcern concern)
Performs an update operation. |
abstract WriteResult |
DBCollection.update(DBObject q,
DBObject o,
boolean upsert,
boolean multi,
WriteConcern concern,
DBEncoder encoder)
Performs an update operation. |
WriteResult |
DBCollection.updateMulti(DBObject q,
DBObject o)
calls DBCollection.update(com.mongodb.DBObject, com.mongodb.DBObject, boolean, boolean) with upsert=false and multi=true |
Constructors in com.mongodb that throw MongoException | |
---|---|
DBTCPConnector(Mongo m,
List<ServerAddress> all)
|
|
DBTCPConnector(Mongo m,
ServerAddress... all)
|
|
DBTCPConnector(Mongo m,
ServerAddress addr)
|
|
MapReduceCommand(DBCollection inputCollection,
String map,
String reduce,
String outputCollection,
MapReduceCommand.OutputType type,
DBObject query)
Represents the command for a map reduce operation Runs the command in REPLACE output type to a named collection |
|
Mongo()
Creates a Mongo instance based on a (single) mongodb node (localhost, default port) |
|
Mongo(List<ServerAddress> replicaSetSeeds)
Creates a Mongo based on a replica set, or pair. |
|
Mongo(List<ServerAddress> replicaSetSeeds,
MongoOptions options)
Creates a Mongo based on a replica set, or pair. |
|
Mongo(MongoURI uri)
Creates a Mongo described by a URI. |
|
Mongo(ServerAddress addr)
Creates a Mongo instance based on a (single) mongodb node |
|
Mongo(ServerAddress addr,
MongoOptions options)
Creates a Mongo instance based on a (single) mongo node using a given ServerAddress |
|
Mongo(ServerAddress left,
ServerAddress right)
Deprecated. |
|
Mongo(ServerAddress left,
ServerAddress right,
MongoOptions options)
Deprecated. |
|
Mongo(String host)
Creates a Mongo instance based on a (single) mongodb node (default port) |
|
Mongo(String host,
int port)
Creates a Mongo instance based on a (single) mongodb node |
|
Mongo(String host,
MongoOptions options)
Creates a Mongo instance based on a (single) mongodb node (default port) |
Uses of MongoException in com.mongodb.gridfs |
---|
Methods in com.mongodb.gridfs that throw MongoException | |
---|---|
void |
GridFSFile.validate()
Verifies that the MD5 matches between the database and the local file. |
|
||||||||||
PREV NEXT | FRAMES NO FRAMES |