Interface MongoResult<TDocument>

    • Method Detail

      • first

        default void first​(Handler<AsyncResult<TDocument>> resultHandler)
        Handler called with the first item of the result
        Parameters:
        resultHandler - handler
      • first

        Future<TDocument> first()
        Returns a future of the first item of the result
        Returns:
        a future of the first item of the result
      • all

        default void all​(Handler<AsyncResult<java.util.List<TDocument>>> resultHandler)
        Handler called with a list containing all items of the result
        Parameters:
        resultHandler - handler called with a list containing all items of the result
      • all

        Future<java.util.List<TDocument>> all()
        Returns a future of the list containing all items of the result
        Returns:
        a future of the list containing all items of the result
      • some

        default void some​(int maxItems,
                          Handler<AsyncResult<java.util.List<TDocument>>> resultHandler)
        Handler called with a list containing some items of the result
        Parameters:
        maxItems - maximum number of items
        resultHandler - handler called with a list containing some items of the result
      • some

        Future<java.util.List<TDocument>> some​(int maxItems)
        Returns a future of the list containing some items of the result
        Parameters:
        maxItems - maximum number of items
        Returns:
        a future of the list containing some items of the result
      • stream

        ReadStream<TDocument> stream()
        Returns the result as a read stream of items
        Returns:
        read stream of items
      • stream

        ReadStream<TDocument> stream​(int batchSize)
        Returns the result as a read stream of items
        Parameters:
        batchSize - batch size
        Returns:
        read stream of items