DATAES-790 - Deprecate noRefresh repository method.

Original PR: #426
This commit is contained in:
Peter-Josef Meisch 2020-04-12 07:40:52 +02:00 committed by GitHub
parent 89944b66c4
commit 771d8fb5e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View File

@ -48,7 +48,10 @@ public interface ElasticsearchRepository<T, ID> extends PagingAndSortingReposito
* This method is intended to be used when many single inserts must be made that cannot be aggregated to be inserted
* with {@link #saveAll(Iterable)}. This might lead to a temporary inconsistent state until {@link #refresh()} is
* called.
*
* @deprecated since 4.0, use a custom repository implementation instead
*/
@Deprecated
<S extends T> S indexWithoutRefresh(S entity);
/**

View File

@ -182,6 +182,7 @@ public abstract class AbstractElasticsearchRepository<T, ID> implements Elastics
}
@Override
@Deprecated
public <S extends T> S indexWithoutRefresh(S entity) {
Assert.notNull(entity, "Cannot save 'null' entity.");
operations.save(entity);