Class ReactiveChildTemplate<CLIENT extends co.elastic.clients.ApiClient>
java.lang.Object
org.springframework.data.elasticsearch.client.elc.ReactiveChildTemplate<CLIENT>
- Direct Known Subclasses:
ReactiveClusterTemplate
,ReactiveIndicesTemplate
base class for a reactive template that uses on of the
ReactiveElasticsearchClient
's child clients.- Since:
- 4.4
- Author:
- Peter-Josef Meisch
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
ReactiveChildTemplate.ClientCallback<CLIENT,
RESULT extends org.reactivestreams.Publisher<?>> Callback interface to be used withexecute(ClientCallback)
for operating directly on the client. -
Field Summary
Modifier and TypeFieldDescriptionprotected final CLIENT
protected final ElasticsearchConverter
protected final ElasticsearchExceptionTranslator
protected final org.springframework.data.elasticsearch.client.elc.RequestConverter
protected final org.springframework.data.elasticsearch.client.elc.ResponseConverter
-
Constructor Summary
ConstructorDescriptionReactiveChildTemplate
(CLIENT client, ElasticsearchConverter elasticsearchConverter) -
Method Summary
Modifier and TypeMethodDescription<RESULT> org.reactivestreams.Publisher<RESULT>
execute
(ReactiveChildTemplate.ClientCallback<CLIENT, org.reactivestreams.Publisher<RESULT>> callback) Execute a callback with the client and provide exception translation.
-
Field Details
-
client
-
elasticsearchConverter
-
requestConverter
protected final org.springframework.data.elasticsearch.client.elc.RequestConverter requestConverter -
responseConverter
protected final org.springframework.data.elasticsearch.client.elc.ResponseConverter responseConverter -
exceptionTranslator
-
-
Constructor Details
-
ReactiveChildTemplate
-
-
Method Details
-
execute
public <RESULT> org.reactivestreams.Publisher<RESULT> execute(ReactiveChildTemplate.ClientCallback<CLIENT, org.reactivestreams.Publisher<RESULT>> callback) Execute a callback with the client and provide exception translation.- Type Parameters:
RESULT
- the type returned from the callback- Parameters:
callback
- the callback to execute, must not be null- Returns:
- the callback result
-