maxTimeMS property

int? maxTimeMS
final

The cumulative time limit in milliseconds for processing operations on the cursor. MongoDB aborts the operation at the earliest following interrupt point. Tip When specifying linearizable read concern, always use maxTimeMS in case a majority of data bearing members are unavailable. maxTimeMS ensures that the operation does not block indefinitely and instead ensures that the operation returns an error if the read concern cannot be fulfilled.

Implementation

final int? maxTimeMS;