All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.elasticsearch.AWSElasticsearchAsyncClient Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon Elasticsearch Service module holds the client classes that are used for communicating with Amazon Elasticsearch Service

There is a newer version: 1.12.780
Show newest version
/*
 * Copyright 2019-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
 * the License. A copy of the License is located at
 * 
 * http://aws.amazon.com/apache2.0
 * 
 * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
 * and limitations under the License.
 */
package com.amazonaws.services.elasticsearch;

import static java.util.concurrent.Executors.newFixedThreadPool;

import javax.annotation.Generated;

import com.amazonaws.services.elasticsearch.model.*;
import com.amazonaws.client.AwsAsyncClientParams;
import com.amazonaws.annotation.ThreadSafe;
import com.amazonaws.ClientConfiguration;
import com.amazonaws.auth.AWSCredentials;
import com.amazonaws.auth.AWSCredentialsProvider;
import java.util.concurrent.ExecutorService;
import com.amazonaws.auth.DefaultAWSCredentialsProviderChain;

/**
 * Client for accessing Amazon Elasticsearch Service asynchronously. Each asynchronous method will return a Java Future
 * object representing the asynchronous operation; overloads which accept an {@code AsyncHandler} can be used to receive
 * notification when an asynchronous operation completes.
 * 

* Amazon Elasticsearch Configuration Service *

* Use the Amazon Elasticsearch Configuration API to create, configure, and manage Elasticsearch domains. *

*

* For sample code that uses the Configuration API, see the Amazon * Elasticsearch Service Developer Guide. The guide also contains sample code * for sending signed HTTP requests to the Elasticsearch APIs. *

*

* The endpoint for configuration service requests is region-specific: es.region.amazonaws.com. For example, * es.us-east-1.amazonaws.com. For a current list of supported regions and endpoints, see Regions * and Endpoints. *

*/ @ThreadSafe @Generated("com.amazonaws:aws-java-sdk-code-generator") public class AWSElasticsearchAsyncClient extends AWSElasticsearchClient implements AWSElasticsearchAsync { private static final int DEFAULT_THREAD_POOL_SIZE = 50; private final java.util.concurrent.ExecutorService executorService; /** * Constructs a new asynchronous client to invoke service methods on Amazon Elasticsearch Service. A credentials * provider chain will be used that searches for credentials in this order: *
    *
  • Environment Variables - AWS_ACCESS_KEY_ID and AWS_SECRET_KEY
  • *
  • Java System Properties - aws.accessKeyId and aws.secretKey
  • *
  • Credential profiles file at the default location (~/.aws/credentials) shared by all AWS SDKs and the AWS CLI
  • *
  • Instance profile credentials delivered through the Amazon EC2 metadata service
  • *
*

* Asynchronous methods are delegated to a fixed-size thread pool containing 50 threads (to match the default * maximum number of concurrent connections to the service). * * @see com.amazonaws.auth.DefaultAWSCredentialsProviderChain * @see java.util.concurrent.Executors#newFixedThreadPool(int) * @deprecated use {@link AWSElasticsearchAsyncClientBuilder#defaultClient()} */ @Deprecated public AWSElasticsearchAsyncClient() { this(DefaultAWSCredentialsProviderChain.getInstance()); } /** * Constructs a new asynchronous client to invoke service methods on Amazon Elasticsearch Service. A credentials * provider chain will be used that searches for credentials in this order: *

    *
  • Environment Variables - AWS_ACCESS_KEY_ID and AWS_SECRET_KEY
  • *
  • Java System Properties - aws.accessKeyId and aws.secretKey
  • *
  • Credential profiles file at the default location (~/.aws/credentials) shared by all AWS SDKs and the AWS CLI
  • *
  • Instance profile credentials delivered through the Amazon EC2 metadata service
  • *
*

* Asynchronous methods are delegated to a fixed-size thread pool containing a number of threads equal to the * maximum number of concurrent connections configured via {@code ClientConfiguration.getMaxConnections()}. * * @param clientConfiguration * The client configuration options controlling how this client connects to Amazon Elasticsearch Service (ex: * proxy settings, retry counts, etc). * * @see com.amazonaws.auth.DefaultAWSCredentialsProviderChain * @see java.util.concurrent.Executors#newFixedThreadPool(int) * @deprecated use {@link AWSElasticsearchAsyncClientBuilder#withClientConfiguration(ClientConfiguration)} */ @Deprecated public AWSElasticsearchAsyncClient(ClientConfiguration clientConfiguration) { this(DefaultAWSCredentialsProviderChain.getInstance(), clientConfiguration, newFixedThreadPool(clientConfiguration.getMaxConnections())); } /** * Constructs a new asynchronous client to invoke service methods on Amazon Elasticsearch Service using the * specified AWS account credentials. *

* Asynchronous methods are delegated to a fixed-size thread pool containing 50 threads (to match the default * maximum number of concurrent connections to the service). * * @param awsCredentials * The AWS credentials (access key ID and secret key) to use when authenticating with AWS services. * @see java.util.concurrent.Executors#newFixedThreadPool(int) * @deprecated use {@link AWSElasticsearchAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} */ @Deprecated public AWSElasticsearchAsyncClient(AWSCredentials awsCredentials) { this(awsCredentials, newFixedThreadPool(DEFAULT_THREAD_POOL_SIZE)); } /** * Constructs a new asynchronous client to invoke service methods on Amazon Elasticsearch Service using the * specified AWS account credentials and executor service. Default client settings will be used. * * @param awsCredentials * The AWS credentials (access key ID and secret key) to use when authenticating with AWS services. * @param executorService * The executor service by which all asynchronous requests will be executed. * @deprecated use {@link AWSElasticsearchAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} and * {@link AWSElasticsearchAsyncClientBuilder#withExecutorFactory(com.amazonaws.client.builder.ExecutorFactory)} */ @Deprecated public AWSElasticsearchAsyncClient(AWSCredentials awsCredentials, ExecutorService executorService) { this(awsCredentials, configFactory.getConfig(), executorService); } /** * Constructs a new asynchronous client to invoke service methods on Amazon Elasticsearch Service using the * specified AWS account credentials, executor service, and client configuration options. * * @param awsCredentials * The AWS credentials (access key ID and secret key) to use when authenticating with AWS services. * @param clientConfiguration * Client configuration options (ex: max retry limit, proxy settings, etc). * @param executorService * The executor service by which all asynchronous requests will be executed. * @deprecated use {@link AWSElasticsearchAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} and * {@link AWSElasticsearchAsyncClientBuilder#withClientConfiguration(ClientConfiguration)} and * {@link AWSElasticsearchAsyncClientBuilder#withExecutorFactory(com.amazonaws.client.builder.ExecutorFactory)} */ @Deprecated public AWSElasticsearchAsyncClient(AWSCredentials awsCredentials, ClientConfiguration clientConfiguration, ExecutorService executorService) { super(awsCredentials, clientConfiguration); this.executorService = executorService; } /** * Constructs a new asynchronous client to invoke service methods on Amazon Elasticsearch Service using the * specified AWS account credentials provider. Default client settings will be used. *

* Asynchronous methods are delegated to a fixed-size thread pool containing 50 threads (to match the default * maximum number of concurrent connections to the service). * * @param awsCredentialsProvider * The AWS credentials provider which will provide credentials to authenticate requests with AWS services. * @see java.util.concurrent.Executors#newFixedThreadPool(int) * @deprecated use {@link AWSElasticsearchAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} */ @Deprecated public AWSElasticsearchAsyncClient(AWSCredentialsProvider awsCredentialsProvider) { this(awsCredentialsProvider, newFixedThreadPool(DEFAULT_THREAD_POOL_SIZE)); } /** * Constructs a new asynchronous client to invoke service methods on Amazon Elasticsearch Service using the provided * AWS account credentials provider and client configuration options. *

* Asynchronous methods are delegated to a fixed-size thread pool containing a number of threads equal to the * maximum number of concurrent connections configured via {@code ClientConfiguration.getMaxConnections()}. * * @param awsCredentialsProvider * The AWS credentials provider which will provide credentials to authenticate requests with AWS services. * @param clientConfiguration * Client configuration options (ex: max retry limit, proxy settings, etc). * * @see com.amazonaws.auth.DefaultAWSCredentialsProviderChain * @see java.util.concurrent.Executors#newFixedThreadPool(int) * @deprecated use {@link AWSElasticsearchAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} and * {@link AWSElasticsearchAsyncClientBuilder#withClientConfiguration(ClientConfiguration)} */ @Deprecated public AWSElasticsearchAsyncClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration) { this(awsCredentialsProvider, clientConfiguration, newFixedThreadPool(clientConfiguration.getMaxConnections())); } /** * Constructs a new asynchronous client to invoke service methods on Amazon Elasticsearch Service using the * specified AWS account credentials provider and executor service. Default client settings will be used. * * @param awsCredentialsProvider * The AWS credentials provider which will provide credentials to authenticate requests with AWS services. * @param executorService * The executor service by which all asynchronous requests will be executed. * @deprecated use {@link AWSElasticsearchAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} and * {@link AWSElasticsearchAsyncClientBuilder#withExecutorFactory(com.amazonaws.client.builder.ExecutorFactory)} */ @Deprecated public AWSElasticsearchAsyncClient(AWSCredentialsProvider awsCredentialsProvider, ExecutorService executorService) { this(awsCredentialsProvider, configFactory.getConfig(), executorService); } /** * Constructs a new asynchronous client to invoke service methods on Amazon Elasticsearch Service using the * specified AWS account credentials provider, executor service, and client configuration options. * * @param awsCredentialsProvider * The AWS credentials provider which will provide credentials to authenticate requests with AWS services. * @param clientConfiguration * Client configuration options (ex: max retry limit, proxy settings, etc). * @param executorService * The executor service by which all asynchronous requests will be executed. * @deprecated use {@link AWSElasticsearchAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} and * {@link AWSElasticsearchAsyncClientBuilder#withClientConfiguration(ClientConfiguration)} and * {@link AWSElasticsearchAsyncClientBuilder#withExecutorFactory(com.amazonaws.client.builder.ExecutorFactory)} */ @Deprecated public AWSElasticsearchAsyncClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration, ExecutorService executorService) { super(awsCredentialsProvider, clientConfiguration); this.executorService = executorService; } public static AWSElasticsearchAsyncClientBuilder asyncBuilder() { return AWSElasticsearchAsyncClientBuilder.standard(); } /** * Constructs a new asynchronous client to invoke service methods on Amazon Elasticsearch Service using the * specified parameters. * * @param asyncClientParams * Object providing client parameters. */ AWSElasticsearchAsyncClient(AwsAsyncClientParams asyncClientParams) { this(asyncClientParams, false); } /** * Constructs a new asynchronous client to invoke service methods on Amazon Elasticsearch Service using the * specified parameters. * * @param asyncClientParams * Object providing client parameters. * @param endpointDiscoveryEnabled * true will enable endpoint discovery if the service supports it. */ AWSElasticsearchAsyncClient(AwsAsyncClientParams asyncClientParams, boolean endpointDiscoveryEnabled) { super(asyncClientParams, endpointDiscoveryEnabled); this.executorService = asyncClientParams.getExecutor(); } /** * Returns the executor service used by this client to execute async requests. * * @return The executor service used by this client to execute async requests. */ public ExecutorService getExecutorService() { return executorService; } @Override public java.util.concurrent.Future acceptInboundCrossClusterSearchConnectionAsync( AcceptInboundCrossClusterSearchConnectionRequest request) { return acceptInboundCrossClusterSearchConnectionAsync(request, null); } @Override public java.util.concurrent.Future acceptInboundCrossClusterSearchConnectionAsync( final AcceptInboundCrossClusterSearchConnectionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final AcceptInboundCrossClusterSearchConnectionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public AcceptInboundCrossClusterSearchConnectionResult call() throws Exception { AcceptInboundCrossClusterSearchConnectionResult result = null; try { result = executeAcceptInboundCrossClusterSearchConnection(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future addTagsAsync(AddTagsRequest request) { return addTagsAsync(request, null); } @Override public java.util.concurrent.Future addTagsAsync(final AddTagsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final AddTagsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public AddTagsResult call() throws Exception { AddTagsResult result = null; try { result = executeAddTags(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future associatePackageAsync(AssociatePackageRequest request) { return associatePackageAsync(request, null); } @Override public java.util.concurrent.Future associatePackageAsync(final AssociatePackageRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final AssociatePackageRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public AssociatePackageResult call() throws Exception { AssociatePackageResult result = null; try { result = executeAssociatePackage(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future authorizeVpcEndpointAccessAsync(AuthorizeVpcEndpointAccessRequest request) { return authorizeVpcEndpointAccessAsync(request, null); } @Override public java.util.concurrent.Future authorizeVpcEndpointAccessAsync(final AuthorizeVpcEndpointAccessRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final AuthorizeVpcEndpointAccessRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public AuthorizeVpcEndpointAccessResult call() throws Exception { AuthorizeVpcEndpointAccessResult result = null; try { result = executeAuthorizeVpcEndpointAccess(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future cancelDomainConfigChangeAsync(CancelDomainConfigChangeRequest request) { return cancelDomainConfigChangeAsync(request, null); } @Override public java.util.concurrent.Future cancelDomainConfigChangeAsync(final CancelDomainConfigChangeRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CancelDomainConfigChangeRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CancelDomainConfigChangeResult call() throws Exception { CancelDomainConfigChangeResult result = null; try { result = executeCancelDomainConfigChange(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future cancelElasticsearchServiceSoftwareUpdateAsync( CancelElasticsearchServiceSoftwareUpdateRequest request) { return cancelElasticsearchServiceSoftwareUpdateAsync(request, null); } @Override public java.util.concurrent.Future cancelElasticsearchServiceSoftwareUpdateAsync( final CancelElasticsearchServiceSoftwareUpdateRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CancelElasticsearchServiceSoftwareUpdateRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CancelElasticsearchServiceSoftwareUpdateResult call() throws Exception { CancelElasticsearchServiceSoftwareUpdateResult result = null; try { result = executeCancelElasticsearchServiceSoftwareUpdate(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future createElasticsearchDomainAsync(CreateElasticsearchDomainRequest request) { return createElasticsearchDomainAsync(request, null); } @Override public java.util.concurrent.Future createElasticsearchDomainAsync(final CreateElasticsearchDomainRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateElasticsearchDomainRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateElasticsearchDomainResult call() throws Exception { CreateElasticsearchDomainResult result = null; try { result = executeCreateElasticsearchDomain(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future createOutboundCrossClusterSearchConnectionAsync( CreateOutboundCrossClusterSearchConnectionRequest request) { return createOutboundCrossClusterSearchConnectionAsync(request, null); } @Override public java.util.concurrent.Future createOutboundCrossClusterSearchConnectionAsync( final CreateOutboundCrossClusterSearchConnectionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateOutboundCrossClusterSearchConnectionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateOutboundCrossClusterSearchConnectionResult call() throws Exception { CreateOutboundCrossClusterSearchConnectionResult result = null; try { result = executeCreateOutboundCrossClusterSearchConnection(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future createPackageAsync(CreatePackageRequest request) { return createPackageAsync(request, null); } @Override public java.util.concurrent.Future createPackageAsync(final CreatePackageRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreatePackageRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreatePackageResult call() throws Exception { CreatePackageResult result = null; try { result = executeCreatePackage(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future createVpcEndpointAsync(CreateVpcEndpointRequest request) { return createVpcEndpointAsync(request, null); } @Override public java.util.concurrent.Future createVpcEndpointAsync(final CreateVpcEndpointRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateVpcEndpointRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateVpcEndpointResult call() throws Exception { CreateVpcEndpointResult result = null; try { result = executeCreateVpcEndpoint(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future deleteElasticsearchDomainAsync(DeleteElasticsearchDomainRequest request) { return deleteElasticsearchDomainAsync(request, null); } @Override public java.util.concurrent.Future deleteElasticsearchDomainAsync(final DeleteElasticsearchDomainRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteElasticsearchDomainRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteElasticsearchDomainResult call() throws Exception { DeleteElasticsearchDomainResult result = null; try { result = executeDeleteElasticsearchDomain(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future deleteElasticsearchServiceRoleAsync(DeleteElasticsearchServiceRoleRequest request) { return deleteElasticsearchServiceRoleAsync(request, null); } @Override public java.util.concurrent.Future deleteElasticsearchServiceRoleAsync( final DeleteElasticsearchServiceRoleRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteElasticsearchServiceRoleRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteElasticsearchServiceRoleResult call() throws Exception { DeleteElasticsearchServiceRoleResult result = null; try { result = executeDeleteElasticsearchServiceRole(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future deleteInboundCrossClusterSearchConnectionAsync( DeleteInboundCrossClusterSearchConnectionRequest request) { return deleteInboundCrossClusterSearchConnectionAsync(request, null); } @Override public java.util.concurrent.Future deleteInboundCrossClusterSearchConnectionAsync( final DeleteInboundCrossClusterSearchConnectionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteInboundCrossClusterSearchConnectionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteInboundCrossClusterSearchConnectionResult call() throws Exception { DeleteInboundCrossClusterSearchConnectionResult result = null; try { result = executeDeleteInboundCrossClusterSearchConnection(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future deleteOutboundCrossClusterSearchConnectionAsync( DeleteOutboundCrossClusterSearchConnectionRequest request) { return deleteOutboundCrossClusterSearchConnectionAsync(request, null); } @Override public java.util.concurrent.Future deleteOutboundCrossClusterSearchConnectionAsync( final DeleteOutboundCrossClusterSearchConnectionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteOutboundCrossClusterSearchConnectionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteOutboundCrossClusterSearchConnectionResult call() throws Exception { DeleteOutboundCrossClusterSearchConnectionResult result = null; try { result = executeDeleteOutboundCrossClusterSearchConnection(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future deletePackageAsync(DeletePackageRequest request) { return deletePackageAsync(request, null); } @Override public java.util.concurrent.Future deletePackageAsync(final DeletePackageRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeletePackageRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeletePackageResult call() throws Exception { DeletePackageResult result = null; try { result = executeDeletePackage(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future deleteVpcEndpointAsync(DeleteVpcEndpointRequest request) { return deleteVpcEndpointAsync(request, null); } @Override public java.util.concurrent.Future deleteVpcEndpointAsync(final DeleteVpcEndpointRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteVpcEndpointRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteVpcEndpointResult call() throws Exception { DeleteVpcEndpointResult result = null; try { result = executeDeleteVpcEndpoint(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future describeDomainAutoTunesAsync(DescribeDomainAutoTunesRequest request) { return describeDomainAutoTunesAsync(request, null); } @Override public java.util.concurrent.Future describeDomainAutoTunesAsync(final DescribeDomainAutoTunesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeDomainAutoTunesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeDomainAutoTunesResult call() throws Exception { DescribeDomainAutoTunesResult result = null; try { result = executeDescribeDomainAutoTunes(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future describeDomainChangeProgressAsync(DescribeDomainChangeProgressRequest request) { return describeDomainChangeProgressAsync(request, null); } @Override public java.util.concurrent.Future describeDomainChangeProgressAsync(final DescribeDomainChangeProgressRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeDomainChangeProgressRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeDomainChangeProgressResult call() throws Exception { DescribeDomainChangeProgressResult result = null; try { result = executeDescribeDomainChangeProgress(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future describeElasticsearchDomainAsync(DescribeElasticsearchDomainRequest request) { return describeElasticsearchDomainAsync(request, null); } @Override public java.util.concurrent.Future describeElasticsearchDomainAsync(final DescribeElasticsearchDomainRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeElasticsearchDomainRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeElasticsearchDomainResult call() throws Exception { DescribeElasticsearchDomainResult result = null; try { result = executeDescribeElasticsearchDomain(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future describeElasticsearchDomainConfigAsync( DescribeElasticsearchDomainConfigRequest request) { return describeElasticsearchDomainConfigAsync(request, null); } @Override public java.util.concurrent.Future describeElasticsearchDomainConfigAsync( final DescribeElasticsearchDomainConfigRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeElasticsearchDomainConfigRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeElasticsearchDomainConfigResult call() throws Exception { DescribeElasticsearchDomainConfigResult result = null; try { result = executeDescribeElasticsearchDomainConfig(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future describeElasticsearchDomainsAsync(DescribeElasticsearchDomainsRequest request) { return describeElasticsearchDomainsAsync(request, null); } @Override public java.util.concurrent.Future describeElasticsearchDomainsAsync(final DescribeElasticsearchDomainsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeElasticsearchDomainsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeElasticsearchDomainsResult call() throws Exception { DescribeElasticsearchDomainsResult result = null; try { result = executeDescribeElasticsearchDomains(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future describeElasticsearchInstanceTypeLimitsAsync( DescribeElasticsearchInstanceTypeLimitsRequest request) { return describeElasticsearchInstanceTypeLimitsAsync(request, null); } @Override public java.util.concurrent.Future describeElasticsearchInstanceTypeLimitsAsync( final DescribeElasticsearchInstanceTypeLimitsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeElasticsearchInstanceTypeLimitsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeElasticsearchInstanceTypeLimitsResult call() throws Exception { DescribeElasticsearchInstanceTypeLimitsResult result = null; try { result = executeDescribeElasticsearchInstanceTypeLimits(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future describeInboundCrossClusterSearchConnectionsAsync( DescribeInboundCrossClusterSearchConnectionsRequest request) { return describeInboundCrossClusterSearchConnectionsAsync(request, null); } @Override public java.util.concurrent.Future describeInboundCrossClusterSearchConnectionsAsync( final DescribeInboundCrossClusterSearchConnectionsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeInboundCrossClusterSearchConnectionsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeInboundCrossClusterSearchConnectionsResult call() throws Exception { DescribeInboundCrossClusterSearchConnectionsResult result = null; try { result = executeDescribeInboundCrossClusterSearchConnections(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future describeOutboundCrossClusterSearchConnectionsAsync( DescribeOutboundCrossClusterSearchConnectionsRequest request) { return describeOutboundCrossClusterSearchConnectionsAsync(request, null); } @Override public java.util.concurrent.Future describeOutboundCrossClusterSearchConnectionsAsync( final DescribeOutboundCrossClusterSearchConnectionsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeOutboundCrossClusterSearchConnectionsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeOutboundCrossClusterSearchConnectionsResult call() throws Exception { DescribeOutboundCrossClusterSearchConnectionsResult result = null; try { result = executeDescribeOutboundCrossClusterSearchConnections(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future describePackagesAsync(DescribePackagesRequest request) { return describePackagesAsync(request, null); } @Override public java.util.concurrent.Future describePackagesAsync(final DescribePackagesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribePackagesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribePackagesResult call() throws Exception { DescribePackagesResult result = null; try { result = executeDescribePackages(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future describeReservedElasticsearchInstanceOfferingsAsync( DescribeReservedElasticsearchInstanceOfferingsRequest request) { return describeReservedElasticsearchInstanceOfferingsAsync(request, null); } @Override public java.util.concurrent.Future describeReservedElasticsearchInstanceOfferingsAsync( final DescribeReservedElasticsearchInstanceOfferingsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeReservedElasticsearchInstanceOfferingsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeReservedElasticsearchInstanceOfferingsResult call() throws Exception { DescribeReservedElasticsearchInstanceOfferingsResult result = null; try { result = executeDescribeReservedElasticsearchInstanceOfferings(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future describeReservedElasticsearchInstancesAsync( DescribeReservedElasticsearchInstancesRequest request) { return describeReservedElasticsearchInstancesAsync(request, null); } @Override public java.util.concurrent.Future describeReservedElasticsearchInstancesAsync( final DescribeReservedElasticsearchInstancesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeReservedElasticsearchInstancesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeReservedElasticsearchInstancesResult call() throws Exception { DescribeReservedElasticsearchInstancesResult result = null; try { result = executeDescribeReservedElasticsearchInstances(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future describeVpcEndpointsAsync(DescribeVpcEndpointsRequest request) { return describeVpcEndpointsAsync(request, null); } @Override public java.util.concurrent.Future describeVpcEndpointsAsync(final DescribeVpcEndpointsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeVpcEndpointsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeVpcEndpointsResult call() throws Exception { DescribeVpcEndpointsResult result = null; try { result = executeDescribeVpcEndpoints(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future dissociatePackageAsync(DissociatePackageRequest request) { return dissociatePackageAsync(request, null); } @Override public java.util.concurrent.Future dissociatePackageAsync(final DissociatePackageRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DissociatePackageRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DissociatePackageResult call() throws Exception { DissociatePackageResult result = null; try { result = executeDissociatePackage(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future getCompatibleElasticsearchVersionsAsync( GetCompatibleElasticsearchVersionsRequest request) { return getCompatibleElasticsearchVersionsAsync(request, null); } @Override public java.util.concurrent.Future getCompatibleElasticsearchVersionsAsync( final GetCompatibleElasticsearchVersionsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetCompatibleElasticsearchVersionsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetCompatibleElasticsearchVersionsResult call() throws Exception { GetCompatibleElasticsearchVersionsResult result = null; try { result = executeGetCompatibleElasticsearchVersions(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future getPackageVersionHistoryAsync(GetPackageVersionHistoryRequest request) { return getPackageVersionHistoryAsync(request, null); } @Override public java.util.concurrent.Future getPackageVersionHistoryAsync(final GetPackageVersionHistoryRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetPackageVersionHistoryRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetPackageVersionHistoryResult call() throws Exception { GetPackageVersionHistoryResult result = null; try { result = executeGetPackageVersionHistory(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future getUpgradeHistoryAsync(GetUpgradeHistoryRequest request) { return getUpgradeHistoryAsync(request, null); } @Override public java.util.concurrent.Future getUpgradeHistoryAsync(final GetUpgradeHistoryRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetUpgradeHistoryRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetUpgradeHistoryResult call() throws Exception { GetUpgradeHistoryResult result = null; try { result = executeGetUpgradeHistory(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future getUpgradeStatusAsync(GetUpgradeStatusRequest request) { return getUpgradeStatusAsync(request, null); } @Override public java.util.concurrent.Future getUpgradeStatusAsync(final GetUpgradeStatusRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetUpgradeStatusRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetUpgradeStatusResult call() throws Exception { GetUpgradeStatusResult result = null; try { result = executeGetUpgradeStatus(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future listDomainNamesAsync(ListDomainNamesRequest request) { return listDomainNamesAsync(request, null); } @Override public java.util.concurrent.Future listDomainNamesAsync(final ListDomainNamesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListDomainNamesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListDomainNamesResult call() throws Exception { ListDomainNamesResult result = null; try { result = executeListDomainNames(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future listDomainsForPackageAsync(ListDomainsForPackageRequest request) { return listDomainsForPackageAsync(request, null); } @Override public java.util.concurrent.Future listDomainsForPackageAsync(final ListDomainsForPackageRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListDomainsForPackageRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListDomainsForPackageResult call() throws Exception { ListDomainsForPackageResult result = null; try { result = executeListDomainsForPackage(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future listElasticsearchInstanceTypesAsync(ListElasticsearchInstanceTypesRequest request) { return listElasticsearchInstanceTypesAsync(request, null); } @Override public java.util.concurrent.Future listElasticsearchInstanceTypesAsync( final ListElasticsearchInstanceTypesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListElasticsearchInstanceTypesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListElasticsearchInstanceTypesResult call() throws Exception { ListElasticsearchInstanceTypesResult result = null; try { result = executeListElasticsearchInstanceTypes(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future listElasticsearchVersionsAsync(ListElasticsearchVersionsRequest request) { return listElasticsearchVersionsAsync(request, null); } @Override public java.util.concurrent.Future listElasticsearchVersionsAsync(final ListElasticsearchVersionsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListElasticsearchVersionsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListElasticsearchVersionsResult call() throws Exception { ListElasticsearchVersionsResult result = null; try { result = executeListElasticsearchVersions(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future listPackagesForDomainAsync(ListPackagesForDomainRequest request) { return listPackagesForDomainAsync(request, null); } @Override public java.util.concurrent.Future listPackagesForDomainAsync(final ListPackagesForDomainRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListPackagesForDomainRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListPackagesForDomainResult call() throws Exception { ListPackagesForDomainResult result = null; try { result = executeListPackagesForDomain(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future listTagsAsync(ListTagsRequest request) { return listTagsAsync(request, null); } @Override public java.util.concurrent.Future listTagsAsync(final ListTagsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListTagsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListTagsResult call() throws Exception { ListTagsResult result = null; try { result = executeListTags(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future listVpcEndpointAccessAsync(ListVpcEndpointAccessRequest request) { return listVpcEndpointAccessAsync(request, null); } @Override public java.util.concurrent.Future listVpcEndpointAccessAsync(final ListVpcEndpointAccessRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListVpcEndpointAccessRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListVpcEndpointAccessResult call() throws Exception { ListVpcEndpointAccessResult result = null; try { result = executeListVpcEndpointAccess(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future listVpcEndpointsAsync(ListVpcEndpointsRequest request) { return listVpcEndpointsAsync(request, null); } @Override public java.util.concurrent.Future listVpcEndpointsAsync(final ListVpcEndpointsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListVpcEndpointsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListVpcEndpointsResult call() throws Exception { ListVpcEndpointsResult result = null; try { result = executeListVpcEndpoints(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future listVpcEndpointsForDomainAsync(ListVpcEndpointsForDomainRequest request) { return listVpcEndpointsForDomainAsync(request, null); } @Override public java.util.concurrent.Future listVpcEndpointsForDomainAsync(final ListVpcEndpointsForDomainRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListVpcEndpointsForDomainRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListVpcEndpointsForDomainResult call() throws Exception { ListVpcEndpointsForDomainResult result = null; try { result = executeListVpcEndpointsForDomain(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future purchaseReservedElasticsearchInstanceOfferingAsync( PurchaseReservedElasticsearchInstanceOfferingRequest request) { return purchaseReservedElasticsearchInstanceOfferingAsync(request, null); } @Override public java.util.concurrent.Future purchaseReservedElasticsearchInstanceOfferingAsync( final PurchaseReservedElasticsearchInstanceOfferingRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final PurchaseReservedElasticsearchInstanceOfferingRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public PurchaseReservedElasticsearchInstanceOfferingResult call() throws Exception { PurchaseReservedElasticsearchInstanceOfferingResult result = null; try { result = executePurchaseReservedElasticsearchInstanceOffering(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future rejectInboundCrossClusterSearchConnectionAsync( RejectInboundCrossClusterSearchConnectionRequest request) { return rejectInboundCrossClusterSearchConnectionAsync(request, null); } @Override public java.util.concurrent.Future rejectInboundCrossClusterSearchConnectionAsync( final RejectInboundCrossClusterSearchConnectionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final RejectInboundCrossClusterSearchConnectionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public RejectInboundCrossClusterSearchConnectionResult call() throws Exception { RejectInboundCrossClusterSearchConnectionResult result = null; try { result = executeRejectInboundCrossClusterSearchConnection(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future removeTagsAsync(RemoveTagsRequest request) { return removeTagsAsync(request, null); } @Override public java.util.concurrent.Future removeTagsAsync(final RemoveTagsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final RemoveTagsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public RemoveTagsResult call() throws Exception { RemoveTagsResult result = null; try { result = executeRemoveTags(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future revokeVpcEndpointAccessAsync(RevokeVpcEndpointAccessRequest request) { return revokeVpcEndpointAccessAsync(request, null); } @Override public java.util.concurrent.Future revokeVpcEndpointAccessAsync(final RevokeVpcEndpointAccessRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final RevokeVpcEndpointAccessRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public RevokeVpcEndpointAccessResult call() throws Exception { RevokeVpcEndpointAccessResult result = null; try { result = executeRevokeVpcEndpointAccess(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future startElasticsearchServiceSoftwareUpdateAsync( StartElasticsearchServiceSoftwareUpdateRequest request) { return startElasticsearchServiceSoftwareUpdateAsync(request, null); } @Override public java.util.concurrent.Future startElasticsearchServiceSoftwareUpdateAsync( final StartElasticsearchServiceSoftwareUpdateRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final StartElasticsearchServiceSoftwareUpdateRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public StartElasticsearchServiceSoftwareUpdateResult call() throws Exception { StartElasticsearchServiceSoftwareUpdateResult result = null; try { result = executeStartElasticsearchServiceSoftwareUpdate(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future updateElasticsearchDomainConfigAsync( UpdateElasticsearchDomainConfigRequest request) { return updateElasticsearchDomainConfigAsync(request, null); } @Override public java.util.concurrent.Future updateElasticsearchDomainConfigAsync( final UpdateElasticsearchDomainConfigRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateElasticsearchDomainConfigRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateElasticsearchDomainConfigResult call() throws Exception { UpdateElasticsearchDomainConfigResult result = null; try { result = executeUpdateElasticsearchDomainConfig(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future updatePackageAsync(UpdatePackageRequest request) { return updatePackageAsync(request, null); } @Override public java.util.concurrent.Future updatePackageAsync(final UpdatePackageRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdatePackageRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdatePackageResult call() throws Exception { UpdatePackageResult result = null; try { result = executeUpdatePackage(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future updateVpcEndpointAsync(UpdateVpcEndpointRequest request) { return updateVpcEndpointAsync(request, null); } @Override public java.util.concurrent.Future updateVpcEndpointAsync(final UpdateVpcEndpointRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateVpcEndpointRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateVpcEndpointResult call() throws Exception { UpdateVpcEndpointResult result = null; try { result = executeUpdateVpcEndpoint(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future upgradeElasticsearchDomainAsync(UpgradeElasticsearchDomainRequest request) { return upgradeElasticsearchDomainAsync(request, null); } @Override public java.util.concurrent.Future upgradeElasticsearchDomainAsync(final UpgradeElasticsearchDomainRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpgradeElasticsearchDomainRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpgradeElasticsearchDomainResult call() throws Exception { UpgradeElasticsearchDomainResult result = null; try { result = executeUpgradeElasticsearchDomain(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } /** * Shuts down the client, releasing all managed resources. This includes forcibly terminating all pending * asynchronous service calls. Clients who wish to give pending asynchronous service calls time to complete should * call {@code getExecutorService().shutdown()} followed by {@code getExecutorService().awaitTermination()} prior to * calling this method. */ @Override public void shutdown() { super.shutdown(); executorService.shutdownNow(); } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy