Packages

p

org.mongodb

scala

package scala

Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. scala
  2. WriteConcernImplicits
  3. ObservableImplicits
  4. AnyRef
  5. 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

    Observable for aggregate

    Observable for aggregate

    TResult

    The type of the result.

    wrapped

    the underlying java AggregateObservable

    Since

    1.0

  2. type BulkWriteResult = com.mongodb.bulk.BulkWriteResult

    The result of a successful bulk write operation.

  3. case class Completed () extends Product with Serializable

    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.

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

    Observable for distinct

    Observable for distinct

    TResult

    The type of the result.

    wrapped

    the underlying java DistinctObservable

    Since

    1.0

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

    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.

  6. type DuplicateKeyException = com.mongodb.DuplicateKeyException

    Subclass of WriteConcernException representing a duplicate key exception

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

    Observable interface for Find.

    Observable interface for Find.

    TResult

    The type of the result.

    wrapped

    the underlying java FindObservable

    Since

    1.0

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

    Observable interface for ListCollections

    Observable interface for ListCollections

    TResult

    The type of the result.

    wrapped

    the underlying java ListCollectionsObservable

    Since

    1.0

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

    Observable interface for ListDatabases.

    Observable interface for ListDatabases.

    TResult

    The type of the result.

    wrapped

    the underlying java ListDatabasesObservable

    Since

    1.0

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

    Observable interface for ListIndexes.

    Observable interface for ListIndexes.

    TResult

    The type of the result.

    wrapped

    the underlying java ListIndexesObservable

    Since

    1.0

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

    Observable for map reduce.

  12. type MongoBulkWriteException = com.mongodb.MongoBulkWriteException

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

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

    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

  14. type MongoClientException = com.mongodb.MongoClientException

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

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

    Various settings to control the behavior of a MongoClient.

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

    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

  17. type MongoCommandException = com.mongodb.MongoCommandException

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

  18. type MongoCredential = com.mongodb.MongoCredential

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

  19. type MongoCursorNotFoundException = com.mongodb.MongoCursorNotFoundException

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

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

    The MongoDatabase representation.

    The MongoDatabase representation.

    wrapped

    the underlying java MongoDatabase

    Since

    1.0

  21. type MongoDriverInformation = com.mongodb.client.MongoDriverInformation

    The MongoDriverInformation class allows driver and library authors to add extra information about their library.

    The MongoDriverInformation class allows driver and library authors to add extra information about their library. This information is then available in the MongoD/MongoS logs.

    The following metadata can be included when creating a MongoClient.

    • The driver name. Eg: mongo-scala-driver
    • The driver version. Eg: 1.2.0
    • Extra platform information. Eg: Scala 2.11

    Note: Library authors are responsible for accepting MongoDriverInformation from external libraries using their library. Also all the meta data is limited to 512 bytes and any excess data will be truncated.

    Since

    1.2

    Note

    Requires MongoDB 3.4 or greater

  22. type MongoException = com.mongodb.MongoException

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

  23. type MongoExecutionTimeoutException = com.mongodb.MongoExecutionTimeoutException

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

  24. type MongoIncompatibleDriverException = com.mongodb.MongoIncompatibleDriverException

    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.

  25. type MongoInternalException = com.mongodb.MongoInternalException

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

  26. type MongoInterruptedException = com.mongodb.MongoInterruptedException

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

  27. type MongoNamespace = com.mongodb.MongoNamespace

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

  28. type MongoNodeIsRecoveringException = com.mongodb.MongoNodeIsRecoveringException

    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.

  29. type MongoNotPrimaryException = com.mongodb.MongoNotPrimaryException

    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.

  30. type MongoQueryException = com.mongodb.MongoQueryException

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

  31. type MongoSecurityException = com.mongodb.MongoSecurityException

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

  32. type MongoServerException = com.mongodb.MongoServerException

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

  33. type MongoSocketClosedException = com.mongodb.MongoSocketClosedException

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

  34. type MongoSocketException = com.mongodb.MongoSocketException

    Subclass of MongoException representing a network-related exception

  35. type MongoSocketOpenException = com.mongodb.MongoSocketOpenException

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

  36. type MongoSocketReadException = com.mongodb.MongoSocketReadException

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

  37. type MongoSocketReadTimeoutException = com.mongodb.MongoSocketReadTimeoutException

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

  38. type MongoSocketWriteException = com.mongodb.MongoSocketWriteException

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

  39. type MongoTimeoutException = com.mongodb.MongoTimeoutException

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

  40. type MongoWaitQueueFullException = com.mongodb.MongoWaitQueueFullException

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

  41. type MongoWriteConcernException = com.mongodb.MongoWriteConcernException

    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

  42. type MongoWriteException = com.mongodb.MongoWriteException

    An exception indicating the failure of a write operation.

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

    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.

  44. trait ObservableImplicits extends AnyRef

    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

  45. implicit class BoxedObservable [T] extends Observable[T]
    Definition Classes
    ObservableImplicits
  46. implicit class BoxedObserver [T] extends Observer[T]
    Definition Classes
    ObservableImplicits
  47. implicit class BoxedSubscription extends Subscription
    Definition Classes
    ObservableImplicits
  48. implicit class ScalaObservable [T] extends AnyRef

    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
  49. trait Observer [T] extends com.mongodb.async.client.Observer[T]

    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.

  50. type ReadConcern = com.mongodb.ReadConcern

    Controls the level of isolation for reads.

    Controls the level of isolation for reads.

    Since

    1.1

  51. type ReadConcernLevel = com.mongodb.ReadConcernLevel

    The readConcern option allows clients to choose a level of isolation for their reads.

    The readConcern option allows clients to choose a level of isolation for their reads.

    Since

    1.1

    See also

    ReadConcern

  52. type ReadPreference = com.mongodb.ReadPreference

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

  53. implicit class ScalaWriteConcern[T] extends AnyRef
    Definition Classes
    WriteConcernImplicits
  54. type ServerAddress = com.mongodb.ServerAddress

    Represents the location of a MongoDB server

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

    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.

  56. type Tag = com.mongodb.Tag

    A replica set tag

  57. type TagSet = com.mongodb.TagSet

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

  58. type TaggableReadPreference = com.mongodb.TaggableReadPreference

    Represents ReadPreferences that can be combined with tags

  59. type WriteConcern = com.mongodb.WriteConcern

    Controls the acknowledgment of write operations with various options.

  60. type WriteConcernException = com.mongodb.WriteConcernException

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

  61. type WriteConcernResult = com.mongodb.WriteConcernResult

    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

  62. type WriteError = com.mongodb.WriteError

    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

    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. implicit def bsonDocumentToDocument(doc: BsonDocument): Document
  3. implicit def bsonDocumentToUntypedDocument(doc: BsonDocument): bson.Document
  4. implicit def classTagToClassOf[C](ct: ClassTag[C]): Class[C]

    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]

  5. implicit def documentToUntypedDocument(doc: Document): bson.Document
  6. object BuildInfo extends Product with Serializable

    This object was generated by sbt-buildinfo.

  7. object MongoClient extends Serializable

    Companion object for creating new MongoClient instances

    Companion object for creating new MongoClient instances

    Since

    1.0

  8. object MongoClientSettings

    A MongoClientSettings companion object

    A MongoClientSettings companion object

    Since

    1.0

  9. object MongoCredential

    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

  10. object MongoDriverInformation

    The options regarding collation support in MongoDB 3.4+

    The options regarding collation support in MongoDB 3.4+

    Since

    1.2

    Note

    Requires MongoDB 3.4 or greater

  11. object MongoNamespace

    A companion object for MongoNamespace

    A companion object for MongoNamespace

    Since

    1.0

  12. object Observable

    A companion object for Observable

  13. object ReadConcern

    The readConcern option allows clients to choose a level of isolation for their reads.

    The readConcern option allows clients to choose a level of isolation for their reads.

    Since

    1.1

    Note

    Requires MongoDB 3.2 or greater

  14. object ReadConcernLevel

    The readConcern level of isolation for reads.

    The readConcern level of isolation for reads.

    Since

    1.1

    Note

    Requires MongoDB 3.2 or greater

  15. object ReadPreference

    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

  16. object ServerAddress

    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

  17. object Tag

    A replica set tag.

  18. object TagSet

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

  19. object WriteConcern

    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 - "majority": Wait for a majority of secondaries to also acknowledge - "<tag set name>": Wait for one or more secondaries to also acknowledge based on a tag set name

    wTimeout - how long to wait for slaves before failing

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

    Other options:

    - journal: 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.

    Implicit helper

    The ScalaWriteConcern implicit allows for chainable building of the WriteConcern eg:

    val myWriteConcern = WriteConcern.ACKNOWLEDGED.withJournal(true)).withWTimeout(Duration(10, TimeUnit.MILLISECONDS))
    Since

    1.0

Inherited from WriteConcernImplicits

Inherited from ObservableImplicits

Inherited from AnyRef

Inherited from Any

Ungrouped