DATAMONGO-501: Initial push for Tailable Cursor Support (Review Only) #9
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request is meant for review purpose only and to demonstrate the prototype developed, and collecting opinions and views about the new feature that is planned to be added to MongoTemplate to tail a capped collection.
Some information about tailable cursors can be found here
http://www.mongodb.org/display/DOCS/Tailable+Cursors
The feature included in mongo template looks like this
The first two parameters are the name of the capped collection to be tailed and the increasing key which forms the basis for tailing the collection.
The third parameter is an implementation of TailingCursorDocumentListener which is the callback interface whose processDocument is invoked when a new document is found at the tail of the collection.
The handle is primarily used to let the invoking process stop the tailing that happens asynchronously.
See
MongoTemplateTests
for some test cases written around tailable cursor.