public interface DBConnector
Modifier and Type | Method and Description |
---|---|
com.mongodb.Response |
call(DB db,
DBCollection coll,
com.mongodb.OutMessage m)
does a read operation on the database
|
com.mongodb.Response |
call(DB db,
DBCollection coll,
com.mongodb.OutMessage m,
ServerAddress hostNeeded)
does a read operation on the database
|
com.mongodb.Response |
call(DB db,
DBCollection coll,
com.mongodb.OutMessage m,
ServerAddress hostNeeded,
int retries)
does a read operation on the database
|
boolean |
isOpen()
returns true if the connector is in a usable state
|
void |
requestDone()
terminates the "consistent request".
|
void |
requestEnsureConnection()
Ensures that a connection exists for the "consistent request"
|
void |
requestStart()
initiates a "consistent request" on the thread.
|
WriteResult |
say(DB db,
com.mongodb.OutMessage m,
WriteConcern concern)
does a write operation
|
WriteResult |
say(DB db,
com.mongodb.OutMessage m,
WriteConcern concern,
ServerAddress hostNeeded)
does a write operation
|
void requestStart()
void requestDone()
void requestEnsureConnection()
WriteResult say(DB db, com.mongodb.OutMessage m, WriteConcern concern) throws MongoException
db
- the databasem
- the request messageconcern
- the write concernMongoException
WriteResult say(DB db, com.mongodb.OutMessage m, WriteConcern concern, ServerAddress hostNeeded) throws MongoException
db
- the databasem
- the request messageconcern
- the write concernhostNeeded
- specific server to connect toMongoException
com.mongodb.Response call(DB db, DBCollection coll, com.mongodb.OutMessage m) throws MongoException
db
- the databasecoll
- the collectionm
- the request messageMongoException
com.mongodb.Response call(DB db, DBCollection coll, com.mongodb.OutMessage m, ServerAddress hostNeeded) throws MongoException
db
- the databasecoll
- the collectionm
- the request messagehostNeeded
- specific server to connect toMongoException
com.mongodb.Response call(DB db, DBCollection coll, com.mongodb.OutMessage m, ServerAddress hostNeeded, int retries) throws MongoException
db
- the databasecoll
- the collectionm
- the request messagehostNeeded
- specific server to connect toretries
- number of retries in case of errorMongoException
boolean isOpen()