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

com.amazonaws.services.redshift.AmazonRedshiftAsyncClient Maven / Gradle / Ivy

Go to download

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

There is a newer version: 1.12.780
Show newest version
/*
 * Copyright 2013-2018 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.redshift;

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

import javax.annotation.Generated;

import com.amazonaws.services.redshift.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 Redshift 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 Redshift *

* Overview *

*

* This is an interface reference for Amazon Redshift. It contains documentation for one of the programming or command * line interfaces you can use to manage Amazon Redshift clusters. Note that Amazon Redshift is asynchronous, which * means that some interfaces may require techniques, such as polling or asynchronous callback handlers, to determine * when a command has been applied. In this reference, the parameter descriptions indicate whether a change is applied * immediately, on the next instance reboot, or during the next maintenance window. For a summary of the Amazon Redshift * cluster management interfaces, go to Using the Amazon Redshift Management * Interfaces. *

*

* Amazon Redshift manages all the work of setting up, operating, and scaling a data warehouse: provisioning capacity, * monitoring and backing up the cluster, and applying patches and upgrades to the Amazon Redshift engine. You can focus * on using your data to acquire new insights for your business and customers. *

*

* If you are a first-time user of Amazon Redshift, we recommend that you begin by reading the Amazon Redshift Getting Started Guide. *

*

* If you are a database developer, the Amazon * Redshift Database Developer Guide explains how to design, build, query, and maintain the databases that make up * your data warehouse. *

*/ @ThreadSafe @Generated("com.amazonaws:aws-java-sdk-code-generator") public class AmazonRedshiftAsyncClient extends AmazonRedshiftClient implements AmazonRedshiftAsync { 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 Redshift. 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 AmazonRedshiftAsyncClientBuilder#defaultClient()} */ @Deprecated public AmazonRedshiftAsyncClient() { this(DefaultAWSCredentialsProviderChain.getInstance()); } /** * Constructs a new asynchronous client to invoke service methods on Amazon Redshift. 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 Redshift (ex: proxy * settings, retry counts, etc). * * @see com.amazonaws.auth.DefaultAWSCredentialsProviderChain * @see java.util.concurrent.Executors#newFixedThreadPool(int) * @deprecated use {@link AmazonRedshiftAsyncClientBuilder#withClientConfiguration(ClientConfiguration)} */ @Deprecated public AmazonRedshiftAsyncClient(ClientConfiguration clientConfiguration) { this(DefaultAWSCredentialsProviderChain.getInstance(), clientConfiguration, newFixedThreadPool(clientConfiguration.getMaxConnections())); } /** * Constructs a new asynchronous client to invoke service methods on Amazon Redshift 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 AmazonRedshiftAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} */ @Deprecated public AmazonRedshiftAsyncClient(AWSCredentials awsCredentials) { this(awsCredentials, newFixedThreadPool(DEFAULT_THREAD_POOL_SIZE)); } /** * Constructs a new asynchronous client to invoke service methods on Amazon Redshift 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 AmazonRedshiftAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} and * {@link AmazonRedshiftAsyncClientBuilder#withExecutorFactory(com.amazonaws.client.builder.ExecutorFactory)} */ @Deprecated public AmazonRedshiftAsyncClient(AWSCredentials awsCredentials, ExecutorService executorService) { this(awsCredentials, configFactory.getConfig(), executorService); } /** * Constructs a new asynchronous client to invoke service methods on Amazon Redshift 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 AmazonRedshiftAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} and * {@link AmazonRedshiftAsyncClientBuilder#withClientConfiguration(ClientConfiguration)} and * {@link AmazonRedshiftAsyncClientBuilder#withExecutorFactory(com.amazonaws.client.builder.ExecutorFactory)} */ @Deprecated public AmazonRedshiftAsyncClient(AWSCredentials awsCredentials, ClientConfiguration clientConfiguration, ExecutorService executorService) { super(awsCredentials, clientConfiguration); this.executorService = executorService; } /** * Constructs a new asynchronous client to invoke service methods on Amazon Redshift 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 AmazonRedshiftAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} */ @Deprecated public AmazonRedshiftAsyncClient(AWSCredentialsProvider awsCredentialsProvider) { this(awsCredentialsProvider, newFixedThreadPool(DEFAULT_THREAD_POOL_SIZE)); } /** * Constructs a new asynchronous client to invoke service methods on Amazon Redshift 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 AmazonRedshiftAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} and * {@link AmazonRedshiftAsyncClientBuilder#withClientConfiguration(ClientConfiguration)} */ @Deprecated public AmazonRedshiftAsyncClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration) { this(awsCredentialsProvider, clientConfiguration, newFixedThreadPool(clientConfiguration.getMaxConnections())); } /** * Constructs a new asynchronous client to invoke service methods on Amazon Redshift 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 AmazonRedshiftAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} and * {@link AmazonRedshiftAsyncClientBuilder#withExecutorFactory(com.amazonaws.client.builder.ExecutorFactory)} */ @Deprecated public AmazonRedshiftAsyncClient(AWSCredentialsProvider awsCredentialsProvider, ExecutorService executorService) { this(awsCredentialsProvider, configFactory.getConfig(), executorService); } /** * Constructs a new asynchronous client to invoke service methods on Amazon Redshift 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 AmazonRedshiftAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} and * {@link AmazonRedshiftAsyncClientBuilder#withClientConfiguration(ClientConfiguration)} and * {@link AmazonRedshiftAsyncClientBuilder#withExecutorFactory(com.amazonaws.client.builder.ExecutorFactory)} */ @Deprecated public AmazonRedshiftAsyncClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration, ExecutorService executorService) { super(awsCredentialsProvider, clientConfiguration); this.executorService = executorService; } public static AmazonRedshiftAsyncClientBuilder asyncBuilder() { return AmazonRedshiftAsyncClientBuilder.standard(); } /** * Constructs a new asynchronous client to invoke service methods on Amazon Redshift using the specified parameters. * * @param asyncClientParams * Object providing client parameters. */ AmazonRedshiftAsyncClient(AwsAsyncClientParams asyncClientParams) { super(asyncClientParams); 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 authorizeClusterSecurityGroupIngressAsync(AuthorizeClusterSecurityGroupIngressRequest request) { return authorizeClusterSecurityGroupIngressAsync(request, null); } @Override public java.util.concurrent.Future authorizeClusterSecurityGroupIngressAsync( final AuthorizeClusterSecurityGroupIngressRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final AuthorizeClusterSecurityGroupIngressRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ClusterSecurityGroup call() throws Exception { ClusterSecurityGroup result = null; try { result = executeAuthorizeClusterSecurityGroupIngress(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 authorizeSnapshotAccessAsync(AuthorizeSnapshotAccessRequest request) { return authorizeSnapshotAccessAsync(request, null); } @Override public java.util.concurrent.Future authorizeSnapshotAccessAsync(final AuthorizeSnapshotAccessRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final AuthorizeSnapshotAccessRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public Snapshot call() throws Exception { Snapshot result = null; try { result = executeAuthorizeSnapshotAccess(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 copyClusterSnapshotAsync(CopyClusterSnapshotRequest request) { return copyClusterSnapshotAsync(request, null); } @Override public java.util.concurrent.Future copyClusterSnapshotAsync(final CopyClusterSnapshotRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CopyClusterSnapshotRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public Snapshot call() throws Exception { Snapshot result = null; try { result = executeCopyClusterSnapshot(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 createClusterAsync(CreateClusterRequest request) { return createClusterAsync(request, null); } @Override public java.util.concurrent.Future createClusterAsync(final CreateClusterRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateClusterRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public Cluster call() throws Exception { Cluster result = null; try { result = executeCreateCluster(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 createClusterParameterGroupAsync(CreateClusterParameterGroupRequest request) { return createClusterParameterGroupAsync(request, null); } @Override public java.util.concurrent.Future createClusterParameterGroupAsync(final CreateClusterParameterGroupRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateClusterParameterGroupRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ClusterParameterGroup call() throws Exception { ClusterParameterGroup result = null; try { result = executeCreateClusterParameterGroup(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 createClusterSecurityGroupAsync(CreateClusterSecurityGroupRequest request) { return createClusterSecurityGroupAsync(request, null); } @Override public java.util.concurrent.Future createClusterSecurityGroupAsync(final CreateClusterSecurityGroupRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateClusterSecurityGroupRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ClusterSecurityGroup call() throws Exception { ClusterSecurityGroup result = null; try { result = executeCreateClusterSecurityGroup(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 createClusterSnapshotAsync(CreateClusterSnapshotRequest request) { return createClusterSnapshotAsync(request, null); } @Override public java.util.concurrent.Future createClusterSnapshotAsync(final CreateClusterSnapshotRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateClusterSnapshotRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public Snapshot call() throws Exception { Snapshot result = null; try { result = executeCreateClusterSnapshot(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 createClusterSubnetGroupAsync(CreateClusterSubnetGroupRequest request) { return createClusterSubnetGroupAsync(request, null); } @Override public java.util.concurrent.Future createClusterSubnetGroupAsync(final CreateClusterSubnetGroupRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateClusterSubnetGroupRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ClusterSubnetGroup call() throws Exception { ClusterSubnetGroup result = null; try { result = executeCreateClusterSubnetGroup(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 createEventSubscriptionAsync(CreateEventSubscriptionRequest request) { return createEventSubscriptionAsync(request, null); } @Override public java.util.concurrent.Future createEventSubscriptionAsync(final CreateEventSubscriptionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateEventSubscriptionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public EventSubscription call() throws Exception { EventSubscription result = null; try { result = executeCreateEventSubscription(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 createHsmClientCertificateAsync(CreateHsmClientCertificateRequest request) { return createHsmClientCertificateAsync(request, null); } @Override public java.util.concurrent.Future createHsmClientCertificateAsync(final CreateHsmClientCertificateRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateHsmClientCertificateRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public HsmClientCertificate call() throws Exception { HsmClientCertificate result = null; try { result = executeCreateHsmClientCertificate(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 createHsmConfigurationAsync(CreateHsmConfigurationRequest request) { return createHsmConfigurationAsync(request, null); } @Override public java.util.concurrent.Future createHsmConfigurationAsync(final CreateHsmConfigurationRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateHsmConfigurationRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public HsmConfiguration call() throws Exception { HsmConfiguration result = null; try { result = executeCreateHsmConfiguration(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 createSnapshotCopyGrantAsync(CreateSnapshotCopyGrantRequest request) { return createSnapshotCopyGrantAsync(request, null); } @Override public java.util.concurrent.Future createSnapshotCopyGrantAsync(final CreateSnapshotCopyGrantRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateSnapshotCopyGrantRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public SnapshotCopyGrant call() throws Exception { SnapshotCopyGrant result = null; try { result = executeCreateSnapshotCopyGrant(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 createTagsAsync(CreateTagsRequest request) { return createTagsAsync(request, null); } @Override public java.util.concurrent.Future createTagsAsync(final CreateTagsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateTagsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateTagsResult call() throws Exception { CreateTagsResult result = null; try { result = executeCreateTags(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 deleteClusterAsync(DeleteClusterRequest request) { return deleteClusterAsync(request, null); } @Override public java.util.concurrent.Future deleteClusterAsync(final DeleteClusterRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteClusterRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public Cluster call() throws Exception { Cluster result = null; try { result = executeDeleteCluster(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 deleteClusterParameterGroupAsync(DeleteClusterParameterGroupRequest request) { return deleteClusterParameterGroupAsync(request, null); } @Override public java.util.concurrent.Future deleteClusterParameterGroupAsync(final DeleteClusterParameterGroupRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteClusterParameterGroupRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteClusterParameterGroupResult call() throws Exception { DeleteClusterParameterGroupResult result = null; try { result = executeDeleteClusterParameterGroup(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 deleteClusterSecurityGroupAsync(DeleteClusterSecurityGroupRequest request) { return deleteClusterSecurityGroupAsync(request, null); } @Override public java.util.concurrent.Future deleteClusterSecurityGroupAsync(final DeleteClusterSecurityGroupRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteClusterSecurityGroupRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteClusterSecurityGroupResult call() throws Exception { DeleteClusterSecurityGroupResult result = null; try { result = executeDeleteClusterSecurityGroup(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 deleteClusterSnapshotAsync(DeleteClusterSnapshotRequest request) { return deleteClusterSnapshotAsync(request, null); } @Override public java.util.concurrent.Future deleteClusterSnapshotAsync(final DeleteClusterSnapshotRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteClusterSnapshotRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public Snapshot call() throws Exception { Snapshot result = null; try { result = executeDeleteClusterSnapshot(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 deleteClusterSubnetGroupAsync(DeleteClusterSubnetGroupRequest request) { return deleteClusterSubnetGroupAsync(request, null); } @Override public java.util.concurrent.Future deleteClusterSubnetGroupAsync(final DeleteClusterSubnetGroupRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteClusterSubnetGroupRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteClusterSubnetGroupResult call() throws Exception { DeleteClusterSubnetGroupResult result = null; try { result = executeDeleteClusterSubnetGroup(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 deleteEventSubscriptionAsync(DeleteEventSubscriptionRequest request) { return deleteEventSubscriptionAsync(request, null); } @Override public java.util.concurrent.Future deleteEventSubscriptionAsync(final DeleteEventSubscriptionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteEventSubscriptionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteEventSubscriptionResult call() throws Exception { DeleteEventSubscriptionResult result = null; try { result = executeDeleteEventSubscription(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 deleteHsmClientCertificateAsync(DeleteHsmClientCertificateRequest request) { return deleteHsmClientCertificateAsync(request, null); } @Override public java.util.concurrent.Future deleteHsmClientCertificateAsync(final DeleteHsmClientCertificateRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteHsmClientCertificateRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteHsmClientCertificateResult call() throws Exception { DeleteHsmClientCertificateResult result = null; try { result = executeDeleteHsmClientCertificate(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 deleteHsmConfigurationAsync(DeleteHsmConfigurationRequest request) { return deleteHsmConfigurationAsync(request, null); } @Override public java.util.concurrent.Future deleteHsmConfigurationAsync(final DeleteHsmConfigurationRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteHsmConfigurationRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteHsmConfigurationResult call() throws Exception { DeleteHsmConfigurationResult result = null; try { result = executeDeleteHsmConfiguration(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 deleteSnapshotCopyGrantAsync(DeleteSnapshotCopyGrantRequest request) { return deleteSnapshotCopyGrantAsync(request, null); } @Override public java.util.concurrent.Future deleteSnapshotCopyGrantAsync(final DeleteSnapshotCopyGrantRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteSnapshotCopyGrantRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteSnapshotCopyGrantResult call() throws Exception { DeleteSnapshotCopyGrantResult result = null; try { result = executeDeleteSnapshotCopyGrant(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 deleteTagsAsync(DeleteTagsRequest request) { return deleteTagsAsync(request, null); } @Override public java.util.concurrent.Future deleteTagsAsync(final DeleteTagsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteTagsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteTagsResult call() throws Exception { DeleteTagsResult result = null; try { result = executeDeleteTags(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 describeClusterParameterGroupsAsync(DescribeClusterParameterGroupsRequest request) { return describeClusterParameterGroupsAsync(request, null); } @Override public java.util.concurrent.Future describeClusterParameterGroupsAsync( final DescribeClusterParameterGroupsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeClusterParameterGroupsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeClusterParameterGroupsResult call() throws Exception { DescribeClusterParameterGroupsResult result = null; try { result = executeDescribeClusterParameterGroups(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } /** * Simplified method form for invoking the DescribeClusterParameterGroups operation. * * @see #describeClusterParameterGroupsAsync(DescribeClusterParameterGroupsRequest) */ @Override public java.util.concurrent.Future describeClusterParameterGroupsAsync() { return describeClusterParameterGroupsAsync(new DescribeClusterParameterGroupsRequest()); } /** * Simplified method form for invoking the DescribeClusterParameterGroups operation with an AsyncHandler. * * @see #describeClusterParameterGroupsAsync(DescribeClusterParameterGroupsRequest, * com.amazonaws.handlers.AsyncHandler) */ @Override public java.util.concurrent.Future describeClusterParameterGroupsAsync( com.amazonaws.handlers.AsyncHandler asyncHandler) { return describeClusterParameterGroupsAsync(new DescribeClusterParameterGroupsRequest(), asyncHandler); } @Override public java.util.concurrent.Future describeClusterParametersAsync(DescribeClusterParametersRequest request) { return describeClusterParametersAsync(request, null); } @Override public java.util.concurrent.Future describeClusterParametersAsync(final DescribeClusterParametersRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeClusterParametersRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeClusterParametersResult call() throws Exception { DescribeClusterParametersResult result = null; try { result = executeDescribeClusterParameters(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 describeClusterSecurityGroupsAsync(DescribeClusterSecurityGroupsRequest request) { return describeClusterSecurityGroupsAsync(request, null); } @Override public java.util.concurrent.Future describeClusterSecurityGroupsAsync( final DescribeClusterSecurityGroupsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeClusterSecurityGroupsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeClusterSecurityGroupsResult call() throws Exception { DescribeClusterSecurityGroupsResult result = null; try { result = executeDescribeClusterSecurityGroups(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } /** * Simplified method form for invoking the DescribeClusterSecurityGroups operation. * * @see #describeClusterSecurityGroupsAsync(DescribeClusterSecurityGroupsRequest) */ @Override public java.util.concurrent.Future describeClusterSecurityGroupsAsync() { return describeClusterSecurityGroupsAsync(new DescribeClusterSecurityGroupsRequest()); } /** * Simplified method form for invoking the DescribeClusterSecurityGroups operation with an AsyncHandler. * * @see #describeClusterSecurityGroupsAsync(DescribeClusterSecurityGroupsRequest, * com.amazonaws.handlers.AsyncHandler) */ @Override public java.util.concurrent.Future describeClusterSecurityGroupsAsync( com.amazonaws.handlers.AsyncHandler asyncHandler) { return describeClusterSecurityGroupsAsync(new DescribeClusterSecurityGroupsRequest(), asyncHandler); } @Override public java.util.concurrent.Future describeClusterSnapshotsAsync(DescribeClusterSnapshotsRequest request) { return describeClusterSnapshotsAsync(request, null); } @Override public java.util.concurrent.Future describeClusterSnapshotsAsync(final DescribeClusterSnapshotsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeClusterSnapshotsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeClusterSnapshotsResult call() throws Exception { DescribeClusterSnapshotsResult result = null; try { result = executeDescribeClusterSnapshots(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } /** * Simplified method form for invoking the DescribeClusterSnapshots operation. * * @see #describeClusterSnapshotsAsync(DescribeClusterSnapshotsRequest) */ @Override public java.util.concurrent.Future describeClusterSnapshotsAsync() { return describeClusterSnapshotsAsync(new DescribeClusterSnapshotsRequest()); } /** * Simplified method form for invoking the DescribeClusterSnapshots operation with an AsyncHandler. * * @see #describeClusterSnapshotsAsync(DescribeClusterSnapshotsRequest, com.amazonaws.handlers.AsyncHandler) */ @Override public java.util.concurrent.Future describeClusterSnapshotsAsync( com.amazonaws.handlers.AsyncHandler asyncHandler) { return describeClusterSnapshotsAsync(new DescribeClusterSnapshotsRequest(), asyncHandler); } @Override public java.util.concurrent.Future describeClusterSubnetGroupsAsync(DescribeClusterSubnetGroupsRequest request) { return describeClusterSubnetGroupsAsync(request, null); } @Override public java.util.concurrent.Future describeClusterSubnetGroupsAsync(final DescribeClusterSubnetGroupsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeClusterSubnetGroupsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeClusterSubnetGroupsResult call() throws Exception { DescribeClusterSubnetGroupsResult result = null; try { result = executeDescribeClusterSubnetGroups(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } /** * Simplified method form for invoking the DescribeClusterSubnetGroups operation. * * @see #describeClusterSubnetGroupsAsync(DescribeClusterSubnetGroupsRequest) */ @Override public java.util.concurrent.Future describeClusterSubnetGroupsAsync() { return describeClusterSubnetGroupsAsync(new DescribeClusterSubnetGroupsRequest()); } /** * Simplified method form for invoking the DescribeClusterSubnetGroups operation with an AsyncHandler. * * @see #describeClusterSubnetGroupsAsync(DescribeClusterSubnetGroupsRequest, com.amazonaws.handlers.AsyncHandler) */ @Override public java.util.concurrent.Future describeClusterSubnetGroupsAsync( com.amazonaws.handlers.AsyncHandler asyncHandler) { return describeClusterSubnetGroupsAsync(new DescribeClusterSubnetGroupsRequest(), asyncHandler); } @Override public java.util.concurrent.Future describeClusterVersionsAsync(DescribeClusterVersionsRequest request) { return describeClusterVersionsAsync(request, null); } @Override public java.util.concurrent.Future describeClusterVersionsAsync(final DescribeClusterVersionsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeClusterVersionsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeClusterVersionsResult call() throws Exception { DescribeClusterVersionsResult result = null; try { result = executeDescribeClusterVersions(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } /** * Simplified method form for invoking the DescribeClusterVersions operation. * * @see #describeClusterVersionsAsync(DescribeClusterVersionsRequest) */ @Override public java.util.concurrent.Future describeClusterVersionsAsync() { return describeClusterVersionsAsync(new DescribeClusterVersionsRequest()); } /** * Simplified method form for invoking the DescribeClusterVersions operation with an AsyncHandler. * * @see #describeClusterVersionsAsync(DescribeClusterVersionsRequest, com.amazonaws.handlers.AsyncHandler) */ @Override public java.util.concurrent.Future describeClusterVersionsAsync( com.amazonaws.handlers.AsyncHandler asyncHandler) { return describeClusterVersionsAsync(new DescribeClusterVersionsRequest(), asyncHandler); } @Override public java.util.concurrent.Future describeClustersAsync(DescribeClustersRequest request) { return describeClustersAsync(request, null); } @Override public java.util.concurrent.Future describeClustersAsync(final DescribeClustersRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeClustersRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeClustersResult call() throws Exception { DescribeClustersResult result = null; try { result = executeDescribeClusters(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } /** * Simplified method form for invoking the DescribeClusters operation. * * @see #describeClustersAsync(DescribeClustersRequest) */ @Override public java.util.concurrent.Future describeClustersAsync() { return describeClustersAsync(new DescribeClustersRequest()); } /** * Simplified method form for invoking the DescribeClusters operation with an AsyncHandler. * * @see #describeClustersAsync(DescribeClustersRequest, com.amazonaws.handlers.AsyncHandler) */ @Override public java.util.concurrent.Future describeClustersAsync( com.amazonaws.handlers.AsyncHandler asyncHandler) { return describeClustersAsync(new DescribeClustersRequest(), asyncHandler); } @Override public java.util.concurrent.Future describeDefaultClusterParametersAsync(DescribeDefaultClusterParametersRequest request) { return describeDefaultClusterParametersAsync(request, null); } @Override public java.util.concurrent.Future describeDefaultClusterParametersAsync(final DescribeDefaultClusterParametersRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeDefaultClusterParametersRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DefaultClusterParameters call() throws Exception { DefaultClusterParameters result = null; try { result = executeDescribeDefaultClusterParameters(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 describeEventCategoriesAsync(DescribeEventCategoriesRequest request) { return describeEventCategoriesAsync(request, null); } @Override public java.util.concurrent.Future describeEventCategoriesAsync(final DescribeEventCategoriesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeEventCategoriesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeEventCategoriesResult call() throws Exception { DescribeEventCategoriesResult result = null; try { result = executeDescribeEventCategories(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } /** * Simplified method form for invoking the DescribeEventCategories operation. * * @see #describeEventCategoriesAsync(DescribeEventCategoriesRequest) */ @Override public java.util.concurrent.Future describeEventCategoriesAsync() { return describeEventCategoriesAsync(new DescribeEventCategoriesRequest()); } /** * Simplified method form for invoking the DescribeEventCategories operation with an AsyncHandler. * * @see #describeEventCategoriesAsync(DescribeEventCategoriesRequest, com.amazonaws.handlers.AsyncHandler) */ @Override public java.util.concurrent.Future describeEventCategoriesAsync( com.amazonaws.handlers.AsyncHandler asyncHandler) { return describeEventCategoriesAsync(new DescribeEventCategoriesRequest(), asyncHandler); } @Override public java.util.concurrent.Future describeEventSubscriptionsAsync(DescribeEventSubscriptionsRequest request) { return describeEventSubscriptionsAsync(request, null); } @Override public java.util.concurrent.Future describeEventSubscriptionsAsync(final DescribeEventSubscriptionsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeEventSubscriptionsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeEventSubscriptionsResult call() throws Exception { DescribeEventSubscriptionsResult result = null; try { result = executeDescribeEventSubscriptions(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } /** * Simplified method form for invoking the DescribeEventSubscriptions operation. * * @see #describeEventSubscriptionsAsync(DescribeEventSubscriptionsRequest) */ @Override public java.util.concurrent.Future describeEventSubscriptionsAsync() { return describeEventSubscriptionsAsync(new DescribeEventSubscriptionsRequest()); } /** * Simplified method form for invoking the DescribeEventSubscriptions operation with an AsyncHandler. * * @see #describeEventSubscriptionsAsync(DescribeEventSubscriptionsRequest, com.amazonaws.handlers.AsyncHandler) */ @Override public java.util.concurrent.Future describeEventSubscriptionsAsync( com.amazonaws.handlers.AsyncHandler asyncHandler) { return describeEventSubscriptionsAsync(new DescribeEventSubscriptionsRequest(), asyncHandler); } @Override public java.util.concurrent.Future describeEventsAsync(DescribeEventsRequest request) { return describeEventsAsync(request, null); } @Override public java.util.concurrent.Future describeEventsAsync(final DescribeEventsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeEventsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeEventsResult call() throws Exception { DescribeEventsResult result = null; try { result = executeDescribeEvents(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } /** * Simplified method form for invoking the DescribeEvents operation. * * @see #describeEventsAsync(DescribeEventsRequest) */ @Override public java.util.concurrent.Future describeEventsAsync() { return describeEventsAsync(new DescribeEventsRequest()); } /** * Simplified method form for invoking the DescribeEvents operation with an AsyncHandler. * * @see #describeEventsAsync(DescribeEventsRequest, com.amazonaws.handlers.AsyncHandler) */ @Override public java.util.concurrent.Future describeEventsAsync( com.amazonaws.handlers.AsyncHandler asyncHandler) { return describeEventsAsync(new DescribeEventsRequest(), asyncHandler); } @Override public java.util.concurrent.Future describeHsmClientCertificatesAsync(DescribeHsmClientCertificatesRequest request) { return describeHsmClientCertificatesAsync(request, null); } @Override public java.util.concurrent.Future describeHsmClientCertificatesAsync( final DescribeHsmClientCertificatesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeHsmClientCertificatesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeHsmClientCertificatesResult call() throws Exception { DescribeHsmClientCertificatesResult result = null; try { result = executeDescribeHsmClientCertificates(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } /** * Simplified method form for invoking the DescribeHsmClientCertificates operation. * * @see #describeHsmClientCertificatesAsync(DescribeHsmClientCertificatesRequest) */ @Override public java.util.concurrent.Future describeHsmClientCertificatesAsync() { return describeHsmClientCertificatesAsync(new DescribeHsmClientCertificatesRequest()); } /** * Simplified method form for invoking the DescribeHsmClientCertificates operation with an AsyncHandler. * * @see #describeHsmClientCertificatesAsync(DescribeHsmClientCertificatesRequest, * com.amazonaws.handlers.AsyncHandler) */ @Override public java.util.concurrent.Future describeHsmClientCertificatesAsync( com.amazonaws.handlers.AsyncHandler asyncHandler) { return describeHsmClientCertificatesAsync(new DescribeHsmClientCertificatesRequest(), asyncHandler); } @Override public java.util.concurrent.Future describeHsmConfigurationsAsync(DescribeHsmConfigurationsRequest request) { return describeHsmConfigurationsAsync(request, null); } @Override public java.util.concurrent.Future describeHsmConfigurationsAsync(final DescribeHsmConfigurationsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeHsmConfigurationsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeHsmConfigurationsResult call() throws Exception { DescribeHsmConfigurationsResult result = null; try { result = executeDescribeHsmConfigurations(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } /** * Simplified method form for invoking the DescribeHsmConfigurations operation. * * @see #describeHsmConfigurationsAsync(DescribeHsmConfigurationsRequest) */ @Override public java.util.concurrent.Future describeHsmConfigurationsAsync() { return describeHsmConfigurationsAsync(new DescribeHsmConfigurationsRequest()); } /** * Simplified method form for invoking the DescribeHsmConfigurations operation with an AsyncHandler. * * @see #describeHsmConfigurationsAsync(DescribeHsmConfigurationsRequest, com.amazonaws.handlers.AsyncHandler) */ @Override public java.util.concurrent.Future describeHsmConfigurationsAsync( com.amazonaws.handlers.AsyncHandler asyncHandler) { return describeHsmConfigurationsAsync(new DescribeHsmConfigurationsRequest(), asyncHandler); } @Override public java.util.concurrent.Future describeLoggingStatusAsync(DescribeLoggingStatusRequest request) { return describeLoggingStatusAsync(request, null); } @Override public java.util.concurrent.Future describeLoggingStatusAsync(final DescribeLoggingStatusRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeLoggingStatusRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeLoggingStatusResult call() throws Exception { DescribeLoggingStatusResult result = null; try { result = executeDescribeLoggingStatus(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 describeOrderableClusterOptionsAsync( DescribeOrderableClusterOptionsRequest request) { return describeOrderableClusterOptionsAsync(request, null); } @Override public java.util.concurrent.Future describeOrderableClusterOptionsAsync( final DescribeOrderableClusterOptionsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeOrderableClusterOptionsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeOrderableClusterOptionsResult call() throws Exception { DescribeOrderableClusterOptionsResult result = null; try { result = executeDescribeOrderableClusterOptions(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } /** * Simplified method form for invoking the DescribeOrderableClusterOptions operation. * * @see #describeOrderableClusterOptionsAsync(DescribeOrderableClusterOptionsRequest) */ @Override public java.util.concurrent.Future describeOrderableClusterOptionsAsync() { return describeOrderableClusterOptionsAsync(new DescribeOrderableClusterOptionsRequest()); } /** * Simplified method form for invoking the DescribeOrderableClusterOptions operation with an AsyncHandler. * * @see #describeOrderableClusterOptionsAsync(DescribeOrderableClusterOptionsRequest, * com.amazonaws.handlers.AsyncHandler) */ @Override public java.util.concurrent.Future describeOrderableClusterOptionsAsync( com.amazonaws.handlers.AsyncHandler asyncHandler) { return describeOrderableClusterOptionsAsync(new DescribeOrderableClusterOptionsRequest(), asyncHandler); } @Override public java.util.concurrent.Future describeReservedNodeOfferingsAsync(DescribeReservedNodeOfferingsRequest request) { return describeReservedNodeOfferingsAsync(request, null); } @Override public java.util.concurrent.Future describeReservedNodeOfferingsAsync( final DescribeReservedNodeOfferingsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeReservedNodeOfferingsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeReservedNodeOfferingsResult call() throws Exception { DescribeReservedNodeOfferingsResult result = null; try { result = executeDescribeReservedNodeOfferings(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } /** * Simplified method form for invoking the DescribeReservedNodeOfferings operation. * * @see #describeReservedNodeOfferingsAsync(DescribeReservedNodeOfferingsRequest) */ @Override public java.util.concurrent.Future describeReservedNodeOfferingsAsync() { return describeReservedNodeOfferingsAsync(new DescribeReservedNodeOfferingsRequest()); } /** * Simplified method form for invoking the DescribeReservedNodeOfferings operation with an AsyncHandler. * * @see #describeReservedNodeOfferingsAsync(DescribeReservedNodeOfferingsRequest, * com.amazonaws.handlers.AsyncHandler) */ @Override public java.util.concurrent.Future describeReservedNodeOfferingsAsync( com.amazonaws.handlers.AsyncHandler asyncHandler) { return describeReservedNodeOfferingsAsync(new DescribeReservedNodeOfferingsRequest(), asyncHandler); } @Override public java.util.concurrent.Future describeReservedNodesAsync(DescribeReservedNodesRequest request) { return describeReservedNodesAsync(request, null); } @Override public java.util.concurrent.Future describeReservedNodesAsync(final DescribeReservedNodesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeReservedNodesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeReservedNodesResult call() throws Exception { DescribeReservedNodesResult result = null; try { result = executeDescribeReservedNodes(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } /** * Simplified method form for invoking the DescribeReservedNodes operation. * * @see #describeReservedNodesAsync(DescribeReservedNodesRequest) */ @Override public java.util.concurrent.Future describeReservedNodesAsync() { return describeReservedNodesAsync(new DescribeReservedNodesRequest()); } /** * Simplified method form for invoking the DescribeReservedNodes operation with an AsyncHandler. * * @see #describeReservedNodesAsync(DescribeReservedNodesRequest, com.amazonaws.handlers.AsyncHandler) */ @Override public java.util.concurrent.Future describeReservedNodesAsync( com.amazonaws.handlers.AsyncHandler asyncHandler) { return describeReservedNodesAsync(new DescribeReservedNodesRequest(), asyncHandler); } @Override public java.util.concurrent.Future describeResizeAsync(DescribeResizeRequest request) { return describeResizeAsync(request, null); } @Override public java.util.concurrent.Future describeResizeAsync(final DescribeResizeRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeResizeRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeResizeResult call() throws Exception { DescribeResizeResult result = null; try { result = executeDescribeResize(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 describeSnapshotCopyGrantsAsync(DescribeSnapshotCopyGrantsRequest request) { return describeSnapshotCopyGrantsAsync(request, null); } @Override public java.util.concurrent.Future describeSnapshotCopyGrantsAsync(final DescribeSnapshotCopyGrantsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeSnapshotCopyGrantsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeSnapshotCopyGrantsResult call() throws Exception { DescribeSnapshotCopyGrantsResult result = null; try { result = executeDescribeSnapshotCopyGrants(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } /** * Simplified method form for invoking the DescribeSnapshotCopyGrants operation. * * @see #describeSnapshotCopyGrantsAsync(DescribeSnapshotCopyGrantsRequest) */ @Override public java.util.concurrent.Future describeSnapshotCopyGrantsAsync() { return describeSnapshotCopyGrantsAsync(new DescribeSnapshotCopyGrantsRequest()); } /** * Simplified method form for invoking the DescribeSnapshotCopyGrants operation with an AsyncHandler. * * @see #describeSnapshotCopyGrantsAsync(DescribeSnapshotCopyGrantsRequest, com.amazonaws.handlers.AsyncHandler) */ @Override public java.util.concurrent.Future describeSnapshotCopyGrantsAsync( com.amazonaws.handlers.AsyncHandler asyncHandler) { return describeSnapshotCopyGrantsAsync(new DescribeSnapshotCopyGrantsRequest(), asyncHandler); } @Override public java.util.concurrent.Future describeTableRestoreStatusAsync(DescribeTableRestoreStatusRequest request) { return describeTableRestoreStatusAsync(request, null); } @Override public java.util.concurrent.Future describeTableRestoreStatusAsync(final DescribeTableRestoreStatusRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeTableRestoreStatusRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeTableRestoreStatusResult call() throws Exception { DescribeTableRestoreStatusResult result = null; try { result = executeDescribeTableRestoreStatus(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } /** * Simplified method form for invoking the DescribeTableRestoreStatus operation. * * @see #describeTableRestoreStatusAsync(DescribeTableRestoreStatusRequest) */ @Override public java.util.concurrent.Future describeTableRestoreStatusAsync() { return describeTableRestoreStatusAsync(new DescribeTableRestoreStatusRequest()); } /** * Simplified method form for invoking the DescribeTableRestoreStatus operation with an AsyncHandler. * * @see #describeTableRestoreStatusAsync(DescribeTableRestoreStatusRequest, com.amazonaws.handlers.AsyncHandler) */ @Override public java.util.concurrent.Future describeTableRestoreStatusAsync( com.amazonaws.handlers.AsyncHandler asyncHandler) { return describeTableRestoreStatusAsync(new DescribeTableRestoreStatusRequest(), asyncHandler); } @Override public java.util.concurrent.Future describeTagsAsync(DescribeTagsRequest request) { return describeTagsAsync(request, null); } @Override public java.util.concurrent.Future describeTagsAsync(final DescribeTagsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeTagsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeTagsResult call() throws Exception { DescribeTagsResult result = null; try { result = executeDescribeTags(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } /** * Simplified method form for invoking the DescribeTags operation. * * @see #describeTagsAsync(DescribeTagsRequest) */ @Override public java.util.concurrent.Future describeTagsAsync() { return describeTagsAsync(new DescribeTagsRequest()); } /** * Simplified method form for invoking the DescribeTags operation with an AsyncHandler. * * @see #describeTagsAsync(DescribeTagsRequest, com.amazonaws.handlers.AsyncHandler) */ @Override public java.util.concurrent.Future describeTagsAsync( com.amazonaws.handlers.AsyncHandler asyncHandler) { return describeTagsAsync(new DescribeTagsRequest(), asyncHandler); } @Override public java.util.concurrent.Future disableLoggingAsync(DisableLoggingRequest request) { return disableLoggingAsync(request, null); } @Override public java.util.concurrent.Future disableLoggingAsync(final DisableLoggingRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DisableLoggingRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DisableLoggingResult call() throws Exception { DisableLoggingResult result = null; try { result = executeDisableLogging(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 disableSnapshotCopyAsync(DisableSnapshotCopyRequest request) { return disableSnapshotCopyAsync(request, null); } @Override public java.util.concurrent.Future disableSnapshotCopyAsync(final DisableSnapshotCopyRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DisableSnapshotCopyRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public Cluster call() throws Exception { Cluster result = null; try { result = executeDisableSnapshotCopy(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 enableLoggingAsync(EnableLoggingRequest request) { return enableLoggingAsync(request, null); } @Override public java.util.concurrent.Future enableLoggingAsync(final EnableLoggingRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final EnableLoggingRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public EnableLoggingResult call() throws Exception { EnableLoggingResult result = null; try { result = executeEnableLogging(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 enableSnapshotCopyAsync(EnableSnapshotCopyRequest request) { return enableSnapshotCopyAsync(request, null); } @Override public java.util.concurrent.Future enableSnapshotCopyAsync(final EnableSnapshotCopyRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final EnableSnapshotCopyRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public Cluster call() throws Exception { Cluster result = null; try { result = executeEnableSnapshotCopy(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 getClusterCredentialsAsync(GetClusterCredentialsRequest request) { return getClusterCredentialsAsync(request, null); } @Override public java.util.concurrent.Future getClusterCredentialsAsync(final GetClusterCredentialsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetClusterCredentialsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetClusterCredentialsResult call() throws Exception { GetClusterCredentialsResult result = null; try { result = executeGetClusterCredentials(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 modifyClusterAsync(ModifyClusterRequest request) { return modifyClusterAsync(request, null); } @Override public java.util.concurrent.Future modifyClusterAsync(final ModifyClusterRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ModifyClusterRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public Cluster call() throws Exception { Cluster result = null; try { result = executeModifyCluster(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 modifyClusterIamRolesAsync(ModifyClusterIamRolesRequest request) { return modifyClusterIamRolesAsync(request, null); } @Override public java.util.concurrent.Future modifyClusterIamRolesAsync(final ModifyClusterIamRolesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ModifyClusterIamRolesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public Cluster call() throws Exception { Cluster result = null; try { result = executeModifyClusterIamRoles(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 modifyClusterParameterGroupAsync(ModifyClusterParameterGroupRequest request) { return modifyClusterParameterGroupAsync(request, null); } @Override public java.util.concurrent.Future modifyClusterParameterGroupAsync(final ModifyClusterParameterGroupRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ModifyClusterParameterGroupRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ModifyClusterParameterGroupResult call() throws Exception { ModifyClusterParameterGroupResult result = null; try { result = executeModifyClusterParameterGroup(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 modifyClusterSubnetGroupAsync(ModifyClusterSubnetGroupRequest request) { return modifyClusterSubnetGroupAsync(request, null); } @Override public java.util.concurrent.Future modifyClusterSubnetGroupAsync(final ModifyClusterSubnetGroupRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ModifyClusterSubnetGroupRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ClusterSubnetGroup call() throws Exception { ClusterSubnetGroup result = null; try { result = executeModifyClusterSubnetGroup(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 modifyEventSubscriptionAsync(ModifyEventSubscriptionRequest request) { return modifyEventSubscriptionAsync(request, null); } @Override public java.util.concurrent.Future modifyEventSubscriptionAsync(final ModifyEventSubscriptionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ModifyEventSubscriptionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public EventSubscription call() throws Exception { EventSubscription result = null; try { result = executeModifyEventSubscription(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 modifySnapshotCopyRetentionPeriodAsync(ModifySnapshotCopyRetentionPeriodRequest request) { return modifySnapshotCopyRetentionPeriodAsync(request, null); } @Override public java.util.concurrent.Future modifySnapshotCopyRetentionPeriodAsync(final ModifySnapshotCopyRetentionPeriodRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ModifySnapshotCopyRetentionPeriodRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public Cluster call() throws Exception { Cluster result = null; try { result = executeModifySnapshotCopyRetentionPeriod(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 purchaseReservedNodeOfferingAsync(PurchaseReservedNodeOfferingRequest request) { return purchaseReservedNodeOfferingAsync(request, null); } @Override public java.util.concurrent.Future purchaseReservedNodeOfferingAsync(final PurchaseReservedNodeOfferingRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final PurchaseReservedNodeOfferingRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ReservedNode call() throws Exception { ReservedNode result = null; try { result = executePurchaseReservedNodeOffering(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 rebootClusterAsync(RebootClusterRequest request) { return rebootClusterAsync(request, null); } @Override public java.util.concurrent.Future rebootClusterAsync(final RebootClusterRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final RebootClusterRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public Cluster call() throws Exception { Cluster result = null; try { result = executeRebootCluster(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 resetClusterParameterGroupAsync(ResetClusterParameterGroupRequest request) { return resetClusterParameterGroupAsync(request, null); } @Override public java.util.concurrent.Future resetClusterParameterGroupAsync(final ResetClusterParameterGroupRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ResetClusterParameterGroupRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ResetClusterParameterGroupResult call() throws Exception { ResetClusterParameterGroupResult result = null; try { result = executeResetClusterParameterGroup(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 restoreFromClusterSnapshotAsync(RestoreFromClusterSnapshotRequest request) { return restoreFromClusterSnapshotAsync(request, null); } @Override public java.util.concurrent.Future restoreFromClusterSnapshotAsync(final RestoreFromClusterSnapshotRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final RestoreFromClusterSnapshotRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public Cluster call() throws Exception { Cluster result = null; try { result = executeRestoreFromClusterSnapshot(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 restoreTableFromClusterSnapshotAsync(RestoreTableFromClusterSnapshotRequest request) { return restoreTableFromClusterSnapshotAsync(request, null); } @Override public java.util.concurrent.Future restoreTableFromClusterSnapshotAsync(final RestoreTableFromClusterSnapshotRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final RestoreTableFromClusterSnapshotRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public TableRestoreStatus call() throws Exception { TableRestoreStatus result = null; try { result = executeRestoreTableFromClusterSnapshot(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 revokeClusterSecurityGroupIngressAsync(RevokeClusterSecurityGroupIngressRequest request) { return revokeClusterSecurityGroupIngressAsync(request, null); } @Override public java.util.concurrent.Future revokeClusterSecurityGroupIngressAsync(final RevokeClusterSecurityGroupIngressRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final RevokeClusterSecurityGroupIngressRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ClusterSecurityGroup call() throws Exception { ClusterSecurityGroup result = null; try { result = executeRevokeClusterSecurityGroupIngress(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 revokeSnapshotAccessAsync(RevokeSnapshotAccessRequest request) { return revokeSnapshotAccessAsync(request, null); } @Override public java.util.concurrent.Future revokeSnapshotAccessAsync(final RevokeSnapshotAccessRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final RevokeSnapshotAccessRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public Snapshot call() throws Exception { Snapshot result = null; try { result = executeRevokeSnapshotAccess(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 rotateEncryptionKeyAsync(RotateEncryptionKeyRequest request) { return rotateEncryptionKeyAsync(request, null); } @Override public java.util.concurrent.Future rotateEncryptionKeyAsync(final RotateEncryptionKeyRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final RotateEncryptionKeyRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public Cluster call() throws Exception { Cluster result = null; try { result = executeRotateEncryptionKey(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