driver-legacy/src/main/com/mongodb/DBCursor.java
@Nullable
    public DBObject tryNext() {
        if (cursor == null) {
            FindOperation<DBObject> operation = getQueryOperation(decoder);
            if (!operation.getCursorType().isTailable()) {
                throw new IllegalArgumentException("Can only be used with a tailable cursor");
            }
            initializeCursor(operation);
        }
        DBObject next = cursor.tryNext();
        setServerCursorOnFinalizer(cursor.getServerCursor());
        return currentObject(next);
    }
@Nullable
    public DBObject tryNext() {
        if (cursor == null) {
            FindOperation<DBObject> operation = getQueryOperation(decoder);
            if (!operation.getCursorType().isTailable()) {
                throw new IllegalArgumentException("Can only be used with a tailable cursor");
            }
            initializeCursor(operation);
        }
        DBObject next = cursor.tryNext();
        setServerCursorOnFinalizer(cursor.getServerCursor());
        return currentObject(next);
    }
@ Nullable public DBObject tryNext ( ) { if ( cursor == null ) { FindOperation < DBObject > operation = getQueryOperation ( decoder ) ; if ( ! operation . getCursorType ( ) . isTailable ( ) ) { throw new IllegalArgumentException ( "Can only be used with a tailable cursor" ) ; } initializeCursor ( operation ) ; } DBObject next = cursor . tryNext ( ) ; setServerCursorOnFinalizer ( cursor . getServerCursor ( ) ) ; return currentObject ( next ) ; }
Non blocking check for tailable cursors to see if another object is available.

<p>Returns the object the cursor is at and moves the cursor ahead by one or
return null if no documents is available.</p>

@return the next element or null
@throws MongoException if failed
@throws IllegalArgumentException if the cursor is not tailable
@mongodb.driver.manual /core/cursors/#cursor-batches Cursor Batches
Non blocking check for tailable cursors to see if another object is available .