public FindOneAndReplaceOptions maxTime(final long maxTime, final TimeUnit timeUnit) {
        notNull("timeUnit", timeUnit);
        this.maxTimeMS = MILLISECONDS.convert(maxTime, timeUnit);
        return this;
    }
public FindOneAndReplaceOptions maxTime(final long maxTime, final TimeUnit timeUnit) {
        notNull("timeUnit", timeUnit);
        this.maxTimeMS = MILLISECONDS.convert(maxTime, timeUnit);
        return this;
    }
public FindOneAndReplaceOptions maxTime ( final long maxTime , final TimeUnit timeUnit ) { notNull ( "timeUnit" , timeUnit ) ; this . maxTimeMS = MILLISECONDS . convert ( maxTime , timeUnit ) ; return this ; }
Sets the maximum execution time on the server for this operation.

@param maxTime  the max time
@param timeUnit the time unit, which may not be null
@return this
Sets the maximum execution time on the server for this operation .