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 2010-2016 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 com.amazonaws.services.redshift.model.*;
import com.amazonaws.annotation.ThreadSafe;

/**
 * Interface 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 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 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) */ public AmazonRedshiftAsyncClient() { this(new com.amazonaws.auth.DefaultAWSCredentialsProviderChain()); } /** * 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) */ public AmazonRedshiftAsyncClient( com.amazonaws.ClientConfiguration clientConfiguration) { this(new com.amazonaws.auth.DefaultAWSCredentialsProviderChain(), clientConfiguration, java.util.concurrent.Executors .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) */ public AmazonRedshiftAsyncClient( com.amazonaws.auth.AWSCredentials awsCredentials) { this(awsCredentials, java.util.concurrent.Executors .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. */ public AmazonRedshiftAsyncClient( com.amazonaws.auth.AWSCredentials awsCredentials, java.util.concurrent.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. */ public AmazonRedshiftAsyncClient( com.amazonaws.auth.AWSCredentials awsCredentials, com.amazonaws.ClientConfiguration clientConfiguration, java.util.concurrent.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) */ public AmazonRedshiftAsyncClient( com.amazonaws.auth.AWSCredentialsProvider awsCredentialsProvider) { this(awsCredentialsProvider, java.util.concurrent.Executors .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) */ public AmazonRedshiftAsyncClient( com.amazonaws.auth.AWSCredentialsProvider awsCredentialsProvider, com.amazonaws.ClientConfiguration clientConfiguration) { this(awsCredentialsProvider, clientConfiguration, java.util.concurrent.Executors .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. */ public AmazonRedshiftAsyncClient( com.amazonaws.auth.AWSCredentialsProvider awsCredentialsProvider, java.util.concurrent.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. */ public AmazonRedshiftAsyncClient( com.amazonaws.auth.AWSCredentialsProvider awsCredentialsProvider, com.amazonaws.ClientConfiguration clientConfiguration, java.util.concurrent.ExecutorService executorService) { super(awsCredentialsProvider, clientConfiguration); this.executorService = executorService; } /** * 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 java.util.concurrent.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) { return executorService .submit(new java.util.concurrent.Callable() { @Override public ClusterSecurityGroup call() throws Exception { ClusterSecurityGroup result; try { result = authorizeClusterSecurityGroupIngress(request); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(request, 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) { return executorService .submit(new java.util.concurrent.Callable() { @Override public Snapshot call() throws Exception { Snapshot result; try { result = authorizeSnapshotAccess(request); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(request, 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) { return executorService .submit(new java.util.concurrent.Callable() { @Override public Snapshot call() throws Exception { Snapshot result; try { result = copyClusterSnapshot(request); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(request, 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) { return executorService .submit(new java.util.concurrent.Callable() { @Override public Cluster call() throws Exception { Cluster result; try { result = createCluster(request); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(request, 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) { return executorService .submit(new java.util.concurrent.Callable() { @Override public ClusterParameterGroup call() throws Exception { ClusterParameterGroup result; try { result = createClusterParameterGroup(request); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(request, 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) { return executorService .submit(new java.util.concurrent.Callable() { @Override public ClusterSecurityGroup call() throws Exception { ClusterSecurityGroup result; try { result = createClusterSecurityGroup(request); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(request, 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) { return executorService .submit(new java.util.concurrent.Callable() { @Override public Snapshot call() throws Exception { Snapshot result; try { result = createClusterSnapshot(request); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(request, 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) { return executorService .submit(new java.util.concurrent.Callable() { @Override public ClusterSubnetGroup call() throws Exception { ClusterSubnetGroup result; try { result = createClusterSubnetGroup(request); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(request, 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) { return executorService .submit(new java.util.concurrent.Callable() { @Override public EventSubscription call() throws Exception { EventSubscription result; try { result = createEventSubscription(request); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(request, 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) { return executorService .submit(new java.util.concurrent.Callable() { @Override public HsmClientCertificate call() throws Exception { HsmClientCertificate result; try { result = createHsmClientCertificate(request); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(request, 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) { return executorService .submit(new java.util.concurrent.Callable() { @Override public HsmConfiguration call() throws Exception { HsmConfiguration result; try { result = createHsmConfiguration(request); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(request, 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) { return executorService .submit(new java.util.concurrent.Callable() { @Override public SnapshotCopyGrant call() throws Exception { SnapshotCopyGrant result; try { result = createSnapshotCopyGrant(request); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(request, 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) { return executorService .submit(new java.util.concurrent.Callable() { @Override public CreateTagsResult call() throws Exception { CreateTagsResult result; try { result = createTags(request); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(request, 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) { return executorService .submit(new java.util.concurrent.Callable() { @Override public Cluster call() throws Exception { Cluster result; try { result = deleteCluster(request); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(request, 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) { return executorService .submit(new java.util.concurrent.Callable() { @Override public DeleteClusterParameterGroupResult call() throws Exception { DeleteClusterParameterGroupResult result; try { result = deleteClusterParameterGroup(request); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(request, 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) { return executorService .submit(new java.util.concurrent.Callable() { @Override public DeleteClusterSecurityGroupResult call() throws Exception { DeleteClusterSecurityGroupResult result; try { result = deleteClusterSecurityGroup(request); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(request, 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) { return executorService .submit(new java.util.concurrent.Callable() { @Override public Snapshot call() throws Exception { Snapshot result; try { result = deleteClusterSnapshot(request); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(request, 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) { return executorService .submit(new java.util.concurrent.Callable() { @Override public DeleteClusterSubnetGroupResult call() throws Exception { DeleteClusterSubnetGroupResult result; try { result = deleteClusterSubnetGroup(request); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(request, 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) { return executorService .submit(new java.util.concurrent.Callable() { @Override public DeleteEventSubscriptionResult call() throws Exception { DeleteEventSubscriptionResult result; try { result = deleteEventSubscription(request); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(request, 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) { return executorService .submit(new java.util.concurrent.Callable() { @Override public DeleteHsmClientCertificateResult call() throws Exception { DeleteHsmClientCertificateResult result; try { result = deleteHsmClientCertificate(request); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(request, 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) { return executorService .submit(new java.util.concurrent.Callable() { @Override public DeleteHsmConfigurationResult call() throws Exception { DeleteHsmConfigurationResult result; try { result = deleteHsmConfiguration(request); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(request, 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) { return executorService .submit(new java.util.concurrent.Callable() { @Override public DeleteSnapshotCopyGrantResult call() throws Exception { DeleteSnapshotCopyGrantResult result; try { result = deleteSnapshotCopyGrant(request); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(request, 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) { return executorService .submit(new java.util.concurrent.Callable() { @Override public DeleteTagsResult call() throws Exception { DeleteTagsResult result; try { result = deleteTags(request); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(request, 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) { return executorService .submit(new java.util.concurrent.Callable() { @Override public DescribeClusterParameterGroupsResult call() throws Exception { DescribeClusterParameterGroupsResult result; try { result = describeClusterParameterGroups(request); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(request, 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) */ 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) { return executorService .submit(new java.util.concurrent.Callable() { @Override public DescribeClusterParametersResult call() throws Exception { DescribeClusterParametersResult result; try { result = describeClusterParameters(request); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(request, 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) { return executorService .submit(new java.util.concurrent.Callable() { @Override public DescribeClusterSecurityGroupsResult call() throws Exception { DescribeClusterSecurityGroupsResult result; try { result = describeClusterSecurityGroups(request); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(request, 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) */ 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) { return executorService .submit(new java.util.concurrent.Callable() { @Override public DescribeClusterSnapshotsResult call() throws Exception { DescribeClusterSnapshotsResult result; try { result = describeClusterSnapshots(request); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(request, 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) */ 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) { return executorService .submit(new java.util.concurrent.Callable() { @Override public DescribeClusterSubnetGroupsResult call() throws Exception { DescribeClusterSubnetGroupsResult result; try { result = describeClusterSubnetGroups(request); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(request, 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) */ 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) { return executorService .submit(new java.util.concurrent.Callable() { @Override public DescribeClusterVersionsResult call() throws Exception { DescribeClusterVersionsResult result; try { result = describeClusterVersions(request); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(request, 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) */ 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) { return executorService .submit(new java.util.concurrent.Callable() { @Override public DescribeClustersResult call() throws Exception { DescribeClustersResult result; try { result = describeClusters(request); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(request, 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) */ 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) { return executorService .submit(new java.util.concurrent.Callable() { @Override public DefaultClusterParameters call() throws Exception { DefaultClusterParameters result; try { result = describeDefaultClusterParameters(request); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(request, 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) { return executorService .submit(new java.util.concurrent.Callable() { @Override public DescribeEventCategoriesResult call() throws Exception { DescribeEventCategoriesResult result; try { result = describeEventCategories(request); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(request, 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) */ 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) { return executorService .submit(new java.util.concurrent.Callable() { @Override public DescribeEventSubscriptionsResult call() throws Exception { DescribeEventSubscriptionsResult result; try { result = describeEventSubscriptions(request); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(request, 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) */ 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) { return executorService .submit(new java.util.concurrent.Callable() { @Override public DescribeEventsResult call() throws Exception { DescribeEventsResult result; try { result = describeEvents(request); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(request, 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) */ 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) { return executorService .submit(new java.util.concurrent.Callable() { @Override public DescribeHsmClientCertificatesResult call() throws Exception { DescribeHsmClientCertificatesResult result; try { result = describeHsmClientCertificates(request); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(request, 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) */ 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) { return executorService .submit(new java.util.concurrent.Callable() { @Override public DescribeHsmConfigurationsResult call() throws Exception { DescribeHsmConfigurationsResult result; try { result = describeHsmConfigurations(request); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(request, 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) */ 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) { return executorService .submit(new java.util.concurrent.Callable() { @Override public DescribeLoggingStatusResult call() throws Exception { DescribeLoggingStatusResult result; try { result = describeLoggingStatus(request); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(request, 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) { return executorService .submit(new java.util.concurrent.Callable() { @Override public DescribeOrderableClusterOptionsResult call() throws Exception { DescribeOrderableClusterOptionsResult result; try { result = describeOrderableClusterOptions(request); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(request, 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) */ 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) { return executorService .submit(new java.util.concurrent.Callable() { @Override public DescribeReservedNodeOfferingsResult call() throws Exception { DescribeReservedNodeOfferingsResult result; try { result = describeReservedNodeOfferings(request); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(request, 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) */ 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) { return executorService .submit(new java.util.concurrent.Callable() { @Override public DescribeReservedNodesResult call() throws Exception { DescribeReservedNodesResult result; try { result = describeReservedNodes(request); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(request, 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) */ 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) { return executorService .submit(new java.util.concurrent.Callable() { @Override public DescribeResizeResult call() throws Exception { DescribeResizeResult result; try { result = describeResize(request); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(request, 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) { return executorService .submit(new java.util.concurrent.Callable() { @Override public DescribeSnapshotCopyGrantsResult call() throws Exception { DescribeSnapshotCopyGrantsResult result; try { result = describeSnapshotCopyGrants(request); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(request, 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) */ 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) { return executorService .submit(new java.util.concurrent.Callable() { @Override public DescribeTableRestoreStatusResult call() throws Exception { DescribeTableRestoreStatusResult result; try { result = describeTableRestoreStatus(request); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(request, 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) */ 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) { return executorService .submit(new java.util.concurrent.Callable() { @Override public DescribeTagsResult call() throws Exception { DescribeTagsResult result; try { result = describeTags(request); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(request, 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) */ 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) { return executorService .submit(new java.util.concurrent.Callable() { @Override public DisableLoggingResult call() throws Exception { DisableLoggingResult result; try { result = disableLogging(request); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(request, 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) { return executorService .submit(new java.util.concurrent.Callable() { @Override public Cluster call() throws Exception { Cluster result; try { result = disableSnapshotCopy(request); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(request, 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) { return executorService .submit(new java.util.concurrent.Callable() { @Override public EnableLoggingResult call() throws Exception { EnableLoggingResult result; try { result = enableLogging(request); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(request, 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) { return executorService .submit(new java.util.concurrent.Callable() { @Override public Cluster call() throws Exception { Cluster result; try { result = enableSnapshotCopy(request); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(request, 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) { return executorService .submit(new java.util.concurrent.Callable() { @Override public Cluster call() throws Exception { Cluster result; try { result = modifyCluster(request); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(request, 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) { return executorService .submit(new java.util.concurrent.Callable() { @Override public Cluster call() throws Exception { Cluster result; try { result = modifyClusterIamRoles(request); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(request, 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) { return executorService .submit(new java.util.concurrent.Callable() { @Override public ModifyClusterParameterGroupResult call() throws Exception { ModifyClusterParameterGroupResult result; try { result = modifyClusterParameterGroup(request); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(request, 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) { return executorService .submit(new java.util.concurrent.Callable() { @Override public ClusterSubnetGroup call() throws Exception { ClusterSubnetGroup result; try { result = modifyClusterSubnetGroup(request); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(request, 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) { return executorService .submit(new java.util.concurrent.Callable() { @Override public EventSubscription call() throws Exception { EventSubscription result; try { result = modifyEventSubscription(request); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(request, 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) { return executorService .submit(new java.util.concurrent.Callable() { @Override public Cluster call() throws Exception { Cluster result; try { result = modifySnapshotCopyRetentionPeriod(request); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(request, 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) { return executorService .submit(new java.util.concurrent.Callable() { @Override public ReservedNode call() throws Exception { ReservedNode result; try { result = purchaseReservedNodeOffering(request); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(request, 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) { return executorService .submit(new java.util.concurrent.Callable() { @Override public Cluster call() throws Exception { Cluster result; try { result = rebootCluster(request); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(request, 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) { return executorService .submit(new java.util.concurrent.Callable() { @Override public ResetClusterParameterGroupResult call() throws Exception { ResetClusterParameterGroupResult result; try { result = resetClusterParameterGroup(request); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(request, 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) { return executorService .submit(new java.util.concurrent.Callable() { @Override public Cluster call() throws Exception { Cluster result; try { result = restoreFromClusterSnapshot(request); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(request, 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) { return executorService .submit(new java.util.concurrent.Callable() { @Override public TableRestoreStatus call() throws Exception { TableRestoreStatus result; try { result = restoreTableFromClusterSnapshot(request); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(request, 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) { return executorService .submit(new java.util.concurrent.Callable() { @Override public ClusterSecurityGroup call() throws Exception { ClusterSecurityGroup result; try { result = revokeClusterSecurityGroupIngress(request); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(request, 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) { return executorService .submit(new java.util.concurrent.Callable() { @Override public Snapshot call() throws Exception { Snapshot result; try { result = revokeSnapshotAccess(request); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(request, 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) { return executorService .submit(new java.util.concurrent.Callable() { @Override public Cluster call() throws Exception { Cluster result; try { result = rotateEncryptionKey(request); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(request, 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