Object/Class

com.mongodb.casbah

MongoConnection

Related Docs: class MongoConnection | package casbah

Permalink

object MongoConnection

Wrapper object for Mongo Connections, providing the static methods the Java driver gives. Apply methods are called as MongoConnection(<params>)

Annotations
@deprecated
Deprecated

(Since version 2.7) Please use MongoClient

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. MongoConnection
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def apply(host: String, port: Int): MongoConnection

    Permalink

    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 on error

  5. def apply(host: String): MongoConnection

    Permalink

    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 on error

    UnknownHostException if cannot connect to the host

  6. def apply(left: Imports.ServerAddress, right: Imports.ServerAddress, options: mongodb.MongoOptions): MongoConnection

    Permalink

    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)

    left

    (ServerAddress) the left side of the pair

    right

    (ServerAddress) The right side of the pair

    options

    (MongoOptions) the MongoDB Options for the connection

    Exceptions thrown

    MongoException on error

    See also

    MongoOptions

    MongoDBAddress

    ServerAddress

  7. def apply(left: Imports.ServerAddress, right: Imports.ServerAddress): MongoConnection

    Permalink

    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)

    left

    (ServerAddress) the left side of the pair

    right

    (ServerAddress) The right side of the pair

    Exceptions thrown

    MongoException on error

    See also

    MongoDBAddress

    ServerAddress

  8. def apply(addr: Imports.ServerAddress, options: Imports.MongoOptions): MongoConnection

    Permalink

    Connects to a (single) mongodb node.

    Connects to a (single) mongodb node.

    addr

    (ServerAddress) the DatabaseAddress

    options

    (MongoOptions) DB Options

    Exceptions thrown

    MongoException on error

    See also

    MongoOptions

    MongoDBAddress

    ServerAddress

  9. def apply(addr: Imports.ServerAddress): MongoConnection

    Permalink

    Connects to a (single) mongodb node.

    Connects to a (single) mongodb node.

    addr

    (ServerAddress) the DatabaseAddress

    Exceptions thrown

    MongoException on error

    See also

    MongoDBAddress

    ServerAddress

  10. def apply(uri: mongodb.MongoURI): MongoConnection

    Permalink

    Connect via a com.mongodb.MongoURI

    Connect via a com.mongodb.MongoURI

    uri

    (com.mongodb.MongoURI)

  11. def apply(uri: MongoURI): MongoConnection

    Permalink

    Connect via a MongoURI

    Connect via a MongoURI

    uri

    (MongoURI)

  12. def apply(replicaSetSeeds: List[Imports.ServerAddress], options: Imports.MongoOptions): MongoConnection

    Permalink

    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

    replicaSetSeeds

    (List[ServerAddress]) The servers to connect to

    Exceptions thrown

    MongoException on error

    See also

    MongoDBAddress

    ServerAddress

  13. def apply(replicaSetSeeds: List[Imports.ServerAddress]): MongoConnection

    Permalink

    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 on error

    See also

    MongoDBAddress

    ServerAddress

  14. def apply(): MongoConnection

    Permalink

    Default connection method - connects to default host & port

    Default connection method - connects to default host & port

    Exceptions thrown

    MongoException on error

    UnknownHostException if cannot connect to the host

  15. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  16. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  17. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  18. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  19. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  20. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  21. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  22. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  23. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  24. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  25. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  26. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  27. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  28. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped