|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.mongodb.DBTCPConnector
public class DBTCPConnector
Constructor Summary | |
---|---|
DBTCPConnector(Mongo m,
List<ServerAddress> all)
|
|
DBTCPConnector(Mongo m,
ServerAddress... all)
|
|
DBTCPConnector(Mongo m,
ServerAddress addr)
|
Method Summary | |
---|---|
com.mongodb.Response |
call(DB db,
DBCollection coll,
com.mongodb.OutMessage m,
ServerAddress hostNeeded,
DBDecoder decoder)
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 |
com.mongodb.Response |
call(DB db,
DBCollection coll,
com.mongodb.OutMessage m,
ServerAddress hostNeeded,
int retries,
ReadPreference readPref,
DBDecoder decoder)
does a read operation on the database |
void |
close()
|
String |
debugString()
|
ServerAddress |
getAddress()
|
List<ServerAddress> |
getAllAddress()
Gets the list of seed server addresses |
String |
getConnectPoint()
|
DBPortPool |
getDBPortPool(ServerAddress addr)
Gets the DBPortPool associated with a ServerAddress. |
int |
getMaxBsonObjectSize()
Gets the maximum size for a BSON object supported by the current master server. |
ReplicaSetStatus |
getReplicaSetStatus()
|
List<ServerAddress> |
getServerAddressList()
Gets the list of server addresses currently seen by the connector. |
boolean |
isOpen()
returns true if the connector is in a usable state |
void |
requestDone()
End the current "request", if this thread is in one. |
void |
requestEnsureConnection()
Ensures that a connection exists for the "consistent request" |
void |
requestStart()
Start a "request". |
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 |
start()
|
void |
updatePortPool(ServerAddress addr)
Assigns a new DBPortPool for a given ServerAddress. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DBTCPConnector(Mongo m, ServerAddress addr)
m
- addr
-
MongoException
public DBTCPConnector(Mongo m, ServerAddress... all)
m
- all
-
MongoException
public DBTCPConnector(Mongo m, List<ServerAddress> all)
m
- all
-
MongoException
Method Detail |
---|
public void start()
public void requestStart()
requestStart
in interface DBConnector
public void requestDone()
requestDone
in interface DBConnector
public void requestEnsureConnection()
DBConnector
requestEnsureConnection
in interface DBConnector
MongoException
public WriteResult say(DB db, com.mongodb.OutMessage m, WriteConcern concern)
DBConnector
say
in interface DBConnector
db
- m
- concern
-
MongoException
public WriteResult say(DB db, com.mongodb.OutMessage m, WriteConcern concern, ServerAddress hostNeeded)
DBConnector
say
in interface DBConnector
db
- m
- concern
- hostNeeded
-
MongoException
public com.mongodb.Response call(DB db, DBCollection coll, com.mongodb.OutMessage m, ServerAddress hostNeeded, DBDecoder decoder)
DBConnector
call
in interface DBConnector
db
- coll
- m
- hostNeeded
- decoder
-
MongoException
public com.mongodb.Response call(DB db, DBCollection coll, com.mongodb.OutMessage m, ServerAddress hostNeeded, int retries)
DBConnector
call
in interface DBConnector
db
- coll
- m
- hostNeeded
- retries
-
MongoException
public com.mongodb.Response call(DB db, DBCollection coll, com.mongodb.OutMessage m, ServerAddress hostNeeded, int retries, ReadPreference readPref, DBDecoder decoder)
DBConnector
call
in interface DBConnector
db
- coll
- m
- hostNeeded
- readPref
- decoder
- retries
- number of retries in case of error
MongoException
public ServerAddress getAddress()
public List<ServerAddress> getAllAddress()
public List<ServerAddress> getServerAddressList()
MongoException
public ReplicaSetStatus getReplicaSetStatus()
public String getConnectPoint()
public String debugString()
public void close()
public void updatePortPool(ServerAddress addr)
addr
- public DBPortPool getDBPortPool(ServerAddress addr)
addr
-
public boolean isOpen()
DBConnector
isOpen
in interface DBConnector
public int getMaxBsonObjectSize()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |