Class

org.mongodb.scala

ChangeStreamObservable

Related Doc: package scala

Permalink

case class ChangeStreamObservable[TResult](wrapped: ChangeStreamIterable[TResult]) extends Observable[ChangeStreamDocument[TResult]] with Product with Serializable

Observable for change streams.

Note: The ChangeStreamDocument class will not be applicable for all change stream outputs. If using custom pipelines that radically change the result, the the ChangeStreamObservable#withDocumentClass method should be used to provide an alternative document format.

TResult

The type of the result.

wrapped

the underlying java ChangeStreamIterable

Since

2.2

Note

Requires MongoDB 3.6 or greater

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ChangeStreamObservable
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. Observable
  7. Observable
  8. AnyRef
  9. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ChangeStreamObservable(wrapped: ChangeStreamIterable[TResult])

    Permalink

    wrapped

    the underlying java ChangeStreamIterable

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. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def batchSize(batchSize: Int): ChangeStreamObservable[TResult]

    Permalink

    Sets the number of documents to return per batch.

    Sets the number of documents to return per batch.

    batchSize

    the batch size

    returns

    this

  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. def collation(collation: Collation): ChangeStreamObservable[TResult]

    Permalink

    Sets the collation options

    Sets the collation options

    A null value represents the server default.

    collation

    the collation options to use

    returns

    this

  8. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  9. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. def fullDocument(fullDocument: FullDocument): ChangeStreamObservable[TResult]

    Permalink

    Sets the fullDocument value.

    Sets the fullDocument value.

    fullDocument

    the fullDocument

    returns

    this

  11. final def getClass(): Class[_]

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

    Permalink
    Definition Classes
    Any
  13. def maxAwaitTime(duration: Duration): ChangeStreamObservable[TResult]

    Permalink

    Sets the maximum await execution time on the server for this operation.

    Sets the maximum await execution time on the server for this operation.

    Max Time

    duration

    the duration

    returns

    this

  14. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  17. def resumeAfter(resumeToken: Document): ChangeStreamObservable[TResult]

    Permalink

    Sets the logical starting point for the new change stream.

    Sets the logical starting point for the new change stream.

    resumeToken

    the resume token

    returns

    this

  18. def startAfter(startAfter: Document): ChangeStreamObservable[TResult]

    Permalink

    Sets the logical starting point for the new change stream.

    Sets the logical starting point for the new change stream.

    This will allow users to watch collections that have been dropped and recreated or newly renamed collections without missing any notifications.

    startAfter

    the resume token

    returns

    this

    Since

    2.7

    Note

    The server will report an error if both startAfter and resumeAfter are specified.

    ,

    Requires MongoDB 4.2 or greater

    See also

    Change stream start after

  19. def startAtOperationTime(startAtOperationTime: BsonTimestamp): ChangeStreamObservable[TResult]

    Permalink

    The change stream will only provide changes that occurred at or after the specified timestamp.

    The change stream will only provide changes that occurred at or after the specified timestamp.

    Any command run against the server will return an operation time that can be used here. The default value is an operation time obtained from the server before the change stream was created.

    startAtOperationTime

    the start at operation time

    returns

    this

    Since

    2.4

    Note

    Requires MongoDB 4.0 or greater

  20. def subscribe(observer: Observer[_ >: ChangeStreamDocument[TResult]]): Unit

    Permalink

    Request Observable to start streaming data.

    Request Observable to start streaming data.

    This is a "factory method" and can be called multiple times, each time starting a new Subscription. Each Subscription will work for only a single Observer.

    If the Observable rejects the subscription attempt or otherwise fails it will signal the error via Observer.onError.

    observer

    the Observer that will consume signals from this Observable

    Definition Classes
    ChangeStreamObservableObservable
  21. def subscribe(observer: com.mongodb.async.client.Observer[_ >: ChangeStreamDocument[TResult]]): Unit

    Permalink

    Handles the automatic boxing of a Java Observable so it conforms to the interface.

    Handles the automatic boxing of a Java Observable so it conforms to the interface.

    observer

    the Observer that will consume signals from this Observable

    Definition Classes
    Observable → Observable
    Note

    Users should not have to implement this method but rather use the Scala Observable.

  22. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  23. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  26. def withDocumentClass[T](clazz: Class[T]): Observable[T]

    Permalink

    Returns an Observable containing the results of the change stream based on the document class provided.

    Returns an Observable containing the results of the change stream based on the document class provided.

    T

    the result type

    clazz

    the class to use for the raw result.

    returns

    an Observable

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from Observable[ChangeStreamDocument[TResult]]

Inherited from AnyRef

Inherited from Any

Ungrouped