Connect via a com.mongodb.MongoClientURI
Connect via a com.mongodb.MongoClientURI
(com.mongodb.MongoClientURI)
Connect via a MongoClientURI
Connect via a MongoClientURI
(MongoClientURI)
Replica Set connection This works for a replica set or pair, and finds all the members (the master is used by default) Takes a MongoClientOptions object
Replica Set connection This works for a replica set or pair, and finds all the members (the master is used by default) Takes a MongoClientOptions object
(List[ServerAddress]) The servers to connect to
(List[MongoCredential]) used to authenticate all connections
(MongoClientOptions) DB Options
2.6
MongoException
if problem connecting
CredentialsList
MongoClientOptions
MongoDBAddress
ServerAddress
Replica Set connection This works for a replica set or pair, and finds all the members (the master is used by default) Takes a MongoClientOptions object
Replica Set connection This works for a replica set or pair, and finds all the members (the master is used by default) Takes a MongoClientOptions object
(List[ServerAddress]) The servers to connect to
(List[MongoCredential]) used to authenticate all connections
2.6
MongoException
if problem connecting
CredentialsList
MongoDBAddress
ServerAddress
Replica Set connection This works for a replica set or pair, and finds all the members (the master is used by default) Takes a MongoClientOptions object
Replica Set connection This works for a replica set or pair, and finds all the members (the master is used by default) Takes a MongoClientOptions object
(List[ServerAddress]) The servers to connect to
(MongoClientOptions) DB Options
MongoException
if problem connecting
MongoClientOptions
MongoDBAddress
ServerAddress
Replica Set connection This works for a replica set or pair, and finds all the members (the master is used by default)
Replica Set connection This works for a replica set or pair, and finds all the members (the master is used by default)
(List[ServerAddress]) The servers to connect to
MongoException
if problem connecting
MongoDBAddress
ServerAddress
Creates a Mongo instance based on a (single) mongo node using a given ServerAddress and options.
Creates a Mongo instance based on a (single) mongo node using a given ServerAddress and options.
(ServerAddress) the DatabaseAddress
(List[MongoCredential]) used to authenticate all connections
(MongoClientOptions) DB Options
2.6
MongoException
if problem connecting
CredentialsList
MongoClientOptions
MongoDBAddress
ServerAddress
Creates a Mongo instance based on a (single) mongodb node and a list of credentials
Creates a Mongo instance based on a (single) mongodb node and a list of credentials
(ServerAddress) the DatabaseAddress
(List[MongoCredential]) used to authenticate all connections
2.6
MongoException
if problem connecting
credentialsList
MongoDBAddress
ServerAddress
Connects to a (single) mongodb node.
Connects to a (single) mongodb node.
(ServerAddress) the DatabaseAddress
(MongoClientOptions) DB Options
MongoException
if problem connecting
MongoClientOptions
MongoDBAddress
ServerAddress
Connects to a (single) mongodb node.
Connects to a (single) mongodb node.
(ServerAddress) the DatabaseAddress
MongoException
if problem connecting
MongoDBAddress
ServerAddress
Connects to a (single) mongodb node
Connects to a (single) mongodb node
(String) server to connect to
(Int) the port on which the database is running
MongoException
if problem connecting
UnknownHostException
if host cannot be contacted
Creates a Mongo instance based on a (single) mongodb node (default port).
Creates a Mongo instance based on a (single) mongodb node (default port).
server to connect to in format host[:port]
default query options
MongoException
if problem connecting
UnknownHostException
if host cannot be contacted
Connects to a (single) mongodb node (default port)
Connects to a (single) mongodb node (default port)
(String) server to connect to
MongoException
if problem connecting
UnknownHostException
if host cannot be contacted
Default connection method - connects to default host & port
Default connection method - connects to default host & port
MongoException
if problem connecting
UnknownHostException
if host cannot be contacted
Wrapper object for MongoClient connections, providing the static methods the Java driver gives. Apply methods are called as MongoClient(<params>)
2.5