Package

org.mongodb

scala

Permalink

package scala

The MongoDB Scala Driver package

Contains type aliases and companion objects to help when using the Scala API

Since

1.0

Linear Supertypes
Content Hierarchy Learn more about scaladoc diagrams
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. scala
  2. ObservableImplicits
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Type Members

  1. case class AggregateObservable[TResult](wrapped: AggregateIterable[TResult]) extends Observable[TResult] with Product with Serializable

    Permalink

    Observable for aggregate

    Observable for aggregate

    TResult

    The type of the result.

    wrapped

    the underlying java AggregateObservable

    Since

    1.0

  2. implicit class BoxedObservable[T] extends Observable[T]

    Permalink
    Definition Classes
    ObservableImplicits
  3. implicit class BoxedObserver[T] extends Observer[T]

    Permalink
    Definition Classes
    ObservableImplicits
  4. implicit class BoxedSubscription extends Subscription

    Permalink
    Definition Classes
    ObservableImplicits
  5. type BulkWriteResult = com.mongodb.bulk.BulkWriteResult

    Permalink

    The result of a successful bulk write operation.

  6. case class Completed() extends Product with Serializable

    Permalink

    Represents the result of completed operation that produces no real results.

    Represents the result of completed operation that produces no real results.

    This allows Observables to be composed rather than just completing without a result.

  7. case class DistinctObservable[TResult](wrapped: DistinctIterable[TResult]) extends Observable[TResult] with Product with Serializable

    Permalink

    Observable for distinct

    Observable for distinct

    TResult

    The type of the result.

    wrapped

    the underlying java DistinctObservable

    Since

    1.0

  8. type Document = scala.bson.collection.immutable.Document

    Permalink

    An immutable Document implementation.

    An immutable Document implementation.

    A strictly typed Map[String, BsonValue] like structure that traverses the elements in insertion order. Unlike native scala maps there is no variance in the value type and it always has to be a BsonValue.

  9. type DuplicateKeyException = com.mongodb.DuplicateKeyException

    Permalink

    Subclass of WriteConcernException representing a duplicate key exception

  10. case class FindObservable[TResult](wrapped: FindIterable[TResult]) extends Observable[TResult] with Product with Serializable

    Permalink

    Observable interface for Find.

    Observable interface for Find.

    TResult

    The type of the result.

    wrapped

    the underlying java FindObservable

    Since

    1.0

  11. case class ListCollectionsObservable[TResult](wrapped: ListCollectionsIterable[TResult]) extends Observable[TResult] with Product with Serializable

    Permalink

    Observable interface for ListCollections

    Observable interface for ListCollections

    TResult

    The type of the result.

    wrapped

    the underlying java ListCollectionsObservable

    Since

    1.0

  12. case class ListDatabasesObservable[TResult](wrapped: ListDatabasesIterable[TResult]) extends Observable[TResult] with Product with Serializable

    Permalink

    Observable interface for ListDatabases.

    Observable interface for ListDatabases.

    TResult

    The type of the result.

    wrapped

    the underlying java ListDatabasesObservable

    Since

    1.0

  13. case class ListIndexesObservable[TResult](wrapped: ListIndexesIterable[TResult]) extends Observable[TResult] with Product with Serializable

    Permalink

    Observable interface for ListIndexes.

    Observable interface for ListIndexes.

    TResult

    The type of the result.

    wrapped

    the underlying java ListIndexesObservable

    Since

    1.0

  14. case class MapReduceObservable[TResult](wrapped: MapReduceIterable[TResult]) extends Observable[TResult] with Product with Serializable

    Permalink

    Observable for map reduce.

  15. type MongoBulkWriteException = com.mongodb.MongoBulkWriteException

    Permalink

    An exception that represents all errors associated with a bulk write operation.

  16. case class MongoClient(wrapped: com.mongodb.async.client.MongoClient) extends Closeable with Product with Serializable

    Permalink

    A client-side representation of a MongoDB cluster.

    A client-side representation of a MongoDB cluster. Instances can represent either a standalone MongoDB instance, a replica set, or a sharded cluster. Instance of this class are responsible for maintaining an up-to-date state of the cluster, and possibly cache resources related to this, including background threads for monitoring, and connection pools.

    Instance of this class server as factories for MongoDatabase instances.

    wrapped

    the underlying java MongoClient

    Since

    1.0

  17. type MongoClientException = com.mongodb.MongoClientException

    Permalink

    A base class for exceptions indicating a failure condition with the MongoClient.

  18. type MongoClientSettings = com.mongodb.async.client.MongoClientSettings

    Permalink

    Various settings to control the behavior of a MongoClient.

  19. case class MongoCollection[TResult](wrapped: com.mongodb.async.client.MongoCollection[TResult]) extends Product with Serializable

    Permalink

    The MongoCollection representation.

    The MongoCollection representation.

    TResult

    The type that this collection will encode documents from and decode documents to.

    wrapped

    the underlying java MongoCollection

    Since

    1.0

  20. type MongoCommandException = com.mongodb.MongoCommandException

    Permalink

    An exception indicating that a command sent to a MongoDB server returned a failure.

  21. type MongoCredential = com.mongodb.MongoCredential

    Permalink

    Represents credentials to authenticate to a MongoDB server,as well as the source of the credentials and the authentication mechanism to use.

  22. type MongoCursorNotFoundException = com.mongodb.MongoCursorNotFoundException

    Permalink

    Subclass of MongoException representsing a cursor-not-found exception.

  23. case class MongoDatabase(wrapped: com.mongodb.async.client.MongoDatabase) extends Product with Serializable

    Permalink

    The MongoDatabase representation.

    The MongoDatabase representation.

    wrapped

    the underlying java MongoDatabase

    Since

    1.0

  24. type MongoException = com.mongodb.MongoException

    Permalink

    Top level Exception for all Exceptions, server-side or client-side, that come from the driver.

  25. type MongoExecutionTimeoutException = com.mongodb.MongoExecutionTimeoutException

    Permalink

    Exception indicating that the execution of the current operation timed out as a result of the maximum operation time being exceeded.

  26. type MongoIncompatibleDriverException = com.mongodb.MongoIncompatibleDriverException

    Permalink

    An exception indicating that this version of the driver is not compatible with at least one of the servers that it is currently connected to.

  27. type MongoInternalException = com.mongodb.MongoInternalException

    Permalink

    A Mongo exception internal to the driver, not carrying any error code.

  28. type MongoInterruptedException = com.mongodb.MongoInterruptedException

    Permalink

    A non-checked exception indicating that the driver has been interrupted by a call to Thread.interrupt.

  29. type MongoNamespace = com.mongodb.MongoNamespace

    Permalink

    A MongoDB namespace, which includes a database name and collection name.

  30. type MongoNodeIsRecoveringException = com.mongodb.MongoNodeIsRecoveringException

    Permalink

    An exception indicating that the server is a member of a replica set but is in recovery mode, and therefore refused to execute the operation.

    An exception indicating that the server is a member of a replica set but is in recovery mode, and therefore refused to execute the operation. This can happen when a server is starting up and trying to join the replica set.

  31. type MongoNotPrimaryException = com.mongodb.MongoNotPrimaryException

    Permalink

    An exception indicating that the server is a member of a replica set but is not the primary, and therefore refused to execute either a write operation or a read operation that required a primary.

    An exception indicating that the server is a member of a replica set but is not the primary, and therefore refused to execute either a write operation or a read operation that required a primary. This can happen during a replica set election.

  32. type MongoQueryException = com.mongodb.MongoQueryException

    Permalink

    An exception indicating that a query operation failed on the server.

  33. type MongoSecurityException = com.mongodb.MongoSecurityException

    Permalink

    This exception is thrown when there is an error reported by the underlying client authentication mechanism.

  34. type MongoServerException = com.mongodb.MongoServerException

    Permalink

    An exception indicating that some error has been raised by a MongoDB server in response to an operation.

  35. type MongoSocketClosedException = com.mongodb.MongoSocketClosedException

    Permalink

    This exception is thrown when trying to read or write from a closed socket.

  36. type MongoSocketException = com.mongodb.MongoSocketException

    Permalink

    Subclass of MongoException representing a network-related exception

  37. type MongoSocketOpenException = com.mongodb.MongoSocketOpenException

    Permalink

    This exception is thrown when there is an exception opening a Socket.

  38. type MongoSocketReadException = com.mongodb.MongoSocketReadException

    Permalink

    This exception is thrown when there is an exception reading a response from a Socket.

  39. type MongoSocketReadTimeoutException = com.mongodb.MongoSocketReadTimeoutException

    Permalink

    This exception is thrown when there is a timeout reading a response from the socket.

  40. type MongoSocketWriteException = com.mongodb.MongoSocketWriteException

    Permalink

    This exception is thrown when there is an exception writing a response to a Socket.

  41. type MongoTimeoutException = com.mongodb.MongoTimeoutException

    Permalink

    An exception indicating that the driver has timed out waiting for either a server or a connection to become available.

  42. type MongoWaitQueueFullException = com.mongodb.MongoWaitQueueFullException

    Permalink

    An exception indicating that the queue for waiting for a pooled connection is full.

    An exception indicating that the queue for waiting for a pooled connection is full.

    See also

    http://api.mongodb.org/java/current/com/mongodb/connection/ConnectionPoolSettings.html#getMaxWaitQueueSize--

  43. type MongoWriteConcernException = com.mongodb.MongoWriteConcernException

    Permalink

    An exception indicating a failure to apply the write concern to the requested write operation

    An exception indicating a failure to apply the write concern to the requested write operation

    See also

    WriteConcern

  44. type MongoWriteException = com.mongodb.MongoWriteException

    Permalink

    An exception indicating the failure of a write operation.

  45. trait Observable[T] extends com.mongodb.async.client.Observable[T]

    Permalink

    A Observable represents a MongoDB operation.

    A Observable represents a MongoDB operation.

    As such it is a provider of a potentially unbounded number of sequenced elements, publishing them according to the demand received from its Observer(s).

    T

    the type of element signaled.

  46. trait ObservableImplicits extends AnyRef

    Permalink

    Extends the Java Observable and adds helpers to make Observables composable and simple to Subscribe to.

    Extends the Java Observable and adds helpers to make Observables composable and simple to Subscribe to.

    Automatically imported into the org.mongodb.scala namespace

  47. trait Observer[T] extends com.mongodb.async.client.Observer[T]

    Permalink

    A Scala based wrapper of the Observer interface which provides a mechanism for receiving push-based notifications.

    A Scala based wrapper of the Observer interface which provides a mechanism for receiving push-based notifications.

    Will receive a call to Observer.onSubscribe(subscription: Subscription) on subscription to the Observable.

    Default implementations of this trait are greedy and will call Subscription.request with Long.MaxValue so that all results are requested. Custom implementations of the onSubscribe method can be used to control "back-pressure" and ensure that only demand that the Observer is capable of handling is requested.

    After signaling demand:

    - One or more invocations of Observer.onNext up to the maximum number defined by Subscription.request - Single invocation of Observer.onError or Observer.onComplete which signals a terminal state after which no further events will be sent.

    T

    The type of element signaled.

  48. type ReadPreference = com.mongodb.ReadPreference

    Permalink

    Represents preferred replica set members to which a query or command can be sent.

  49. implicit class ScalaObservable[T] extends AnyRef

    Permalink

    Extends the Java Observable and adds helpers to make Observables composable and simple to Subscribe to.

    Extends the Java Observable and adds helpers to make Observables composable and simple to Subscribe to.

    T

    the type of result the Observable emits

    Definition Classes
    ObservableImplicits
  50. type ServerAddress = com.mongodb.ServerAddress

    Permalink

    Represents the location of a MongoDB server

  51. trait Subscription extends com.mongodb.async.client.Subscription

    Permalink

    A Subscription represents a one-to-one lifecycle of a Observer subscribing to an Observable.

    A Subscription represents a one-to-one lifecycle of a Observer subscribing to an Observable.

    Instances can only be used once by a single Observer.

    It is used to both signal desire for data and to allow for unsubscribing.

  52. type Tag = com.mongodb.Tag

    Permalink

    A replica set tag

  53. type TagSet = com.mongodb.TagSet

    Permalink

    An immutable set of tags, used to select members of a replica set to use for read operations.

  54. type TaggableReadPreference = com.mongodb.TaggableReadPreference

    Permalink

    Represents ReadPreferences that can be combined with tags

  55. type WriteConcern = com.mongodb.WriteConcern

    Permalink

    Controls the acknowledgment of write operations with various options.

  56. type WriteConcernException = com.mongodb.WriteConcernException

    Permalink

    An exception representing an error reported due to a write failure.

  57. type WriteConcernResult = com.mongodb.WriteConcernResult

    Permalink

    The result of a successful write operation.

    The result of a successful write operation. If the write was unacknowledged, then wasAcknowledged will return false and all other methods with throw MongoUnacknowledgedWriteException.

    See also

    WriteConcern

  58. type WriteError = com.mongodb.WriteError

    Permalink

    Represents the details of a write error , e.g.

    Represents the details of a write error , e.g. a duplicate key error

