TResult
- The type of documents the cursor containspublic interface MongoChangeStreamCursor<TResult> extends MongoCursor<TResult>
An application should ensure that a cursor is closed in all circumstances, e.g. using a try-with-resources statement:
try (MongoChangeStreamCursor<Document> cursor = collection.find().cursor()) { while (cursor.hasNext()) { System.out.println(cursor.next()); } }
Modifier and Type | Method and Description |
---|---|
BsonDocument |
getResumeToken()
Returns the resume token.
|
close, getServerAddress, getServerCursor, hasNext, next, tryNext
@Nullable BsonDocument getResumeToken()
Copyright © 2010 - 2023 Adobe. All Rights Reserved