Package | Description |
---|---|
com.mongodb |
Main package with core files.
|
Modifier and Type | Method and Description |
---|---|
CommandResult |
DB.authenticateCommand(java.lang.String username,
char[] passwd)
Authenticates to db with the given name and password
|
CommandResult |
DB.command(DBObject cmd)
Executes a database command.
|
CommandResult |
DB.command(DBObject cmd,
int options)
Executes a database command.
|
CommandResult |
DB.command(java.lang.String cmd)
Executes a database command.
|
CommandResult |
DB.command(java.lang.String cmd,
int options)
Executes a database command.
|
CommandResult |
DB.doEval(java.lang.String code,
java.lang.Object... args)
evaluates a function on the database.
|
CommandResult |
Mongo.fsync(boolean async)
Forces the master server to fsync the RAM data to disk
This is done automatically by the server at intervals, but can be forced for better reliability.
|
CommandResult |
Mongo.fsyncAndLock()
Forces the master server to fsync the RAM data to disk, then lock all writes.
|
CommandResult |
WriteResult.getCachedLastError()
Gets the last result from getLastError()
|
CommandResult |
WriteResult.getLastError()
calls
WriteResult.getLastError(com.mongodb.WriteConcern) with concern=null |
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 |
WriteResult.getLastError(WriteConcern concern)
This method does following:
- returns the existing CommandResult if concern is null or less strict than the concern it was obtained with
- otherwise attempts to obtain a CommandResult by calling getLastError with the concern
|
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 |
CommandResult |
DBCollection.getStats()
gets the collections statistics ("collstats" command)
|
CommandResult |
DB.getStats()
Returns the result of "dbstats" command
|