Value Members

  1. val Document: scala.bson.collection.immutable.Document.type

    Permalink

    An immutable Document implementation.

    An immutable Document implementation.

    A strictly typed Map[String, BsonValue] like structure that traverses the elements in insertion order. Unlike native scala maps there is no variance in the value type and it always has to be a BsonValue.

  2. object MongoClient extends Serializable

    Permalink

    Companion object for creating new MongoClient instances

    Companion object for creating new MongoClient instances

    Since

    1.0

  3. object MongoClientSettings

    Permalink

    A MongoClientSettings companion object

    A MongoClientSettings companion object

    Since

    1.0

  4. object MongoCredential

    Permalink

    Represents credentials to authenticate to a MongoDB server, as well as the source of the credentials and the authentication mechanism to use.

    Represents credentials to authenticate to a MongoDB server, as well as the source of the credentials and the authentication mechanism to use.

    Since

    1.0

  5. object MongoNamespace

    Permalink

    A companion object for MongoNamespace

    A companion object for MongoNamespace

    Since

    1.0

  6. object Observable

    Permalink

    A companion object for Observable

  7. object ReadPreference

    Permalink

    The preferred replica set members to which a query or command can be sent.

    The preferred replica set members to which a query or command can be sent.

    Since

    1.0

  8. object ServerAddress

    Permalink

    Represents the location of a MongoDB server - i.e.

    Represents the location of a MongoDB server - i.e. server name and port number

    Since

    1.0

  9. object Tag

    Permalink

    A replica set tag.

  10. object TagSet

    Permalink

    An immutable set of tags, used to select members of a replica set to use for read operations.

  11. object WriteConcern

    Permalink

    Controls the acknowledgment of write operations with various options.

    Controls the acknowledgment of write operations with various options.

    w

    - 0: Don't wait for acknowledgement from the server - 1: Wait for acknowledgement, but don't wait for secondaries to replicate - >=2: Wait for one or more secondaries to also acknowledge

    wtimeout - how long to wait for slaves before failing

    - 0: indefinite - >0: time to wait in milliseconds

    Other options:

    - j: If true block until write operations have been committed to the journal. Cannot be used in combination with fsync. Prior to MongoDB 2.6 this option was ignored if the server was running without journaling. Starting with MongoDB 2.6 write operations will fail with an exception if this option is used when the server is running without journaling. - fsync: If true and the server is running without journaling, blocks until the server has synced all data files to disk. If the server is running with journaling, this acts the same as the j option, blocking until write operations have been committed to the journal. Cannot be used in combination with j. In almost all cases the j flag should be used in preference to this one.

    Since

    1.0

  12. package bson

    Permalink

    The bson package, contains mirrors and companion objects for Bson values.

  13. implicit def classTagToClassOf[C](ct: ClassTag[C]): Class[C]

    Permalink

    Helper to get the class from a classTag

    Helper to get the class from a classTag

    C

    the class type

    ct

    the classTag we want to implicitly get the class of

    returns

    the classOf[C]

  14. package connection

    Permalink

    The connection package contains classes that manage connecting to MongoDB servers.

  15. package model

    Permalink

    The model package containing models and options that help describe MongoCollection operations

Inherited from ObservableImplicits

Inherited from AnyRef

Inherited from Any

Ungrouped