Uses of Class
com.mongodb.MongoException

Packages that use MongoException
com.mongodb Main package with core files. 
 

Uses of MongoException in com.mongodb
 

Subclasses of MongoException in com.mongodb
static class MongoException.CursorNotFound
           
static class MongoException.DuplicateKey
           
static class MongoException.Network
           
 

Methods in com.mongodb that return MongoException
 MongoException CommandResult.getException()
           
 

Methods in com.mongodb that throw MongoException
 boolean DB.authenticate(String username, char[] passwd)
          Authenticates connection/db with given name and password
 com.mongodb.Response DBConnector.call(DB db, DBCollection coll, com.mongodb.OutMessage m)
           
 com.mongodb.Response DBConnector.call(DB db, DBCollection coll, com.mongodb.OutMessage m, ServerAddress hostNeeded)
           
 com.mongodb.Response DBConnector.call(DB db, DBCollection coll, com.mongodb.OutMessage m, ServerAddress hostNeeded, int retries)
           
 CommandResult DB.command(DBObject cmd)
          Execute a database command directly.
 CommandResult DB.command(DBObject cmd, int options)
          Execute a database command directly.
 CommandResult DB.command(String cmd)
           
 Mongo MongoURI.connect()
           
 Mongo Mongo.Holder.connect(MongoURI uri)
           
 DB MongoURI.connectDB()
           
 int DBCursor.count()
          Counts the number of elements matching the query this does not take limit/skip into consideration
 long DBCollection.count()
           
 long DBCollection.count(DBObject query)
           
 void DBCollection.createIndex(DBObject keys)
          Forces creation of an index on a set of fields, if one does not already exist.
abstract  void DBCollection.createIndex(DBObject keys, DBObject options)
           
 CommandResult DB.doEval(String code, Object... args)
           
 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)
           
 void DBCollection.dropIndex(String name)
           
 void DBCollection.dropIndexes()
          Drops all indices from this collection
 void DBCollection.dropIndexes(String name)
           
 void DBCollection.ensureIndex(DBObject keys)
          Creates an index on a set of fields, if one does not already exist.
 void DBCollection.ensureIndex(DBObject keys, DBObject optionsIN)
           
 void DBCollection.ensureIndex(DBObject keys, String name)
          Ensures an index on this collection (that is, the index will be created if it does not exist).
 void DBCollection.ensureIndex(DBObject keys, String name, boolean unique)
          Ensures an optionally unique index on this collection.
 Object DB.eval(String code, Object... args)
           
 DBCursor DBCollection.find(DBObject ref, DBObject fields, int numToSkip, int batchSize, int options)
          Finds an object.
 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 of the names of collections in this database.
 long DBCollection.getCount()
          Returns the number of documents in the collection
 long DBCollection.getCount(DBObject query)
          Returns the number of documents in the collection that match the specified query
 long DBCollection.getCount(DBObject query, DBObject fields)
          Returns the number of documents in the collection that match the specified query
 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()
           
 CommandResult DB.getLastError()
          Gets the the error (if there is one) from the previous operation.
 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)
           
 DBObject DBCollection.group(DBObject key, DBObject cond, DBObject initial, String reduce)
           
 DBObject DBCollection.group(DBObject key, DBObject cond, DBObject initial, String reduce, String finalize)
           
 WriteResult DBCollection.insert(DBObject... arr)
          Saves document(s) to the database.
abstract  WriteResult DBCollection.insert(DBObject[] arr, WriteConcern concern)
          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.
 int DBCursor.length()
          pulls back all items into an array this is slow
 MapReduceOutput DBCollection.mapReduce(DBObject command)
           
 MapReduceOutput DBCollection.mapReduce(String map, String reduce, Object outputTarget, DBObject query)
          performs a map reduce operation
 WriteResult DBCollection.remove(DBObject o)
          Removes objects from the database collection.
abstract  WriteResult DBCollection.remove(DBObject o, WriteConcern concern)
          Removes objects from the database collection.
 DBCollection DBCollection.rename(String newName)
          does a rename 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.
 WriteResult DBConnector.say(DB db, com.mongodb.OutMessage m, WriteConcern concern)
           
 WriteResult DBConnector.say(DB db, com.mongodb.OutMessage m, WriteConcern concern, ServerAddress hostNeeded)
           
 int DBCursor.size()
          Counts the number of elements matching the query that would be returned this does take limit/skip into consideration
 void CommandResult.throwOnError()
           
 List<DBObject> DBCursor.toArray()
          Converts this cursor to an array.
 List<DBObject> DBCursor.toArray(int min)
          Converts this cursor to an array.
 WriteResult DBCollection.update(DBObject q, DBObject o)
           
 WriteResult DBCollection.update(DBObject q, DBObject o, boolean upsert, boolean multi)
          Performs an update operation.
abstract  WriteResult DBCollection.update(DBObject q, DBObject o, boolean upsert, boolean multi, WriteConcern concern)
          Performs an update operation.
 WriteResult DBCollection.updateMulti(DBObject q, DBObject o)
           
 

Constructors in com.mongodb that throw MongoException
Mongo()
           
Mongo(List<ServerAddress> replicaSetSeeds)
          Creates a Mongo connection.
Mongo(List<ServerAddress> replicaSetSeeds, MongoOptions options)
          Creates a Mongo connection.
Mongo(MongoURI uri)
          Creates a Mongo connection.
Mongo(ServerAddress addr)
          Connects to a (single) mongodb node
Mongo(ServerAddress addr, MongoOptions options)
          Connects to a (single) mongo node using a given ServerAddress
Mongo(ServerAddress left, ServerAddress right)
          Creates a Mongo connection in paired mode.
Mongo(ServerAddress left, ServerAddress right, MongoOptions options)
          Creates a Mongo connection in paired mode.
Mongo(String host)
          Connects to a (single) mongodb node (default port)
Mongo(String host, int port)
          Connects to a (single) mongodb node
Mongo(String host, MongoOptions options)
          Connects to a (single) mongodb node (default port)