@Deprecated public class DBApiLayer extends DB
DB class.| Modifier | Constructor and Description |
|---|---|
protected |
DBApiLayer(Mongo mongo,
String name,
DBConnector connector)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
WriteResult |
addUser(String username,
char[] passwd,
boolean readOnly)
Deprecated.
Adds or updates a user for this database
|
void |
cleanCursors(boolean force)
Deprecated.
Forcefully kills any cursors leaked by neglecting to call
DBCursor.close |
protected com.mongodb.DBCollectionImpl |
doGetCollection(String name)
Deprecated.
Gets a collection with a given name.
|
WriteResult |
removeUser(String username)
Deprecated.
Removes the specified user from the database.
|
void |
requestDone()
Deprecated.
Ends the current 'consistent request'.
|
void |
requestEnsureConnection()
Deprecated.
Ensure that a connection is assigned to the current 'consistent request'
(from primary pool, if connected to a replica set)
|
void |
requestStart()
Deprecated.
Starts a new 'consistent request'.
|
addOption, addUser, authenticate, authenticateCommand, collectionExists, command, command, command, command, command, command, command, command, command, command, command, createCollection, doEval, dropDatabase, eval, forceError, getCollection, getCollectionFromString, getCollectionNames, getLastError, getLastError, getLastError, getMongo, getName, getOptions, getPreviousError, getReadPreference, getSisterDB, getStats, getWriteConcern, isAuthenticated, resetError, resetOptions, setOptions, setReadOnly, setReadPreference, setWriteConcern, slaveOk, toStringprotected DBApiLayer(Mongo mongo, String name, DBConnector connector)
mongo - the Mongo instancename - the database nameconnector - the connector. This must be an instance of DBTCPConnector.public void requestStart()
DBDB.requestDone() is called,
all db operations will use the same underlying connection.
This is useful to ensure that operations happen in a certain order with predictable results.requestStart in class DBpublic void requestDone()
DBrequestDone in class DBpublic void requestEnsureConnection()
DBrequestEnsureConnection in class DBpublic WriteResult addUser(String username, char[] passwd, boolean readOnly)
DBpublic WriteResult removeUser(String username)
DBremoveUser in class DBusername - user to be removedprotected com.mongodb.DBCollectionImpl doGetCollection(String name)
DBdoGetCollection in class DBname - the name of the collectionpublic void cleanCursors(boolean force)
DBDBCursor.closecleanCursors in class DBforce - true if should clean regardless of number of dead cursorsMongoExceptionDBCursor.close()