Interface ReactiveElasticsearchOperations
- All Superinterfaces:
ReactiveDocumentOperations,ReactiveScriptOperations,ReactiveSearchOperations
- All Known Implementing Classes:
AbstractReactiveElasticsearchTemplate,ReactiveElasticsearchTemplate,ReactiveElasticsearchTemplate
public interface ReactiveElasticsearchOperations
extends ReactiveDocumentOperations, ReactiveSearchOperations, ReactiveScriptOperations
Interface that specifies a basic set of Elasticsearch operations executed in a reactive way.
Implemented by ReactiveElasticsearchTemplate. Not often used but a useful option for extensibility and
testability (as it can be easily mocked, stubbed, or be the target of a JDK proxy). Command execution using
ReactiveElasticsearchOperations is deferred until a Subscriber subscribes to the
Publisher.
- Since:
- 3.2
- Author:
- Christoph Strobl, Peter-Josef Meisch
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceReactiveElasticsearchOperations.ClientCallback<T extends org.reactivestreams.Publisher<?>>Callback interface to be used withexecute(ClientCallback)for operating directly onReactiveElasticsearchClient.static interfaceReactiveElasticsearchOperations.ClusterClientCallback<T extends org.reactivestreams.Publisher<?>>Callback interface to be used withexecuteWithClusterClient(ClusterClientCallback)for operating directly onReactiveElasticsearchClient.Cluster.static interfaceReactiveElasticsearchOperations.IndicesClientCallback<T extends org.reactivestreams.Publisher<?>>Callback interface to be used withexecuteWithIndicesClient(IndicesClientCallback)for operating directly onReactiveElasticsearchClient.Indices. -
Field Summary
Fields inherited from interface org.springframework.data.elasticsearch.core.ReactiveDocumentOperations
FLUX_SAVE_BULK_SIZE -
Method Summary
Modifier and TypeMethodDescriptioncluster()return aReactiveClusterOperationsinstance that uses the same client communication setup as this ElasticsearchOperations instance.<T> org.reactivestreams.Publisher<T>execute(ReactiveElasticsearchOperations.ClientCallback<org.reactivestreams.Publisher<T>> callback) Deprecated.since 4.4, use the execute methods from the implementing classes (they are client specific)<T> org.reactivestreams.Publisher<T>executeWithClusterClient(ReactiveElasticsearchOperations.ClusterClientCallback<org.reactivestreams.Publisher<T>> callback) Execute within aReactiveElasticsearchOperations.ClusterClientCallbackmanaging resources and translating errors.<T> org.reactivestreams.Publisher<T>executeWithIndicesClient(ReactiveElasticsearchOperations.IndicesClientCallback<org.reactivestreams.Publisher<T>> callback) Execute within aReactiveElasticsearchOperations.IndicesClientCallbackmanaging resources and translating errors.Get theElasticsearchConverterused.getIndexCoordinatesFor(Class<?> clazz) getPersistentEntityFor(Class<?> clazz) Creates aReactiveIndexOperationsthat is bound to the given classindexOps(IndexCoordinates index) Creates aReactiveIndexOperationsthat is bound to the given indexwithRouting(RoutingResolver routingResolver) Returns a copy of this instance with the same configuration, but that uses a differentRoutingResolverto obtain routing information.Methods inherited from interface org.springframework.data.elasticsearch.core.ReactiveDocumentOperations
bulkUpdate, bulkUpdate, delete, delete, delete, delete, delete, delete, exists, exists, get, get, multiGet, multiGet, reindex, save, save, save, save, save, save, save, save, saveAll, saveAll, saveAll, saveAll, submitReindex, update, updateByQueryMethods inherited from interface org.springframework.data.elasticsearch.core.script.ReactiveScriptOperations
deleteScript, getScript, putScriptMethods inherited from interface org.springframework.data.elasticsearch.core.ReactiveSearchOperations
aggregate, aggregate, closePointInTime, count, count, count, idsQuery, matchAllQuery, openPointInTime, openPointInTime, search, search, search, search, searchForHits, searchForHits, searchForHits, searchForHits, searchForPage, searchForPage, searchForPage, searchForPage, suggest, suggest
-
Method Details
-
execute
@Deprecated <T> org.reactivestreams.Publisher<T> execute(ReactiveElasticsearchOperations.ClientCallback<org.reactivestreams.Publisher<T>> callback) Deprecated.since 4.4, use the execute methods from the implementing classes (they are client specific)Execute within aReactiveElasticsearchOperations.ClientCallbackmanaging resources and translating errors.- Type Parameters:
T- the type the Publisher emits- Parameters:
callback- must not be null.- Returns:
- the
Publisheremitting results.
-
executeWithIndicesClient
<T> org.reactivestreams.Publisher<T> executeWithIndicesClient(ReactiveElasticsearchOperations.IndicesClientCallback<org.reactivestreams.Publisher<T>> callback) Execute within aReactiveElasticsearchOperations.IndicesClientCallbackmanaging resources and translating errors.- Type Parameters:
T- the type the Publisher emits- Parameters:
callback- must not be null.- Returns:
- the
Publisheremitting results. - Since:
- 4.1
-
executeWithClusterClient
<T> org.reactivestreams.Publisher<T> executeWithClusterClient(ReactiveElasticsearchOperations.ClusterClientCallback<org.reactivestreams.Publisher<T>> callback) Execute within aReactiveElasticsearchOperations.ClusterClientCallbackmanaging resources and translating errors.- Type Parameters:
T- the type the Publisher emits- Parameters:
callback- must not be null.- Returns:
- the
Publisheremitting results. - Since:
- 4.1
-
getElasticsearchConverter
ElasticsearchConverter getElasticsearchConverter()Get theElasticsearchConverterused.- Returns:
- never null
-
getPersistentEntityFor
-
getIndexCoordinatesFor
- Parameters:
clazz-- Returns:
- the IndexCoordinates defined on the entity.
- Since:
- 4.0
-
indexOps
Creates aReactiveIndexOperationsthat is bound to the given index- Parameters:
index- IndexCoordinates specifying the index- Returns:
- ReactiveIndexOperations implementation
- Since:
- 4.1
-
indexOps
Creates aReactiveIndexOperationsthat is bound to the given class- Parameters:
clazz- the entity clazz specifiying the index information- Returns:
- ReactiveIndexOperations implementation
- Since:
- 4.1
-
cluster
ReactiveClusterOperations cluster()return aReactiveClusterOperationsinstance that uses the same client communication setup as this ElasticsearchOperations instance.- Returns:
- ClusterOperations implementation
- Since:
- 4.2
-
withRouting
Returns a copy of this instance with the same configuration, but that uses a differentRoutingResolverto obtain routing information.- Parameters:
routingResolver- theRoutingResolvervalue, must not be null.- Returns:
- DocumentOperations instance
-