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
Modifier and TypeInterfaceDescriptionstatic interface
ReactiveElasticsearchOperations.ClientCallback<T extends org.reactivestreams.Publisher<?>>
Callback interface to be used withexecute(ClientCallback)
for operating directly onReactiveElasticsearchClient
.static interface
ReactiveElasticsearchOperations.ClusterClientCallback<T extends org.reactivestreams.Publisher<?>>
Callback interface to be used withexecuteWithClusterClient(ClusterClientCallback)
for operating directly onReactiveElasticsearchClient.Cluster
.static interface
ReactiveElasticsearchOperations.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 aReactiveClusterOperations
instance 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.ClusterClientCallback
managing resources and translating errors.<T> org.reactivestreams.Publisher<T>
executeWithIndicesClient
(ReactiveElasticsearchOperations.IndicesClientCallback<org.reactivestreams.Publisher<T>> callback) Execute within aReactiveElasticsearchOperations.IndicesClientCallback
managing resources and translating errors.Get theElasticsearchConverter
used.getIndexCoordinatesFor
(Class<?> clazz) getPersistentEntityFor
(Class<?> clazz) Creates aReactiveIndexOperations
that is bound to the given classindexOps
(IndexCoordinates index) Creates aReactiveIndexOperations
that is bound to the given indexwithRouting
(RoutingResolver routingResolver) Returns a copy of this instance with the same configuration, but that uses a differentRoutingResolver
to 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, updateByQuery
Methods inherited from interface org.springframework.data.elasticsearch.core.script.ReactiveScriptOperations
deleteScript, getScript, putScript
Methods 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.ClientCallback
managing resources and translating errors.- Type Parameters:
T
- the type the Publisher emits- Parameters:
callback
- must not be null.- Returns:
- the
Publisher
emitting results.
-
executeWithIndicesClient
<T> org.reactivestreams.Publisher<T> executeWithIndicesClient(ReactiveElasticsearchOperations.IndicesClientCallback<org.reactivestreams.Publisher<T>> callback) Execute within aReactiveElasticsearchOperations.IndicesClientCallback
managing resources and translating errors.- Type Parameters:
T
- the type the Publisher emits- Parameters:
callback
- must not be null.- Returns:
- the
Publisher
emitting results. - Since:
- 4.1
-
executeWithClusterClient
<T> org.reactivestreams.Publisher<T> executeWithClusterClient(ReactiveElasticsearchOperations.ClusterClientCallback<org.reactivestreams.Publisher<T>> callback) Execute within aReactiveElasticsearchOperations.ClusterClientCallback
managing resources and translating errors.- Type Parameters:
T
- the type the Publisher emits- Parameters:
callback
- must not be null.- Returns:
- the
Publisher
emitting results. - Since:
- 4.1
-
getElasticsearchConverter
ElasticsearchConverter getElasticsearchConverter()Get theElasticsearchConverter
used.- Returns:
- never null
-
getPersistentEntityFor
-
getIndexCoordinatesFor
- Parameters:
clazz
-- Returns:
- the IndexCoordinates defined on the entity.
- Since:
- 4.0
-
indexOps
Creates aReactiveIndexOperations
that is bound to the given index- Parameters:
index
- IndexCoordinates specifying the index- Returns:
- ReactiveIndexOperations implementation
- Since:
- 4.1
-
indexOps
Creates aReactiveIndexOperations
that 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 aReactiveClusterOperations
instance 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 differentRoutingResolver
to obtain routing information.- Parameters:
routingResolver
- theRoutingResolver
value, must not be null.- Returns:
- DocumentOperations instance
-