/** * Gets the number of documents to skip. The default is 0. * * @return the number of documents to skip, which may be null * @mongodb.driver.manual reference/method/cursor.skip/#cursor.skip Skip */ public int getSkip() { return options.getSkip(); }
/** * Counts the number of objects matching the query this does take limit/skip into consideration * * @return the number of objects * @throws MongoException if the operation failed * @see #count() */ public int size() { DBCollectionCountOptions countOptions = getDbCollectionCountOptions().skip(findOptions.getSkip()).limit(findOptions.getLimit()); return (int) collection.getCount(getQuery(), countOptions); }
assertEquals(15, options.getMaxTime(TimeUnit.MINUTES)); assertEquals(45, options.getMaxAwaitTime(TimeUnit.SECONDS)); assertEquals(12, options.getSkip()); assertEquals(new BasicDBObject("field", -1), options.getSort()); assertEquals(CursorType.TailableAwait, options.getCursorType());
.filter(collection.wrapAllowNull(filter)) .batchSize(findOptions.getBatchSize()) .skip(findOptions.getSkip()) .limit(findOptions.getLimit()) .maxAwaitTime(findOptions.getMaxAwaitTime(MILLISECONDS), MILLISECONDS)
/** * Gets the number of documents to skip. The default is 0. * * @return the number of documents to skip, which may be null * @mongodb.driver.manual reference/method/cursor.skip/#cursor.skip Skip */ public int getSkip() { return options.getSkip(); }
/** * Counts the number of objects matching the query this does take limit/skip into consideration * * @return the number of objects * @throws MongoException if the operation failed * @see #count() */ public int size() { DBCollectionCountOptions countOptions = getDbCollectionCountOptions().skip(findOptions.getSkip()).limit(findOptions.getLimit()); return (int) collection.getCount(getQuery(), countOptions); }
.filter(collection.wrapAllowNull(filter)) .batchSize(findOptions.getBatchSize()) .skip(findOptions.getSkip()) .limit(findOptions.getLimit()) .maxAwaitTime(findOptions.getMaxAwaitTime(MILLISECONDS), MILLISECONDS)