timeoutMode

@Alpha(value = [Reason.CLIENT])
fun timeoutMode(timeoutMode: TimeoutMode): AggregateIterable<T>

Sets the timeoutMode for the cursor.

Requires the timeout to be set, either in the com.mongodb.MongoClientSettings, via MongoDatabase or via MongoCollection

If the timeout is set then:

  • For non-tailable cursors, the default value of timeoutMode is TimeoutMode.CURSOR_LIFETIME

  • For tailable cursors, the default value of timeoutMode is TimeoutMode.ITERATION and its an error to configure it as: TimeoutMode.CURSOR_LIFETIME

Return

this

Since

5.2

Parameters

timeoutMode

the timeout mode