Package org.opensearch.data.client.osc
Class ReactiveChildTemplate<T extends org.opensearch.client.transport.Transport,CLIENT extends org.opensearch.client.ApiClient<T,CLIENT>>
java.lang.Object
org.opensearch.data.client.osc.ReactiveChildTemplate<T,CLIENT>
- Direct Known Subclasses:
ReactiveClusterTemplate,ReactiveIndicesTemplate
public class ReactiveChildTemplate<T extends org.opensearch.client.transport.Transport,CLIENT extends org.opensearch.client.ApiClient<T,CLIENT>>
extends Object
base class for a reactive template that uses on of the
ReactiveOpenSearchClient's child clients.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceReactiveChildTemplate.ClientCallback<CLIENT,RESULT extends org.reactivestreams.Publisher<?>> Callback interface to be used withexecute(ClientCallback)for operating directly on the client. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final CLIENTprotected final org.springframework.data.elasticsearch.core.convert.ElasticsearchConverterprotected final OpenSearchExceptionTranslatorprotected final org.opensearch.data.client.osc.RequestConverterprotected final org.opensearch.data.client.osc.ResponseConverter -
Constructor Summary
ConstructorsConstructorDescriptionReactiveChildTemplate(CLIENT client, org.springframework.data.elasticsearch.core.convert.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
protected final org.springframework.data.elasticsearch.core.convert.ElasticsearchConverter elasticsearchConverter -
requestConverter
protected final org.opensearch.data.client.osc.RequestConverter requestConverter -
responseConverter
protected final org.opensearch.data.client.osc.ResponseConverter responseConverter -
exceptionTranslator
-
-
Constructor Details
-
ReactiveChildTemplate
public ReactiveChildTemplate(CLIENT client, org.springframework.data.elasticsearch.core.convert.ElasticsearchConverter elasticsearchConverter)
-
-
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
-