object MongoClient
Wrapper object for MongoClient connections, providing the static methods the Java driver gives. Apply methods are called as MongoClient(<params>)
- Since
2.5
- Alphabetic
- By Inheritance
- MongoClient
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
apply(uri: mongodb.MongoClientURI): MongoClient
Connect via a com.mongodb.MongoClientURI
Connect via a com.mongodb.MongoClientURI
- uri
(com.mongodb.MongoClientURI)
-
def
apply(uri: MongoClientURI): MongoClient
Connect via a MongoClientURI
Connect via a MongoClientURI
- uri
(MongoClientURI)
-
def
apply(replicaSetSeeds: List[Imports.ServerAddress], credentials: List[Imports.MongoCredential], options: Imports.MongoClientOptions): MongoClient
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
- replicaSetSeeds
(List[ServerAddress]) The servers to connect to
- credentials
(List[MongoCredential]) used to authenticate all connections
- options
(MongoClientOptions) DB Options
- Since
2.6
- Exceptions thrown
MongoException
if problem connecting- See also
CredentialsList
MongoClientOptions
MongoDBAddress
ServerAddress
-
def
apply(replicaSetSeeds: List[Imports.ServerAddress], credentials: List[Imports.MongoCredential]): MongoClient
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
- replicaSetSeeds
(List[ServerAddress]) The servers to connect to
- credentials
(List[MongoCredential]) used to authenticate all connections
- Since
2.6
- Exceptions thrown
MongoException
if problem connecting- See also
CredentialsList
MongoDBAddress
ServerAddress
-
def
apply(replicaSetSeeds: List[Imports.ServerAddress], options: Imports.MongoClientOptions): MongoClient
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
- replicaSetSeeds
(List[ServerAddress]) The servers to connect to
- options
(MongoClientOptions) DB Options
- Exceptions thrown
MongoException
if problem connecting- See also
MongoClientOptions
MongoDBAddress
ServerAddress
-
def
apply(replicaSetSeeds: List[Imports.ServerAddress]): MongoClient
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)
- replicaSetSeeds
(List[ServerAddress]) The servers to connect to
- Exceptions thrown
MongoException
if problem connecting- See also
MongoDBAddress
ServerAddress
-
def
apply(addr: Imports.ServerAddress, credentials: List[Imports.MongoCredential], options: Imports.MongoClientOptions): MongoClient
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.
- addr
(ServerAddress) the DatabaseAddress
- credentials
(List[MongoCredential]) used to authenticate all connections
- options
(MongoClientOptions) DB Options
- Since
2.6
- Exceptions thrown
MongoException
if problem connecting- See also
CredentialsList
MongoClientOptions
MongoDBAddress
ServerAddress
-
def
apply(addr: Imports.ServerAddress, credentialsList: List[Imports.MongoCredential]): MongoClient
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
- addr
(ServerAddress) the DatabaseAddress
- credentialsList
(List[MongoCredential]) used to authenticate all connections
- Since
2.6
- Exceptions thrown
MongoException
if problem connecting- See also
credentialsList
MongoDBAddress
ServerAddress
-
def
apply(addr: Imports.ServerAddress, options: Imports.MongoClientOptions): MongoClient
Connects to a (single) mongodb node.
Connects to a (single) mongodb node.
- addr
(ServerAddress) the DatabaseAddress
- options
(MongoClientOptions) DB Options
- Exceptions thrown
MongoException
if problem connecting- See also
MongoClientOptions
MongoDBAddress
ServerAddress
-
def
apply(addr: Imports.ServerAddress): MongoClient
Connects to a (single) mongodb node.
Connects to a (single) mongodb node.
- addr
(ServerAddress) the DatabaseAddress
- Exceptions thrown
MongoException
if problem connecting- See also
MongoDBAddress
ServerAddress
-
def
apply(host: String, port: Int): MongoClient
Connects to a (single) mongodb node
Connects to a (single) mongodb node
- host
(String) server to connect to
- port
(Int) the port on which the database is running
- Exceptions thrown
MongoException
if problem connectingUnknownHostException
if host cannot be contacted
-
def
apply(host: String, options: Imports.MongoClientOptions): MongoClient
Creates a Mongo instance based on a (single) mongodb node (default port).
Creates a Mongo instance based on a (single) mongodb node (default port).
- host
server to connect to in format host[:port]
- options
default query options
- Exceptions thrown
MongoException
if problem connectingUnknownHostException
if host cannot be contacted
-
def
apply(host: String): MongoClient
Connects to a (single) mongodb node (default port)
Connects to a (single) mongodb node (default port)
- host
(String) server to connect to
- Exceptions thrown
MongoException
if problem connectingUnknownHostException
if host cannot be contacted
-
def
apply(): MongoClient
Default connection method - connects to default host & port
Default connection method - connects to default host & port
- Exceptions thrown
MongoException
if problem connectingUnknownHostException
if host cannot be contacted
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )