WatchQueryBuilder

final case class WatchQueryBuilder[F[_], T] extends QueryBuilder[[TResult <: <FromJavaObject>] =>> ChangeStreamPublisher[TResult], T]
trait Serializable
trait Product
trait Equals
trait QueryBuilder[[TResult <: <FromJavaObject>] =>> ChangeStreamPublisher[TResult], T]
class Object
trait Matchable
class Any

Value members

Concrete methods

def batchSize(size: Int): WatchQueryBuilder[F, T]

Sets the number of documents to return per batch.

Sets the number of documents to return per batch.

Overrides the Subscription#request value for setting the batch size, allowing for fine grained control over the underlying cursor.

Value parameters:
size

the batch size

Returns:

WatchQueryBuilder

Since:

1.8

def boundedStream(capacity: Int): Stream[F, ChangeStreamDocument[T]]
def collation(collation: Collation): WatchQueryBuilder[F, T]

Sets the collation options

Sets the collation options

Value parameters:
collation

the collation options to use

Returns:

WatchQueryBuilder

def fullDocument(fullDocument: FullDocument): WatchQueryBuilder[F, T]

Sets the fullDocument value.

Sets the fullDocument value.

Value parameters:
fullDocument

the fullDocument

Returns:

WatchQueryBuilder

def maxAwaitTime(maxAwaitTime: Duration): WatchQueryBuilder[F, T]

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

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

Value parameters:
maxAwaitTime

the max await time.

Returns:

WatchQueryBuilder

def resumeAfter(resumeToken: BsonDocument): WatchQueryBuilder[F, T]

Sets the logical starting point for the new change stream.

Sets the logical starting point for the new change stream.

Value parameters:
resumeToken

the resume token

Returns:

WatchQueryBuilder

def startAfter(startAfter: BsonDocument): WatchQueryBuilder[F, T]

Similar to resumeAfter, this option takes a resume token and starts a new change stream returning the first notification after the token.

Similar to resumeAfter, this option takes a resume token and starts a new change stream returning the first notification after the token.

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

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

Value parameters:
startAfter

the startAfter resumeToken

Returns:

WatchQueryBuilder

def startAtOperationTime(startAtOperationTime: BsonTimestamp): WatchQueryBuilder[F, T]

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

The change stream will only provide changes that occurred 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.

Value parameters:
startAtOperationTime

the start at operation time

Returns:

WatchQueryBuilder

Since:

1.9

def stream: Stream[F, ChangeStreamDocument[T]]

Inherited methods

def productElementNames: Iterator[String]
Inherited from:
Product
def productIterator: Iterator[Any]
Inherited from:
Product