watch

abstract fun watch(): ChangeStreamFlow<Document>

Creates a change stream for this database.

Return

the change stream iterable

Since

3.8


abstract fun <TResult : Any> watch(resultClass: KClass<out TResult>): ChangeStreamFlow<TResult>

Creates a change stream for this database.

Return

the change stream iterable

Since

3.8

Parameters

resultClass

the class to decode each document into

the target document type of the iterable.

abstract fun watch(pipeline: List<Bson>): ChangeStreamFlow<Document>

Creates a change stream for this database.

Return

the change stream iterable

Since

3.8

Parameters

pipeline

the aggregation pipeline to apply to the change stream.


abstract fun <TResult : Any> watch(pipeline: List<Bson>, resultClass: KClass<out TResult>): ChangeStreamFlow<TResult>

Creates a change stream for this database.

Return

the change stream iterable

Since

3.8

Parameters

pipeline

the aggregation pipeline to apply to the change stream

resultClass

the class to decode each document into

the target document type of the iterable.

abstract fun watch(clientSession: ClientSession): ChangeStreamFlow<Document>

Creates a change stream for this database.

Return

the change stream iterable

Since

3.8

Parameters

clientSession

the client session with which to associate this operation


abstract fun <TResult : Any> watch(clientSession: ClientSession, resultClass: KClass<out TResult>): ChangeStreamFlow<TResult>

Creates a change stream for this database.

Return

the change stream iterable

Since

3.8

Parameters

clientSession

the client session with which to associate this operation

resultClass

the class to decode each document into

the target document type of the iterable.

abstract fun watch(clientSession: ClientSession, pipeline: List<Bson>): ChangeStreamFlow<Document>

Creates a change stream for this database.

Return

the change stream iterable

Since

3.8

Parameters

clientSession

the client session with which to associate this operation

pipeline

the aggregation pipeline to apply to the change stream.


abstract fun <TResult : Any> watch(    clientSession: ClientSession,     pipeline: List<Bson>,     resultClass: KClass<out TResult>): ChangeStreamFlow<TResult>

Creates a change stream for this database.

Return

the change stream iterable

Since

3.8

Parameters

clientSession

the client session with which to associate this operation

pipeline

the aggregation pipeline to apply to the change stream

resultClass

the class to decode each document into

the target document type of the iterable.