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

com.amazonaws.services.elasticache.AmazonElastiCacheAsyncClient Maven / Gradle / Ivy

Go to download

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

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

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

import javax.annotation.Generated;

import com.amazonaws.services.elasticache.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 ElastiCache 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 ElastiCache *

* Amazon ElastiCache is a web service that makes it easier to set up, operate, and scale a distributed cache in the * cloud. *

*

* With ElastiCache, customers get all of the benefits of a high-performance, in-memory cache with less of the * administrative burden involved in launching and managing a distributed cache. The service makes setup, scaling, and * cluster failure handling much simpler than in a self-managed cache deployment. *

*

* In addition, through integration with Amazon CloudWatch, customers get enhanced visibility into the key performance * statistics associated with their cache and can receive alarms if a part of their cache runs hot. *

*/ @ThreadSafe @Generated("com.amazonaws:aws-java-sdk-code-generator") public class AmazonElastiCacheAsyncClient extends AmazonElastiCacheClient implements AmazonElastiCacheAsync { 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 ElastiCache. 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 AmazonElastiCacheAsyncClientBuilder#defaultClient()} */ @Deprecated public AmazonElastiCacheAsyncClient() { this(DefaultAWSCredentialsProviderChain.getInstance()); } /** * Constructs a new asynchronous client to invoke service methods on Amazon ElastiCache. 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 ElastiCache (ex: proxy * settings, retry counts, etc). * * @see com.amazonaws.auth.DefaultAWSCredentialsProviderChain * @see java.util.concurrent.Executors#newFixedThreadPool(int) * @deprecated use {@link AmazonElastiCacheAsyncClientBuilder#withClientConfiguration(ClientConfiguration)} */ @Deprecated public AmazonElastiCacheAsyncClient(ClientConfiguration clientConfiguration) { this(DefaultAWSCredentialsProviderChain.getInstance(), clientConfiguration, newFixedThreadPool(clientConfiguration.getMaxConnections())); } /** * Constructs a new asynchronous client to invoke service methods on Amazon ElastiCache 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 AmazonElastiCacheAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} */ @Deprecated public AmazonElastiCacheAsyncClient(AWSCredentials awsCredentials) { this(awsCredentials, newFixedThreadPool(DEFAULT_THREAD_POOL_SIZE)); } /** * Constructs a new asynchronous client to invoke service methods on Amazon ElastiCache 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 AmazonElastiCacheAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} and * {@link AmazonElastiCacheAsyncClientBuilder#withExecutorFactory(com.amazonaws.client.builder.ExecutorFactory)} */ @Deprecated public AmazonElastiCacheAsyncClient(AWSCredentials awsCredentials, ExecutorService executorService) { this(awsCredentials, configFactory.getConfig(), executorService); } /** * Constructs a new asynchronous client to invoke service methods on Amazon ElastiCache 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 AmazonElastiCacheAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} and * {@link AmazonElastiCacheAsyncClientBuilder#withClientConfiguration(ClientConfiguration)} and * {@link AmazonElastiCacheAsyncClientBuilder#withExecutorFactory(com.amazonaws.client.builder.ExecutorFactory)} */ @Deprecated public AmazonElastiCacheAsyncClient(AWSCredentials awsCredentials, ClientConfiguration clientConfiguration, ExecutorService executorService) { super(awsCredentials, clientConfiguration); this.executorService = executorService; } /** * Constructs a new asynchronous client to invoke service methods on Amazon ElastiCache 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 AmazonElastiCacheAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} */ @Deprecated public AmazonElastiCacheAsyncClient(AWSCredentialsProvider awsCredentialsProvider) { this(awsCredentialsProvider, newFixedThreadPool(DEFAULT_THREAD_POOL_SIZE)); } /** * Constructs a new asynchronous client to invoke service methods on Amazon ElastiCache 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 AmazonElastiCacheAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} and * {@link AmazonElastiCacheAsyncClientBuilder#withClientConfiguration(ClientConfiguration)} */ @Deprecated public AmazonElastiCacheAsyncClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration) { this(awsCredentialsProvider, clientConfiguration, newFixedThreadPool(clientConfiguration.getMaxConnections())); } /** * Constructs a new asynchronous client to invoke service methods on Amazon ElastiCache 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 AmazonElastiCacheAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} and * {@link AmazonElastiCacheAsyncClientBuilder#withExecutorFactory(com.amazonaws.client.builder.ExecutorFactory)} */ @Deprecated public AmazonElastiCacheAsyncClient(AWSCredentialsProvider awsCredentialsProvider, ExecutorService executorService) { this(awsCredentialsProvider, configFactory.getConfig(), executorService); } /** * Constructs a new asynchronous client to invoke service methods on Amazon ElastiCache 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 AmazonElastiCacheAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} and * {@link AmazonElastiCacheAsyncClientBuilder#withClientConfiguration(ClientConfiguration)} and * {@link AmazonElastiCacheAsyncClientBuilder#withExecutorFactory(com.amazonaws.client.builder.ExecutorFactory)} */ @Deprecated public AmazonElastiCacheAsyncClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration, ExecutorService executorService) { super(awsCredentialsProvider, clientConfiguration); this.executorService = executorService; } public static AmazonElastiCacheAsyncClientBuilder asyncBuilder() { return AmazonElastiCacheAsyncClientBuilder.standard(); } /** * Constructs a new asynchronous client to invoke service methods on Amazon ElastiCache using the specified * parameters. * * @param asyncClientParams * Object providing client parameters. */ AmazonElastiCacheAsyncClient(AwsAsyncClientParams asyncClientParams) { this(asyncClientParams, false); } /** * Constructs a new asynchronous client to invoke service methods on Amazon ElastiCache using the specified * parameters. * * @param asyncClientParams * Object providing client parameters. * @param endpointDiscoveryEnabled * true will enable endpoint discovery if the service supports it. */ AmazonElastiCacheAsyncClient(AwsAsyncClientParams asyncClientParams, boolean endpointDiscoveryEnabled) { super(asyncClientParams, endpointDiscoveryEnabled); this.executorService = asyncClientParams.getExecutor(); } /** * Returns the executor service used by this client to execute async requests. * * @return The executor service used by this client to execute async requests. */ public ExecutorService getExecutorService() { return executorService; } @Override public java.util.concurrent.Future addTagsToResourceAsync(AddTagsToResourceRequest request) { return addTagsToResourceAsync(request, null); } @Override public java.util.concurrent.Future addTagsToResourceAsync(final AddTagsToResourceRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final AddTagsToResourceRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public AddTagsToResourceResult call() throws Exception { AddTagsToResourceResult result = null; try { result = executeAddTagsToResource(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 authorizeCacheSecurityGroupIngressAsync(AuthorizeCacheSecurityGroupIngressRequest request) { return authorizeCacheSecurityGroupIngressAsync(request, null); } @Override public java.util.concurrent.Future authorizeCacheSecurityGroupIngressAsync(final AuthorizeCacheSecurityGroupIngressRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final AuthorizeCacheSecurityGroupIngressRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CacheSecurityGroup call() throws Exception { CacheSecurityGroup result = null; try { result = executeAuthorizeCacheSecurityGroupIngress(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 batchApplyUpdateActionAsync(BatchApplyUpdateActionRequest request) { return batchApplyUpdateActionAsync(request, null); } @Override public java.util.concurrent.Future batchApplyUpdateActionAsync(final BatchApplyUpdateActionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final BatchApplyUpdateActionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public BatchApplyUpdateActionResult call() throws Exception { BatchApplyUpdateActionResult result = null; try { result = executeBatchApplyUpdateAction(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 batchStopUpdateActionAsync(BatchStopUpdateActionRequest request) { return batchStopUpdateActionAsync(request, null); } @Override public java.util.concurrent.Future batchStopUpdateActionAsync(final BatchStopUpdateActionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final BatchStopUpdateActionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public BatchStopUpdateActionResult call() throws Exception { BatchStopUpdateActionResult result = null; try { result = executeBatchStopUpdateAction(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 completeMigrationAsync(CompleteMigrationRequest request) { return completeMigrationAsync(request, null); } @Override public java.util.concurrent.Future completeMigrationAsync(final CompleteMigrationRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CompleteMigrationRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ReplicationGroup call() throws Exception { ReplicationGroup result = null; try { result = executeCompleteMigration(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 copyServerlessCacheSnapshotAsync(CopyServerlessCacheSnapshotRequest request) { return copyServerlessCacheSnapshotAsync(request, null); } @Override public java.util.concurrent.Future copyServerlessCacheSnapshotAsync(final CopyServerlessCacheSnapshotRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CopyServerlessCacheSnapshotRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CopyServerlessCacheSnapshotResult call() throws Exception { CopyServerlessCacheSnapshotResult result = null; try { result = executeCopyServerlessCacheSnapshot(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 copySnapshotAsync(CopySnapshotRequest request) { return copySnapshotAsync(request, null); } @Override public java.util.concurrent.Future copySnapshotAsync(final CopySnapshotRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CopySnapshotRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public Snapshot call() throws Exception { Snapshot result = null; try { result = executeCopySnapshot(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 createCacheClusterAsync(CreateCacheClusterRequest request) { return createCacheClusterAsync(request, null); } @Override public java.util.concurrent.Future createCacheClusterAsync(final CreateCacheClusterRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateCacheClusterRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CacheCluster call() throws Exception { CacheCluster result = null; try { result = executeCreateCacheCluster(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 createCacheParameterGroupAsync(CreateCacheParameterGroupRequest request) { return createCacheParameterGroupAsync(request, null); } @Override public java.util.concurrent.Future createCacheParameterGroupAsync(final CreateCacheParameterGroupRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateCacheParameterGroupRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CacheParameterGroup call() throws Exception { CacheParameterGroup result = null; try { result = executeCreateCacheParameterGroup(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 createCacheSecurityGroupAsync(CreateCacheSecurityGroupRequest request) { return createCacheSecurityGroupAsync(request, null); } @Override public java.util.concurrent.Future createCacheSecurityGroupAsync(final CreateCacheSecurityGroupRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateCacheSecurityGroupRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CacheSecurityGroup call() throws Exception { CacheSecurityGroup result = null; try { result = executeCreateCacheSecurityGroup(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 createCacheSubnetGroupAsync(CreateCacheSubnetGroupRequest request) { return createCacheSubnetGroupAsync(request, null); } @Override public java.util.concurrent.Future createCacheSubnetGroupAsync(final CreateCacheSubnetGroupRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateCacheSubnetGroupRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CacheSubnetGroup call() throws Exception { CacheSubnetGroup result = null; try { result = executeCreateCacheSubnetGroup(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 createGlobalReplicationGroupAsync(CreateGlobalReplicationGroupRequest request) { return createGlobalReplicationGroupAsync(request, null); } @Override public java.util.concurrent.Future createGlobalReplicationGroupAsync(final CreateGlobalReplicationGroupRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateGlobalReplicationGroupRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GlobalReplicationGroup call() throws Exception { GlobalReplicationGroup result = null; try { result = executeCreateGlobalReplicationGroup(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 createReplicationGroupAsync(CreateReplicationGroupRequest request) { return createReplicationGroupAsync(request, null); } @Override public java.util.concurrent.Future createReplicationGroupAsync(final CreateReplicationGroupRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateReplicationGroupRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ReplicationGroup call() throws Exception { ReplicationGroup result = null; try { result = executeCreateReplicationGroup(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 createServerlessCacheAsync(CreateServerlessCacheRequest request) { return createServerlessCacheAsync(request, null); } @Override public java.util.concurrent.Future createServerlessCacheAsync(final CreateServerlessCacheRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateServerlessCacheRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateServerlessCacheResult call() throws Exception { CreateServerlessCacheResult result = null; try { result = executeCreateServerlessCache(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 createServerlessCacheSnapshotAsync(CreateServerlessCacheSnapshotRequest request) { return createServerlessCacheSnapshotAsync(request, null); } @Override public java.util.concurrent.Future createServerlessCacheSnapshotAsync( final CreateServerlessCacheSnapshotRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateServerlessCacheSnapshotRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateServerlessCacheSnapshotResult call() throws Exception { CreateServerlessCacheSnapshotResult result = null; try { result = executeCreateServerlessCacheSnapshot(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 createSnapshotAsync(CreateSnapshotRequest request) { return createSnapshotAsync(request, null); } @Override public java.util.concurrent.Future createSnapshotAsync(final CreateSnapshotRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateSnapshotRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public Snapshot call() throws Exception { Snapshot result = null; try { result = executeCreateSnapshot(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 createUserAsync(CreateUserRequest request) { return createUserAsync(request, null); } @Override public java.util.concurrent.Future createUserAsync(final CreateUserRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateUserRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateUserResult call() throws Exception { CreateUserResult result = null; try { result = executeCreateUser(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 createUserGroupAsync(CreateUserGroupRequest request) { return createUserGroupAsync(request, null); } @Override public java.util.concurrent.Future createUserGroupAsync(final CreateUserGroupRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateUserGroupRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateUserGroupResult call() throws Exception { CreateUserGroupResult result = null; try { result = executeCreateUserGroup(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 decreaseNodeGroupsInGlobalReplicationGroupAsync( DecreaseNodeGroupsInGlobalReplicationGroupRequest request) { return decreaseNodeGroupsInGlobalReplicationGroupAsync(request, null); } @Override public java.util.concurrent.Future decreaseNodeGroupsInGlobalReplicationGroupAsync( final DecreaseNodeGroupsInGlobalReplicationGroupRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DecreaseNodeGroupsInGlobalReplicationGroupRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GlobalReplicationGroup call() throws Exception { GlobalReplicationGroup result = null; try { result = executeDecreaseNodeGroupsInGlobalReplicationGroup(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 decreaseReplicaCountAsync(DecreaseReplicaCountRequest request) { return decreaseReplicaCountAsync(request, null); } @Override public java.util.concurrent.Future decreaseReplicaCountAsync(final DecreaseReplicaCountRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DecreaseReplicaCountRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ReplicationGroup call() throws Exception { ReplicationGroup result = null; try { result = executeDecreaseReplicaCount(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 deleteCacheClusterAsync(DeleteCacheClusterRequest request) { return deleteCacheClusterAsync(request, null); } @Override public java.util.concurrent.Future deleteCacheClusterAsync(final DeleteCacheClusterRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteCacheClusterRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CacheCluster call() throws Exception { CacheCluster result = null; try { result = executeDeleteCacheCluster(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 deleteCacheParameterGroupAsync(DeleteCacheParameterGroupRequest request) { return deleteCacheParameterGroupAsync(request, null); } @Override public java.util.concurrent.Future deleteCacheParameterGroupAsync(final DeleteCacheParameterGroupRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteCacheParameterGroupRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteCacheParameterGroupResult call() throws Exception { DeleteCacheParameterGroupResult result = null; try { result = executeDeleteCacheParameterGroup(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 deleteCacheSecurityGroupAsync(DeleteCacheSecurityGroupRequest request) { return deleteCacheSecurityGroupAsync(request, null); } @Override public java.util.concurrent.Future deleteCacheSecurityGroupAsync(final DeleteCacheSecurityGroupRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteCacheSecurityGroupRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteCacheSecurityGroupResult call() throws Exception { DeleteCacheSecurityGroupResult result = null; try { result = executeDeleteCacheSecurityGroup(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 deleteCacheSubnetGroupAsync(DeleteCacheSubnetGroupRequest request) { return deleteCacheSubnetGroupAsync(request, null); } @Override public java.util.concurrent.Future deleteCacheSubnetGroupAsync(final DeleteCacheSubnetGroupRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteCacheSubnetGroupRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteCacheSubnetGroupResult call() throws Exception { DeleteCacheSubnetGroupResult result = null; try { result = executeDeleteCacheSubnetGroup(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 deleteGlobalReplicationGroupAsync(DeleteGlobalReplicationGroupRequest request) { return deleteGlobalReplicationGroupAsync(request, null); } @Override public java.util.concurrent.Future deleteGlobalReplicationGroupAsync(final DeleteGlobalReplicationGroupRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteGlobalReplicationGroupRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GlobalReplicationGroup call() throws Exception { GlobalReplicationGroup result = null; try { result = executeDeleteGlobalReplicationGroup(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 deleteReplicationGroupAsync(DeleteReplicationGroupRequest request) { return deleteReplicationGroupAsync(request, null); } @Override public java.util.concurrent.Future deleteReplicationGroupAsync(final DeleteReplicationGroupRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteReplicationGroupRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ReplicationGroup call() throws Exception { ReplicationGroup result = null; try { result = executeDeleteReplicationGroup(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 deleteServerlessCacheAsync(DeleteServerlessCacheRequest request) { return deleteServerlessCacheAsync(request, null); } @Override public java.util.concurrent.Future deleteServerlessCacheAsync(final DeleteServerlessCacheRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteServerlessCacheRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteServerlessCacheResult call() throws Exception { DeleteServerlessCacheResult result = null; try { result = executeDeleteServerlessCache(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 deleteServerlessCacheSnapshotAsync(DeleteServerlessCacheSnapshotRequest request) { return deleteServerlessCacheSnapshotAsync(request, null); } @Override public java.util.concurrent.Future deleteServerlessCacheSnapshotAsync( final DeleteServerlessCacheSnapshotRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteServerlessCacheSnapshotRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteServerlessCacheSnapshotResult call() throws Exception { DeleteServerlessCacheSnapshotResult result = null; try { result = executeDeleteServerlessCacheSnapshot(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 deleteSnapshotAsync(DeleteSnapshotRequest request) { return deleteSnapshotAsync(request, null); } @Override public java.util.concurrent.Future deleteSnapshotAsync(final DeleteSnapshotRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteSnapshotRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public Snapshot call() throws Exception { Snapshot result = null; try { result = executeDeleteSnapshot(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 deleteUserAsync(DeleteUserRequest request) { return deleteUserAsync(request, null); } @Override public java.util.concurrent.Future deleteUserAsync(final DeleteUserRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteUserRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteUserResult call() throws Exception { DeleteUserResult result = null; try { result = executeDeleteUser(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 deleteUserGroupAsync(DeleteUserGroupRequest request) { return deleteUserGroupAsync(request, null); } @Override public java.util.concurrent.Future deleteUserGroupAsync(final DeleteUserGroupRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteUserGroupRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteUserGroupResult call() throws Exception { DeleteUserGroupResult result = null; try { result = executeDeleteUserGroup(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 describeCacheClustersAsync(DescribeCacheClustersRequest request) { return describeCacheClustersAsync(request, null); } @Override public java.util.concurrent.Future describeCacheClustersAsync(final DescribeCacheClustersRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeCacheClustersRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeCacheClustersResult call() throws Exception { DescribeCacheClustersResult result = null; try { result = executeDescribeCacheClusters(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 DescribeCacheClusters operation. * * @see #describeCacheClustersAsync(DescribeCacheClustersRequest) */ @Override public java.util.concurrent.Future describeCacheClustersAsync() { return describeCacheClustersAsync(new DescribeCacheClustersRequest()); } /** * Simplified method form for invoking the DescribeCacheClusters operation with an AsyncHandler. * * @see #describeCacheClustersAsync(DescribeCacheClustersRequest, com.amazonaws.handlers.AsyncHandler) */ @Override public java.util.concurrent.Future describeCacheClustersAsync( com.amazonaws.handlers.AsyncHandler asyncHandler) { return describeCacheClustersAsync(new DescribeCacheClustersRequest(), asyncHandler); } @Override public java.util.concurrent.Future describeCacheEngineVersionsAsync(DescribeCacheEngineVersionsRequest request) { return describeCacheEngineVersionsAsync(request, null); } @Override public java.util.concurrent.Future describeCacheEngineVersionsAsync(final DescribeCacheEngineVersionsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeCacheEngineVersionsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeCacheEngineVersionsResult call() throws Exception { DescribeCacheEngineVersionsResult result = null; try { result = executeDescribeCacheEngineVersions(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 DescribeCacheEngineVersions operation. * * @see #describeCacheEngineVersionsAsync(DescribeCacheEngineVersionsRequest) */ @Override public java.util.concurrent.Future describeCacheEngineVersionsAsync() { return describeCacheEngineVersionsAsync(new DescribeCacheEngineVersionsRequest()); } /** * Simplified method form for invoking the DescribeCacheEngineVersions operation with an AsyncHandler. * * @see #describeCacheEngineVersionsAsync(DescribeCacheEngineVersionsRequest, com.amazonaws.handlers.AsyncHandler) */ @Override public java.util.concurrent.Future describeCacheEngineVersionsAsync( com.amazonaws.handlers.AsyncHandler asyncHandler) { return describeCacheEngineVersionsAsync(new DescribeCacheEngineVersionsRequest(), asyncHandler); } @Override public java.util.concurrent.Future describeCacheParameterGroupsAsync(DescribeCacheParameterGroupsRequest request) { return describeCacheParameterGroupsAsync(request, null); } @Override public java.util.concurrent.Future describeCacheParameterGroupsAsync(final DescribeCacheParameterGroupsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeCacheParameterGroupsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeCacheParameterGroupsResult call() throws Exception { DescribeCacheParameterGroupsResult result = null; try { result = executeDescribeCacheParameterGroups(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 DescribeCacheParameterGroups operation. * * @see #describeCacheParameterGroupsAsync(DescribeCacheParameterGroupsRequest) */ @Override public java.util.concurrent.Future describeCacheParameterGroupsAsync() { return describeCacheParameterGroupsAsync(new DescribeCacheParameterGroupsRequest()); } /** * Simplified method form for invoking the DescribeCacheParameterGroups operation with an AsyncHandler. * * @see #describeCacheParameterGroupsAsync(DescribeCacheParameterGroupsRequest, com.amazonaws.handlers.AsyncHandler) */ @Override public java.util.concurrent.Future describeCacheParameterGroupsAsync( com.amazonaws.handlers.AsyncHandler asyncHandler) { return describeCacheParameterGroupsAsync(new DescribeCacheParameterGroupsRequest(), asyncHandler); } @Override public java.util.concurrent.Future describeCacheParametersAsync(DescribeCacheParametersRequest request) { return describeCacheParametersAsync(request, null); } @Override public java.util.concurrent.Future describeCacheParametersAsync(final DescribeCacheParametersRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeCacheParametersRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeCacheParametersResult call() throws Exception { DescribeCacheParametersResult result = null; try { result = executeDescribeCacheParameters(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 describeCacheSecurityGroupsAsync(DescribeCacheSecurityGroupsRequest request) { return describeCacheSecurityGroupsAsync(request, null); } @Override public java.util.concurrent.Future describeCacheSecurityGroupsAsync(final DescribeCacheSecurityGroupsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeCacheSecurityGroupsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeCacheSecurityGroupsResult call() throws Exception { DescribeCacheSecurityGroupsResult result = null; try { result = executeDescribeCacheSecurityGroups(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 DescribeCacheSecurityGroups operation. * * @see #describeCacheSecurityGroupsAsync(DescribeCacheSecurityGroupsRequest) */ @Override public java.util.concurrent.Future describeCacheSecurityGroupsAsync() { return describeCacheSecurityGroupsAsync(new DescribeCacheSecurityGroupsRequest()); } /** * Simplified method form for invoking the DescribeCacheSecurityGroups operation with an AsyncHandler. * * @see #describeCacheSecurityGroupsAsync(DescribeCacheSecurityGroupsRequest, com.amazonaws.handlers.AsyncHandler) */ @Override public java.util.concurrent.Future describeCacheSecurityGroupsAsync( com.amazonaws.handlers.AsyncHandler asyncHandler) { return describeCacheSecurityGroupsAsync(new DescribeCacheSecurityGroupsRequest(), asyncHandler); } @Override public java.util.concurrent.Future describeCacheSubnetGroupsAsync(DescribeCacheSubnetGroupsRequest request) { return describeCacheSubnetGroupsAsync(request, null); } @Override public java.util.concurrent.Future describeCacheSubnetGroupsAsync(final DescribeCacheSubnetGroupsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeCacheSubnetGroupsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeCacheSubnetGroupsResult call() throws Exception { DescribeCacheSubnetGroupsResult result = null; try { result = executeDescribeCacheSubnetGroups(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 DescribeCacheSubnetGroups operation. * * @see #describeCacheSubnetGroupsAsync(DescribeCacheSubnetGroupsRequest) */ @Override public java.util.concurrent.Future describeCacheSubnetGroupsAsync() { return describeCacheSubnetGroupsAsync(new DescribeCacheSubnetGroupsRequest()); } /** * Simplified method form for invoking the DescribeCacheSubnetGroups operation with an AsyncHandler. * * @see #describeCacheSubnetGroupsAsync(DescribeCacheSubnetGroupsRequest, com.amazonaws.handlers.AsyncHandler) */ @Override public java.util.concurrent.Future describeCacheSubnetGroupsAsync( com.amazonaws.handlers.AsyncHandler asyncHandler) { return describeCacheSubnetGroupsAsync(new DescribeCacheSubnetGroupsRequest(), asyncHandler); } @Override public java.util.concurrent.Future describeEngineDefaultParametersAsync(DescribeEngineDefaultParametersRequest request) { return describeEngineDefaultParametersAsync(request, null); } @Override public java.util.concurrent.Future describeEngineDefaultParametersAsync(final DescribeEngineDefaultParametersRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeEngineDefaultParametersRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public EngineDefaults call() throws Exception { EngineDefaults result = null; try { result = executeDescribeEngineDefaultParameters(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 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 describeGlobalReplicationGroupsAsync( DescribeGlobalReplicationGroupsRequest request) { return describeGlobalReplicationGroupsAsync(request, null); } @Override public java.util.concurrent.Future describeGlobalReplicationGroupsAsync( final DescribeGlobalReplicationGroupsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeGlobalReplicationGroupsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeGlobalReplicationGroupsResult call() throws Exception { DescribeGlobalReplicationGroupsResult result = null; try { result = executeDescribeGlobalReplicationGroups(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 describeReplicationGroupsAsync(DescribeReplicationGroupsRequest request) { return describeReplicationGroupsAsync(request, null); } @Override public java.util.concurrent.Future describeReplicationGroupsAsync(final DescribeReplicationGroupsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeReplicationGroupsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeReplicationGroupsResult call() throws Exception { DescribeReplicationGroupsResult result = null; try { result = executeDescribeReplicationGroups(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 DescribeReplicationGroups operation. * * @see #describeReplicationGroupsAsync(DescribeReplicationGroupsRequest) */ @Override public java.util.concurrent.Future describeReplicationGroupsAsync() { return describeReplicationGroupsAsync(new DescribeReplicationGroupsRequest()); } /** * Simplified method form for invoking the DescribeReplicationGroups operation with an AsyncHandler. * * @see #describeReplicationGroupsAsync(DescribeReplicationGroupsRequest, com.amazonaws.handlers.AsyncHandler) */ @Override public java.util.concurrent.Future describeReplicationGroupsAsync( com.amazonaws.handlers.AsyncHandler asyncHandler) { return describeReplicationGroupsAsync(new DescribeReplicationGroupsRequest(), asyncHandler); } @Override public java.util.concurrent.Future describeReservedCacheNodesAsync(DescribeReservedCacheNodesRequest request) { return describeReservedCacheNodesAsync(request, null); } @Override public java.util.concurrent.Future describeReservedCacheNodesAsync(final DescribeReservedCacheNodesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeReservedCacheNodesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeReservedCacheNodesResult call() throws Exception { DescribeReservedCacheNodesResult result = null; try { result = executeDescribeReservedCacheNodes(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 DescribeReservedCacheNodes operation. * * @see #describeReservedCacheNodesAsync(DescribeReservedCacheNodesRequest) */ @Override public java.util.concurrent.Future describeReservedCacheNodesAsync() { return describeReservedCacheNodesAsync(new DescribeReservedCacheNodesRequest()); } /** * Simplified method form for invoking the DescribeReservedCacheNodes operation with an AsyncHandler. * * @see #describeReservedCacheNodesAsync(DescribeReservedCacheNodesRequest, com.amazonaws.handlers.AsyncHandler) */ @Override public java.util.concurrent.Future describeReservedCacheNodesAsync( com.amazonaws.handlers.AsyncHandler asyncHandler) { return describeReservedCacheNodesAsync(new DescribeReservedCacheNodesRequest(), asyncHandler); } @Override public java.util.concurrent.Future describeReservedCacheNodesOfferingsAsync( DescribeReservedCacheNodesOfferingsRequest request) { return describeReservedCacheNodesOfferingsAsync(request, null); } @Override public java.util.concurrent.Future describeReservedCacheNodesOfferingsAsync( final DescribeReservedCacheNodesOfferingsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeReservedCacheNodesOfferingsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeReservedCacheNodesOfferingsResult call() throws Exception { DescribeReservedCacheNodesOfferingsResult result = null; try { result = executeDescribeReservedCacheNodesOfferings(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 DescribeReservedCacheNodesOfferings operation. * * @see #describeReservedCacheNodesOfferingsAsync(DescribeReservedCacheNodesOfferingsRequest) */ @Override public java.util.concurrent.Future describeReservedCacheNodesOfferingsAsync() { return describeReservedCacheNodesOfferingsAsync(new DescribeReservedCacheNodesOfferingsRequest()); } /** * Simplified method form for invoking the DescribeReservedCacheNodesOfferings operation with an AsyncHandler. * * @see #describeReservedCacheNodesOfferingsAsync(DescribeReservedCacheNodesOfferingsRequest, * com.amazonaws.handlers.AsyncHandler) */ @Override public java.util.concurrent.Future describeReservedCacheNodesOfferingsAsync( com.amazonaws.handlers.AsyncHandler asyncHandler) { return describeReservedCacheNodesOfferingsAsync(new DescribeReservedCacheNodesOfferingsRequest(), asyncHandler); } @Override public java.util.concurrent.Future describeServerlessCacheSnapshotsAsync( DescribeServerlessCacheSnapshotsRequest request) { return describeServerlessCacheSnapshotsAsync(request, null); } @Override public java.util.concurrent.Future describeServerlessCacheSnapshotsAsync( final DescribeServerlessCacheSnapshotsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeServerlessCacheSnapshotsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeServerlessCacheSnapshotsResult call() throws Exception { DescribeServerlessCacheSnapshotsResult result = null; try { result = executeDescribeServerlessCacheSnapshots(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 describeServerlessCachesAsync(DescribeServerlessCachesRequest request) { return describeServerlessCachesAsync(request, null); } @Override public java.util.concurrent.Future describeServerlessCachesAsync(final DescribeServerlessCachesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeServerlessCachesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeServerlessCachesResult call() throws Exception { DescribeServerlessCachesResult result = null; try { result = executeDescribeServerlessCaches(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 describeServiceUpdatesAsync(DescribeServiceUpdatesRequest request) { return describeServiceUpdatesAsync(request, null); } @Override public java.util.concurrent.Future describeServiceUpdatesAsync(final DescribeServiceUpdatesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeServiceUpdatesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeServiceUpdatesResult call() throws Exception { DescribeServiceUpdatesResult result = null; try { result = executeDescribeServiceUpdates(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 describeSnapshotsAsync(DescribeSnapshotsRequest request) { return describeSnapshotsAsync(request, null); } @Override public java.util.concurrent.Future describeSnapshotsAsync(final DescribeSnapshotsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeSnapshotsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeSnapshotsResult call() throws Exception { DescribeSnapshotsResult result = null; try { result = executeDescribeSnapshots(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 DescribeSnapshots operation. * * @see #describeSnapshotsAsync(DescribeSnapshotsRequest) */ @Override public java.util.concurrent.Future describeSnapshotsAsync() { return describeSnapshotsAsync(new DescribeSnapshotsRequest()); } /** * Simplified method form for invoking the DescribeSnapshots operation with an AsyncHandler. * * @see #describeSnapshotsAsync(DescribeSnapshotsRequest, com.amazonaws.handlers.AsyncHandler) */ @Override public java.util.concurrent.Future describeSnapshotsAsync( com.amazonaws.handlers.AsyncHandler asyncHandler) { return describeSnapshotsAsync(new DescribeSnapshotsRequest(), asyncHandler); } @Override public java.util.concurrent.Future describeUpdateActionsAsync(DescribeUpdateActionsRequest request) { return describeUpdateActionsAsync(request, null); } @Override public java.util.concurrent.Future describeUpdateActionsAsync(final DescribeUpdateActionsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeUpdateActionsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeUpdateActionsResult call() throws Exception { DescribeUpdateActionsResult result = null; try { result = executeDescribeUpdateActions(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 describeUserGroupsAsync(DescribeUserGroupsRequest request) { return describeUserGroupsAsync(request, null); } @Override public java.util.concurrent.Future describeUserGroupsAsync(final DescribeUserGroupsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeUserGroupsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeUserGroupsResult call() throws Exception { DescribeUserGroupsResult result = null; try { result = executeDescribeUserGroups(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 describeUsersAsync(DescribeUsersRequest request) { return describeUsersAsync(request, null); } @Override public java.util.concurrent.Future describeUsersAsync(final DescribeUsersRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeUsersRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeUsersResult call() throws Exception { DescribeUsersResult result = null; try { result = executeDescribeUsers(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 disassociateGlobalReplicationGroupAsync(DisassociateGlobalReplicationGroupRequest request) { return disassociateGlobalReplicationGroupAsync(request, null); } @Override public java.util.concurrent.Future disassociateGlobalReplicationGroupAsync(final DisassociateGlobalReplicationGroupRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DisassociateGlobalReplicationGroupRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GlobalReplicationGroup call() throws Exception { GlobalReplicationGroup result = null; try { result = executeDisassociateGlobalReplicationGroup(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 exportServerlessCacheSnapshotAsync(ExportServerlessCacheSnapshotRequest request) { return exportServerlessCacheSnapshotAsync(request, null); } @Override public java.util.concurrent.Future exportServerlessCacheSnapshotAsync( final ExportServerlessCacheSnapshotRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ExportServerlessCacheSnapshotRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ExportServerlessCacheSnapshotResult call() throws Exception { ExportServerlessCacheSnapshotResult result = null; try { result = executeExportServerlessCacheSnapshot(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 failoverGlobalReplicationGroupAsync(FailoverGlobalReplicationGroupRequest request) { return failoverGlobalReplicationGroupAsync(request, null); } @Override public java.util.concurrent.Future failoverGlobalReplicationGroupAsync(final FailoverGlobalReplicationGroupRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final FailoverGlobalReplicationGroupRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GlobalReplicationGroup call() throws Exception { GlobalReplicationGroup result = null; try { result = executeFailoverGlobalReplicationGroup(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 increaseNodeGroupsInGlobalReplicationGroupAsync( IncreaseNodeGroupsInGlobalReplicationGroupRequest request) { return increaseNodeGroupsInGlobalReplicationGroupAsync(request, null); } @Override public java.util.concurrent.Future increaseNodeGroupsInGlobalReplicationGroupAsync( final IncreaseNodeGroupsInGlobalReplicationGroupRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final IncreaseNodeGroupsInGlobalReplicationGroupRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GlobalReplicationGroup call() throws Exception { GlobalReplicationGroup result = null; try { result = executeIncreaseNodeGroupsInGlobalReplicationGroup(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 increaseReplicaCountAsync(IncreaseReplicaCountRequest request) { return increaseReplicaCountAsync(request, null); } @Override public java.util.concurrent.Future increaseReplicaCountAsync(final IncreaseReplicaCountRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final IncreaseReplicaCountRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ReplicationGroup call() throws Exception { ReplicationGroup result = null; try { result = executeIncreaseReplicaCount(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 listAllowedNodeTypeModificationsAsync( ListAllowedNodeTypeModificationsRequest request) { return listAllowedNodeTypeModificationsAsync(request, null); } @Override public java.util.concurrent.Future listAllowedNodeTypeModificationsAsync( final ListAllowedNodeTypeModificationsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListAllowedNodeTypeModificationsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListAllowedNodeTypeModificationsResult call() throws Exception { ListAllowedNodeTypeModificationsResult result = null; try { result = executeListAllowedNodeTypeModifications(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 ListAllowedNodeTypeModifications operation. * * @see #listAllowedNodeTypeModificationsAsync(ListAllowedNodeTypeModificationsRequest) */ @Override public java.util.concurrent.Future listAllowedNodeTypeModificationsAsync() { return listAllowedNodeTypeModificationsAsync(new ListAllowedNodeTypeModificationsRequest()); } /** * Simplified method form for invoking the ListAllowedNodeTypeModifications operation with an AsyncHandler. * * @see #listAllowedNodeTypeModificationsAsync(ListAllowedNodeTypeModificationsRequest, * com.amazonaws.handlers.AsyncHandler) */ @Override public java.util.concurrent.Future listAllowedNodeTypeModificationsAsync( com.amazonaws.handlers.AsyncHandler asyncHandler) { return listAllowedNodeTypeModificationsAsync(new ListAllowedNodeTypeModificationsRequest(), asyncHandler); } @Override public java.util.concurrent.Future listTagsForResourceAsync(ListTagsForResourceRequest request) { return listTagsForResourceAsync(request, null); } @Override public java.util.concurrent.Future listTagsForResourceAsync(final ListTagsForResourceRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListTagsForResourceRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListTagsForResourceResult call() throws Exception { ListTagsForResourceResult result = null; try { result = executeListTagsForResource(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 modifyCacheClusterAsync(ModifyCacheClusterRequest request) { return modifyCacheClusterAsync(request, null); } @Override public java.util.concurrent.Future modifyCacheClusterAsync(final ModifyCacheClusterRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ModifyCacheClusterRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CacheCluster call() throws Exception { CacheCluster result = null; try { result = executeModifyCacheCluster(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 modifyCacheParameterGroupAsync(ModifyCacheParameterGroupRequest request) { return modifyCacheParameterGroupAsync(request, null); } @Override public java.util.concurrent.Future modifyCacheParameterGroupAsync(final ModifyCacheParameterGroupRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ModifyCacheParameterGroupRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ModifyCacheParameterGroupResult call() throws Exception { ModifyCacheParameterGroupResult result = null; try { result = executeModifyCacheParameterGroup(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 modifyCacheSubnetGroupAsync(ModifyCacheSubnetGroupRequest request) { return modifyCacheSubnetGroupAsync(request, null); } @Override public java.util.concurrent.Future modifyCacheSubnetGroupAsync(final ModifyCacheSubnetGroupRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ModifyCacheSubnetGroupRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CacheSubnetGroup call() throws Exception { CacheSubnetGroup result = null; try { result = executeModifyCacheSubnetGroup(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 modifyGlobalReplicationGroupAsync(ModifyGlobalReplicationGroupRequest request) { return modifyGlobalReplicationGroupAsync(request, null); } @Override public java.util.concurrent.Future modifyGlobalReplicationGroupAsync(final ModifyGlobalReplicationGroupRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ModifyGlobalReplicationGroupRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GlobalReplicationGroup call() throws Exception { GlobalReplicationGroup result = null; try { result = executeModifyGlobalReplicationGroup(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 modifyReplicationGroupAsync(ModifyReplicationGroupRequest request) { return modifyReplicationGroupAsync(request, null); } @Override public java.util.concurrent.Future modifyReplicationGroupAsync(final ModifyReplicationGroupRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ModifyReplicationGroupRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ReplicationGroup call() throws Exception { ReplicationGroup result = null; try { result = executeModifyReplicationGroup(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 modifyReplicationGroupShardConfigurationAsync(ModifyReplicationGroupShardConfigurationRequest request) { return modifyReplicationGroupShardConfigurationAsync(request, null); } @Override public java.util.concurrent.Future modifyReplicationGroupShardConfigurationAsync( final ModifyReplicationGroupShardConfigurationRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ModifyReplicationGroupShardConfigurationRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ReplicationGroup call() throws Exception { ReplicationGroup result = null; try { result = executeModifyReplicationGroupShardConfiguration(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 modifyServerlessCacheAsync(ModifyServerlessCacheRequest request) { return modifyServerlessCacheAsync(request, null); } @Override public java.util.concurrent.Future modifyServerlessCacheAsync(final ModifyServerlessCacheRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ModifyServerlessCacheRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ModifyServerlessCacheResult call() throws Exception { ModifyServerlessCacheResult result = null; try { result = executeModifyServerlessCache(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 modifyUserAsync(ModifyUserRequest request) { return modifyUserAsync(request, null); } @Override public java.util.concurrent.Future modifyUserAsync(final ModifyUserRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ModifyUserRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ModifyUserResult call() throws Exception { ModifyUserResult result = null; try { result = executeModifyUser(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 modifyUserGroupAsync(ModifyUserGroupRequest request) { return modifyUserGroupAsync(request, null); } @Override public java.util.concurrent.Future modifyUserGroupAsync(final ModifyUserGroupRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ModifyUserGroupRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ModifyUserGroupResult call() throws Exception { ModifyUserGroupResult result = null; try { result = executeModifyUserGroup(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 purchaseReservedCacheNodesOfferingAsync(PurchaseReservedCacheNodesOfferingRequest request) { return purchaseReservedCacheNodesOfferingAsync(request, null); } @Override public java.util.concurrent.Future purchaseReservedCacheNodesOfferingAsync(final PurchaseReservedCacheNodesOfferingRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final PurchaseReservedCacheNodesOfferingRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ReservedCacheNode call() throws Exception { ReservedCacheNode result = null; try { result = executePurchaseReservedCacheNodesOffering(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 rebalanceSlotsInGlobalReplicationGroupAsync(RebalanceSlotsInGlobalReplicationGroupRequest request) { return rebalanceSlotsInGlobalReplicationGroupAsync(request, null); } @Override public java.util.concurrent.Future rebalanceSlotsInGlobalReplicationGroupAsync( final RebalanceSlotsInGlobalReplicationGroupRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final RebalanceSlotsInGlobalReplicationGroupRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GlobalReplicationGroup call() throws Exception { GlobalReplicationGroup result = null; try { result = executeRebalanceSlotsInGlobalReplicationGroup(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 rebootCacheClusterAsync(RebootCacheClusterRequest request) { return rebootCacheClusterAsync(request, null); } @Override public java.util.concurrent.Future rebootCacheClusterAsync(final RebootCacheClusterRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final RebootCacheClusterRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CacheCluster call() throws Exception { CacheCluster result = null; try { result = executeRebootCacheCluster(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 removeTagsFromResourceAsync(RemoveTagsFromResourceRequest request) { return removeTagsFromResourceAsync(request, null); } @Override public java.util.concurrent.Future removeTagsFromResourceAsync(final RemoveTagsFromResourceRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final RemoveTagsFromResourceRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public RemoveTagsFromResourceResult call() throws Exception { RemoveTagsFromResourceResult result = null; try { result = executeRemoveTagsFromResource(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 resetCacheParameterGroupAsync(ResetCacheParameterGroupRequest request) { return resetCacheParameterGroupAsync(request, null); } @Override public java.util.concurrent.Future resetCacheParameterGroupAsync(final ResetCacheParameterGroupRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ResetCacheParameterGroupRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ResetCacheParameterGroupResult call() throws Exception { ResetCacheParameterGroupResult result = null; try { result = executeResetCacheParameterGroup(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 revokeCacheSecurityGroupIngressAsync(RevokeCacheSecurityGroupIngressRequest request) { return revokeCacheSecurityGroupIngressAsync(request, null); } @Override public java.util.concurrent.Future revokeCacheSecurityGroupIngressAsync(final RevokeCacheSecurityGroupIngressRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final RevokeCacheSecurityGroupIngressRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CacheSecurityGroup call() throws Exception { CacheSecurityGroup result = null; try { result = executeRevokeCacheSecurityGroupIngress(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 startMigrationAsync(StartMigrationRequest request) { return startMigrationAsync(request, null); } @Override public java.util.concurrent.Future startMigrationAsync(final StartMigrationRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final StartMigrationRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ReplicationGroup call() throws Exception { ReplicationGroup result = null; try { result = executeStartMigration(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 testFailoverAsync(TestFailoverRequest request) { return testFailoverAsync(request, null); } @Override public java.util.concurrent.Future testFailoverAsync(final TestFailoverRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final TestFailoverRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ReplicationGroup call() throws Exception { ReplicationGroup result = null; try { result = executeTestFailover(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 testMigrationAsync(TestMigrationRequest request) { return testMigrationAsync(request, null); } @Override public java.util.concurrent.Future testMigrationAsync(final TestMigrationRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final TestMigrationRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ReplicationGroup call() throws Exception { ReplicationGroup result = null; try { result = executeTestMigration(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