Browse Source

Polishing.

Update IndexOperations javadoc. Add missing parameters and change wording to reflect what the methods actually do.

See: #4587
pull/4589/head
Christoph Strobl 2 years ago
parent
commit
7856c7264f
No known key found for this signature in database
GPG Key ID: E6054036D0C37A4B
  1. 6
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/index/IndexOperations.java
  2. 5
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/index/ReactiveIndexOperations.java

6
spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/index/IndexOperations.java

@ -32,13 +32,15 @@ public interface IndexOperations {
* class. If not it will be created. * class. If not it will be created.
* *
* @param indexDefinition must not be {@literal null}. * @param indexDefinition must not be {@literal null}.
* @return the index name.
*/ */
String ensureIndex(IndexDefinition indexDefinition); String ensureIndex(IndexDefinition indexDefinition);
/** /**
* Drops an index from this collection. * Alters the index with given {@literal name}.
* *
* @param name name of index to hide. * @param name name of index to change.
* @param options index options.
* @since 4.1 * @since 4.1
*/ */
void alterIndex(String name, IndexOptions options); void alterIndex(String name, IndexOptions options);

5
spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/index/ReactiveIndexOperations.java

@ -32,14 +32,15 @@ public interface ReactiveIndexOperations {
* class. If not it will be created. * class. If not it will be created.
* *
* @param indexDefinition must not be {@literal null}. * @param indexDefinition must not be {@literal null}.
* @return a {@link Mono} emitting the name of the index on completion.
*/ */
Mono<String> ensureIndex(IndexDefinition indexDefinition); Mono<String> ensureIndex(IndexDefinition indexDefinition);
/** /**
* Alters the index with given {@literal name}. * Alters the index with given {@literal name}.
* *
* @param name name of index to hide. * @param name name of index to change.
* @param * @param options index options.
* @since 4.1 * @since 4.1
*/ */
Mono<Void> alterIndex(String name, IndexOptions options); Mono<Void> alterIndex(String name, IndexOptions options);

Loading…
Cancel
Save