Class ReactiveChildTemplate<T extends co.elastic.clients.transport.Transport,CLIENT extends co.elastic.clients.ApiClient<T,CLIENT>>
java.lang.Object
org.springframework.data.elasticsearch.client.elc.ReactiveChildTemplate<T,CLIENT>
- Direct Known Subclasses:
ReactiveClusterTemplate,ReactiveIndicesTemplate
public class ReactiveChildTemplate<T extends co.elastic.clients.transport.Transport,CLIENT extends co.elastic.clients.ApiClient<T,CLIENT>>
extends Object
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
Nested ClassesModifier and TypeClassDescriptionstatic interfaceReactiveChildTemplate.ClientCallback<CLIENT,RESULT extends Publisher<?>> Callback interface to be used withexecute(ClientCallback)for operating directly on the client. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final CLIENTprotected final ElasticsearchConverterprotected final ElasticsearchExceptionTranslatorprotected final org.springframework.data.elasticsearch.client.elc.RequestConverterprotected final org.springframework.data.elasticsearch.client.elc.ResponseConverter -
Constructor Summary
ConstructorsConstructorDescriptionReactiveChildTemplate(CLIENT client, ElasticsearchConverter elasticsearchConverter) -
Method Summary
Modifier and TypeMethodDescription<RESULT> Publisher<RESULT>execute(ReactiveChildTemplate.ClientCallback<CLIENT, 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> Publisher<RESULT> execute(ReactiveChildTemplate.ClientCallback<CLIENT, 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
-