Observable for aggregate
Observable for aggregate
The type of the result.
the underlying java AggregateObservable
1.0
The result of a successful bulk write operation.
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.
Observable for distinct
Observable for distinct
The type of the result.
the underlying java DistinctObservable
1.0
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
.
Subclass of WriteConcernException representing a duplicate key exception
Observable interface for Find.
Observable interface for Find.
The type of the result.
the underlying java FindObservable
1.0
Observable interface for ListCollections
Observable interface for ListCollections
The type of the result.
the underlying java ListCollectionsObservable
1.0
Observable interface for ListDatabases.
Observable interface for ListDatabases.
The type of the result.
the underlying java ListDatabasesObservable
1.0
Observable interface for ListIndexes.
Observable interface for ListIndexes.
The type of the result.
the underlying java ListIndexesObservable
1.0
Observable for map reduce.
An exception that represents all errors associated with a bulk write operation.
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.
the underlying java MongoClient
1.0
A base class for exceptions indicating a failure condition with the MongoClient.
Various settings to control the behavior of a MongoClient
.
The MongoCollection representation.
The MongoCollection representation.
The type that this collection will encode documents from and decode documents to.
the underlying java MongoCollection
1.0
An exception indicating that a command sent to a MongoDB server returned a failure.
Represents credentials to authenticate to a MongoDB server,as well as the source of the credentials and the authentication mechanism to use.
Subclass of MongoException representsing a cursor-not-found exception.
The MongoDatabase representation.
The MongoDatabase representation.
the underlying java MongoDatabase
1.0
Top level Exception for all Exceptions, server-side or client-side, that come from the driver.
Exception indicating that the execution of the current operation timed out as a result of the maximum operation time being exceeded.
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.
A Mongo exception internal to the driver, not carrying any error code.
A non-checked exception indicating that the driver has been interrupted by a call to Thread.interrupt
.
A MongoDB namespace, which includes a database name and collection name.
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.
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.
An exception indicating that a query operation failed on the server.
This exception is thrown when there is an error reported by the underlying client authentication mechanism.
An exception indicating that some error has been raised by a MongoDB server in response to an operation.
This exception is thrown when trying to read or write from a closed socket.
Subclass of MongoException representing a network-related exception
This exception is thrown when there is an exception opening a Socket.
This exception is thrown when there is an exception reading a response from a Socket.
This exception is thrown when there is a timeout reading a response from the socket.
This exception is thrown when there is an exception writing a response to a Socket.
An exception indicating that the driver has timed out waiting for either a server or a connection to become available.
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.
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
An exception indicating the failure of a write operation.
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).
the type of element signaled.
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
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.
The type of element signaled.
Represents preferred replica set members to which a query or command can be sent.
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.
the type of result the Observable emits
Represents the location of a MongoDB server
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.
A replica set tag
An immutable set of tags, used to select members of a replica set to use for read operations.
Represents ReadPreferences that can be combined with tags
Controls the acknowledgment of write operations with various options.
An exception representing an error reported due to a write failure.
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
.
Represents the details of a write error , e.g.
Represents the details of a write error , e.g. a duplicate key error
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
.
Companion object for creating new MongoClient instances
Companion object for creating new MongoClient instances
1.0
A MongoClientSettings companion object
A MongoClientSettings companion object
1.0
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.
1.0
A companion object for MongoNamespace
A companion object for MongoNamespace
1.0
A companion object for Observable
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.
1.0
Represents the location of a MongoDB server - i.e.
Represents the location of a MongoDB server - i.e. server name and port number
1.0
A replica set tag.
An immutable set of tags, used to select members of a replica set to use for read operations.
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
- 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.
The ScalaWriteConcern implicit allows for chainable building of the WriteConcern eg:
val myWriteConcern = WriteConcern.ACKNOWLEDGED.withJournal(true)).withWTimeout(Duration(10, TimeUnit.MILLISECONDS))
1.0
The bson package, contains mirrors and companion objects for Bson
values.
Helper to get the class from a classTag
Helper to get the class from a classTag
the class type
the classTag we want to implicitly get the class of
the classOf[C]
The connection package contains classes that manage connecting to MongoDB servers.
The model package containing models and options that help describe MongoCollection
operations
The MongoDB Scala Driver package
Contains type aliases and companion objects to help when using the Scala API
1.0