Package org.opensearch.indices.recovery
Class RetryableTransportClient
java.lang.Object
org.opensearch.indices.recovery.RetryableTransportClient
Client that implements retry functionality for transport layer requests.
- Opensearch.internal:
-
Constructor Summary
ConstructorDescriptionRetryableTransportClient
(TransportService transportService, DiscoveryNode targetNode, org.opensearch.common.unit.TimeValue retryTimeout, org.apache.logging.log4j.Logger logger) -
Method Summary
Modifier and TypeMethodDescriptionvoid
cancel()
<T extends org.opensearch.core.transport.TransportResponse>
voidexecuteRetryableAction
(String action, TransportRequest request, org.opensearch.core.action.ActionListener<T> actionListener, org.opensearch.core.common.io.stream.Writeable.Reader<T> reader) Execute a retryable action.<T extends org.opensearch.core.transport.TransportResponse>
voidexecuteRetryableAction
(String action, TransportRequest request, TransportRequestOptions options, org.opensearch.core.action.ActionListener<T> actionListener, org.opensearch.core.common.io.stream.Writeable.Reader<T> reader)
-
Constructor Details
-
RetryableTransportClient
public RetryableTransportClient(TransportService transportService, DiscoveryNode targetNode, org.opensearch.common.unit.TimeValue retryTimeout, org.apache.logging.log4j.Logger logger)
-
-
Method Details
-
executeRetryableAction
public <T extends org.opensearch.core.transport.TransportResponse> void executeRetryableAction(String action, TransportRequest request, org.opensearch.core.action.ActionListener<T> actionListener, org.opensearch.core.common.io.stream.Writeable.Reader<T> reader) Execute a retryable action.- Type Parameters:
T
-TransportResponse
type.- Parameters:
action
-String
Action Name.request
-TransportRequest
Transport request to execute.actionListener
-ActionListener
Listener to completereader
-Writeable.Reader
Reader to read the response stream.
-
executeRetryableAction
public <T extends org.opensearch.core.transport.TransportResponse> void executeRetryableAction(String action, TransportRequest request, TransportRequestOptions options, org.opensearch.core.action.ActionListener<T> actionListener, org.opensearch.core.common.io.stream.Writeable.Reader<T> reader) -
cancel
public void cancel()
-