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
UnknownHostException
Connects to a (single) mongodb node (default port)
Connects to a (single) mongodb node (default port)
(String) server to connect to
UnknownHostException
Creates a Mongo connection in paired mode.
Creates a Mongo connection in paired mode. This will also work for a replica set and will find all the members (the master will be used by default)
(ServerAddress) the left side of the pair
(ServerAddress) The right side of the pair
(MongoOptions) the MongoDB Options for the connection
MongoOptions
,MongoDBAddress
,ServerAddress
Creates a Mongo connection in paired mode.
Creates a Mongo connection in paired mode. This will also work for a replica set and will find all the members (the master will be used by default)
(ServerAddress) the left side of the pair
(ServerAddress) The right side of the pair
MongoDBAddress
,ServerAddress
Connects to a (single) mongodb node.
Connects to a (single) mongodb node.
(ServerAddress) the DatabaseAddress
(MongoOptions) DB Options
MongoOptions
,MongoDBAddress
,ServerAddress
Connects to a (single) mongodb node.
Connects to a (single) mongodb node.
(ServerAddress) the DatabaseAddress
MongoDBAddress
,ServerAddress
Connect via a com.
Connect via a com.mongodb.MongoURI
(com.mongodb.MongoURI)
Connect via a MongoURI
Connect via a MongoURI
(MongoURI)
Replica Set connection This works for a replica set or pair, and finds all the members (the master is used by default) Takes a MongoOptions 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 MongoOptions object
(List[ServerAddress]) The servers to connect to
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
MongoDBAddress
,ServerAddress
Default connection method - connects to default host & port &
Default connection method - connects to default host & port
UnknownHostException
Wrapper object for Mongo Connections, providing the static methods the Java driver gives. Apply methods are called as MongoConnection(<params>)