public class DBApiLayer extends DB
Modifier | Constructor and Description |
---|---|
protected |
DBApiLayer(Mongo mongo,
String name,
DBConnector connector) |
Modifier and Type | Method and Description |
---|---|
void |
cleanCursors(boolean force) |
protected com.mongodb.DBApiLayer.MyCollection |
doGetCollection(String name)
Returns the collection represented by the string <dbName>.<collectionName>.
|
void |
requestDone()
ends the current "consistent request"
|
void |
requestEnsureConnection()
ensure that a connection is assigned to the current "consistent request" (from primary pool, if connected to a replica set)
|
void |
requestStart()
starts a new "consistent request".
|
addOption, addUser, addUser, authenticate, authenticateCommand, collectionExists, 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, removeUser, resetError, resetOptions, setOptions, setReadOnly, setReadPreference, setWriteConcern, slaveOk, toString
protected DBApiLayer(Mongo mongo, String name, DBConnector connector)
mongo
- the Mongo instancename
- the database nameconnector
- the connectorpublic void requestStart()
DB
requestStart
in class DB
public void requestDone()
DB
requestDone
in class DB
public void requestEnsureConnection()
DB
requestEnsureConnection
in class DB
protected com.mongodb.DBApiLayer.MyCollection doGetCollection(String name)
DB
doGetCollection
in class DB
name
- the name of the collectionpublic void cleanCursors(boolean force)
cleanCursors
in class DB
force
- true if should clean regardless of number of dead cursorsMongoException