Class ReactiveCollectionManager

    • Method Detail

      • createCollection

        public Mono<Void> createCollection​(CollectionSpec collectionSpec)
        Creates a collection if it does not already exist.
        Parameters:
        collectionSpec - the collection spec that contains the properties of the collection.
      • collectionExists

        public Mono<Boolean> collectionExists​(CollectionSpec collectionSpec)
        Checks if the given collection exists in this bucket.
        Parameters:
        collectionSpec - the collection spec that contains the properties of the collection.
        Returns:
        true if it exists, false otherwise.
      • dropCollection

        public Mono<Void> dropCollection​(CollectionSpec collectionSpec)
        Drops a collection if it exists.
        Parameters:
        collectionSpec - the collection spec that contains the properties of the collection.
      • createScope

        public Mono<Void> createScope​(ScopeSpec scopeSpec)
        Creates a scope if it does not already exist.
        Parameters:
        scopeSpec - the scope spec that contains the properties of the scope.
      • dropScope

        public Mono<Void> dropScope​(String scopeName)
        Drops a scope if it exists.
        Parameters:
        scopeName - the name of the scope to drop.
      • getScope

        public Mono<ScopeSpec> getScope​(String scopeName)
        Returns the scope if it exists.
        Parameters:
        scopeName - the name of the scope.
        Returns:
        a mono containing the ScopeSpec or an exception if it does not exist.
      • getAllScopes

        public Flux<ScopeSpec> getAllScopes()
        Returns all scopes in this bucket.
        Returns:
        a flux of all scopes in this bucket.