Interface ReactiveFindOperation.TerminatingProjection

All Known Subinterfaces:
ReactiveFindOperation.FindWithCollection<T>, ReactiveFindOperation.FindWithProjection<T>, ReactiveFindOperation.FindWithQuery<T>, ReactiveFindOperation.ReactiveFind<T>, ReactiveFindOperation.TerminatingFind<T>
Enclosing interface:
ReactiveFindOperation

public static interface ReactiveFindOperation.TerminatingProjection
Compose find execution by calling one of the terminating methods.
Since:
5.0
Author:
Mark Paluch, Christoph Strobl, Juergen Zimmermann
  • Method Summary

    Modifier and Type
    Method
    Description
    Get the number of matching elements.
    Check for the presence of matching elements.
  • Method Details

    • count

      Mono<Long> count()
      Get the number of matching elements.
      This method uses an aggregation execution even for empty queries which may have an impact on performance, but guarantees shard, session and transaction compliance. In case an inaccurate count satisfies the applications needs use ReactiveMongoOperations.estimatedCount(String) for empty queries instead.
      Returns:
      Mono emitting total number of matching elements. Never null.
    • exists

      Mono<Boolean> exists()
      Check for the presence of matching elements.
      Returns:
      Mono emitting true if at least one matching element exists. Never null.