@Deprecated public class DBTCPConnector extends java.lang.Object implements DBConnector
Constructor and Description |
---|
DBTCPConnector(Mongo mongo)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
CommandResult |
authenticate(MongoCredential credentials)
Deprecated.
Authenticate using the given credentials.
|
com.mongodb.Response |
call(DB db,
DBCollection coll,
com.mongodb.OutMessage m,
ServerAddress hostNeeded,
DBDecoder decoder)
Deprecated.
does a read operation on the database
|
com.mongodb.Response |
call(DB db,
DBCollection coll,
com.mongodb.OutMessage m,
ServerAddress hostNeeded,
int retries)
Deprecated.
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)
Deprecated.
does a read operation on the database
|
void |
close()
Deprecated.
|
java.lang.String |
debugString()
Deprecated.
|
ServerAddress |
getAddress()
Deprecated.
|
java.util.List<ServerAddress> |
getAllAddress()
Deprecated.
Gets the list of seed server addresses
|
java.lang.String |
getConnectPoint()
Deprecated.
|
DBPortPool |
getDBPortPool(ServerAddress addr)
Deprecated.
Gets the DBPortPool associated with a ServerAddress.
|
int |
getMaxBsonObjectSize()
Deprecated.
Gets the maximum size for a BSON object supported by the current master server.
|
ReplicaSetStatus |
getReplicaSetStatus()
Deprecated.
|
java.util.List<ServerAddress> |
getServerAddressList()
Deprecated.
Gets the list of server addresses currently seen by the connector.
|
boolean |
isOpen()
Deprecated.
returns true if the connector is in a usable state
|
void |
requestDone()
Deprecated.
End the current "request", if this thread is in one.
|
void |
requestEnsureConnection()
Deprecated.
Ensures that a connection exists for the "consistent request"
|
void |
requestStart()
Deprecated.
Start a "request".
|
WriteResult |
say(DB db,
com.mongodb.OutMessage m,
WriteConcern concern)
Deprecated.
does a write operation
|
WriteResult |
say(DB db,
com.mongodb.OutMessage m,
WriteConcern concern,
ServerAddress hostNeeded)
Deprecated.
does a write operation
|
void |
start()
Deprecated.
|
void |
updatePortPool(ServerAddress addr)
Deprecated.
Assigns a new DBPortPool for a given ServerAddress.
|
public DBTCPConnector(Mongo mongo)
mongo
- the Mongo instanceMongoException
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 errorMongoException
public ServerAddress getAddress()
public java.util.List<ServerAddress> getAllAddress()
public java.util.List<ServerAddress> getServerAddressList()
MongoException
public ReplicaSetStatus getReplicaSetStatus()
public java.lang.String getConnectPoint()
public java.lang.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 CommandResult authenticate(MongoCredential credentials)
DBConnector
authenticate
in interface DBConnector
credentials
- the credentials.public int getMaxBsonObjectSize()