com.amazonaws.services.route53recoveryreadiness.AWSRoute53RecoveryReadinessAsyncClient Maven / Gradle / Ivy
/*
* 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.route53recoveryreadiness;
import javax.annotation.Generated;
import com.amazonaws.services.route53recoveryreadiness.model.*;
import com.amazonaws.client.AwsAsyncClientParams;
import com.amazonaws.annotation.ThreadSafe;
import java.util.concurrent.ExecutorService;
/**
* Client for accessing AWS Route53 Recovery Readiness 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.
*
*
* Recovery readiness
*
*/
@ThreadSafe
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class AWSRoute53RecoveryReadinessAsyncClient extends AWSRoute53RecoveryReadinessClient implements AWSRoute53RecoveryReadinessAsync {
private static final int DEFAULT_THREAD_POOL_SIZE = 50;
private final java.util.concurrent.ExecutorService executorService;
public static AWSRoute53RecoveryReadinessAsyncClientBuilder asyncBuilder() {
return AWSRoute53RecoveryReadinessAsyncClientBuilder.standard();
}
/**
* Constructs a new asynchronous client to invoke service methods on AWS Route53 Recovery Readiness using the
* specified parameters.
*
* @param asyncClientParams
* Object providing client parameters.
*/
AWSRoute53RecoveryReadinessAsyncClient(AwsAsyncClientParams asyncClientParams) {
this(asyncClientParams, false);
}
/**
* Constructs a new asynchronous client to invoke service methods on AWS Route53 Recovery Readiness using the
* specified parameters.
*
* @param asyncClientParams
* Object providing client parameters.
* @param endpointDiscoveryEnabled
* true will enable endpoint discovery if the service supports it.
*/
AWSRoute53RecoveryReadinessAsyncClient(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 createCellAsync(CreateCellRequest request) {
return createCellAsync(request, null);
}
@Override
public java.util.concurrent.Future createCellAsync(final CreateCellRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateCellRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateCellResult call() throws Exception {
CreateCellResult result = null;
try {
result = executeCreateCell(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 createCrossAccountAuthorizationAsync(
CreateCrossAccountAuthorizationRequest request) {
return createCrossAccountAuthorizationAsync(request, null);
}
@Override
public java.util.concurrent.Future createCrossAccountAuthorizationAsync(
final CreateCrossAccountAuthorizationRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateCrossAccountAuthorizationRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateCrossAccountAuthorizationResult call() throws Exception {
CreateCrossAccountAuthorizationResult result = null;
try {
result = executeCreateCrossAccountAuthorization(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 createReadinessCheckAsync(CreateReadinessCheckRequest request) {
return createReadinessCheckAsync(request, null);
}
@Override
public java.util.concurrent.Future createReadinessCheckAsync(final CreateReadinessCheckRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateReadinessCheckRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateReadinessCheckResult call() throws Exception {
CreateReadinessCheckResult result = null;
try {
result = executeCreateReadinessCheck(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 createRecoveryGroupAsync(CreateRecoveryGroupRequest request) {
return createRecoveryGroupAsync(request, null);
}
@Override
public java.util.concurrent.Future createRecoveryGroupAsync(final CreateRecoveryGroupRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateRecoveryGroupRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateRecoveryGroupResult call() throws Exception {
CreateRecoveryGroupResult result = null;
try {
result = executeCreateRecoveryGroup(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 createResourceSetAsync(CreateResourceSetRequest request) {
return createResourceSetAsync(request, null);
}
@Override
public java.util.concurrent.Future createResourceSetAsync(final CreateResourceSetRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateResourceSetRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateResourceSetResult call() throws Exception {
CreateResourceSetResult result = null;
try {
result = executeCreateResourceSet(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 deleteCellAsync(DeleteCellRequest request) {
return deleteCellAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteCellAsync(final DeleteCellRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteCellRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteCellResult call() throws Exception {
DeleteCellResult result = null;
try {
result = executeDeleteCell(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 deleteCrossAccountAuthorizationAsync(
DeleteCrossAccountAuthorizationRequest request) {
return deleteCrossAccountAuthorizationAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteCrossAccountAuthorizationAsync(
final DeleteCrossAccountAuthorizationRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteCrossAccountAuthorizationRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteCrossAccountAuthorizationResult call() throws Exception {
DeleteCrossAccountAuthorizationResult result = null;
try {
result = executeDeleteCrossAccountAuthorization(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 deleteReadinessCheckAsync(DeleteReadinessCheckRequest request) {
return deleteReadinessCheckAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteReadinessCheckAsync(final DeleteReadinessCheckRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteReadinessCheckRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteReadinessCheckResult call() throws Exception {
DeleteReadinessCheckResult result = null;
try {
result = executeDeleteReadinessCheck(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 deleteRecoveryGroupAsync(DeleteRecoveryGroupRequest request) {
return deleteRecoveryGroupAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteRecoveryGroupAsync(final DeleteRecoveryGroupRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteRecoveryGroupRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteRecoveryGroupResult call() throws Exception {
DeleteRecoveryGroupResult result = null;
try {
result = executeDeleteRecoveryGroup(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 deleteResourceSetAsync(DeleteResourceSetRequest request) {
return deleteResourceSetAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteResourceSetAsync(final DeleteResourceSetRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteResourceSetRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteResourceSetResult call() throws Exception {
DeleteResourceSetResult result = null;
try {
result = executeDeleteResourceSet(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 getArchitectureRecommendationsAsync(GetArchitectureRecommendationsRequest request) {
return getArchitectureRecommendationsAsync(request, null);
}
@Override
public java.util.concurrent.Future getArchitectureRecommendationsAsync(
final GetArchitectureRecommendationsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetArchitectureRecommendationsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetArchitectureRecommendationsResult call() throws Exception {
GetArchitectureRecommendationsResult result = null;
try {
result = executeGetArchitectureRecommendations(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 getCellAsync(GetCellRequest request) {
return getCellAsync(request, null);
}
@Override
public java.util.concurrent.Future getCellAsync(final GetCellRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetCellRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetCellResult call() throws Exception {
GetCellResult result = null;
try {
result = executeGetCell(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 getCellReadinessSummaryAsync(GetCellReadinessSummaryRequest request) {
return getCellReadinessSummaryAsync(request, null);
}
@Override
public java.util.concurrent.Future getCellReadinessSummaryAsync(final GetCellReadinessSummaryRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetCellReadinessSummaryRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetCellReadinessSummaryResult call() throws Exception {
GetCellReadinessSummaryResult result = null;
try {
result = executeGetCellReadinessSummary(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 getReadinessCheckAsync(GetReadinessCheckRequest request) {
return getReadinessCheckAsync(request, null);
}
@Override
public java.util.concurrent.Future getReadinessCheckAsync(final GetReadinessCheckRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetReadinessCheckRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetReadinessCheckResult call() throws Exception {
GetReadinessCheckResult result = null;
try {
result = executeGetReadinessCheck(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 getReadinessCheckResourceStatusAsync(
GetReadinessCheckResourceStatusRequest request) {
return getReadinessCheckResourceStatusAsync(request, null);
}
@Override
public java.util.concurrent.Future getReadinessCheckResourceStatusAsync(
final GetReadinessCheckResourceStatusRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetReadinessCheckResourceStatusRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetReadinessCheckResourceStatusResult call() throws Exception {
GetReadinessCheckResourceStatusResult result = null;
try {
result = executeGetReadinessCheckResourceStatus(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 getReadinessCheckStatusAsync(GetReadinessCheckStatusRequest request) {
return getReadinessCheckStatusAsync(request, null);
}
@Override
public java.util.concurrent.Future getReadinessCheckStatusAsync(final GetReadinessCheckStatusRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetReadinessCheckStatusRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetReadinessCheckStatusResult call() throws Exception {
GetReadinessCheckStatusResult result = null;
try {
result = executeGetReadinessCheckStatus(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 getRecoveryGroupAsync(GetRecoveryGroupRequest request) {
return getRecoveryGroupAsync(request, null);
}
@Override
public java.util.concurrent.Future getRecoveryGroupAsync(final GetRecoveryGroupRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetRecoveryGroupRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetRecoveryGroupResult call() throws Exception {
GetRecoveryGroupResult result = null;
try {
result = executeGetRecoveryGroup(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 getRecoveryGroupReadinessSummaryAsync(
GetRecoveryGroupReadinessSummaryRequest request) {
return getRecoveryGroupReadinessSummaryAsync(request, null);
}
@Override
public java.util.concurrent.Future getRecoveryGroupReadinessSummaryAsync(
final GetRecoveryGroupReadinessSummaryRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetRecoveryGroupReadinessSummaryRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetRecoveryGroupReadinessSummaryResult call() throws Exception {
GetRecoveryGroupReadinessSummaryResult result = null;
try {
result = executeGetRecoveryGroupReadinessSummary(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 getResourceSetAsync(GetResourceSetRequest request) {
return getResourceSetAsync(request, null);
}
@Override
public java.util.concurrent.Future getResourceSetAsync(final GetResourceSetRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetResourceSetRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetResourceSetResult call() throws Exception {
GetResourceSetResult result = null;
try {
result = executeGetResourceSet(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 listCellsAsync(ListCellsRequest request) {
return listCellsAsync(request, null);
}
@Override
public java.util.concurrent.Future listCellsAsync(final ListCellsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListCellsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListCellsResult call() throws Exception {
ListCellsResult result = null;
try {
result = executeListCells(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 listCrossAccountAuthorizationsAsync(ListCrossAccountAuthorizationsRequest request) {
return listCrossAccountAuthorizationsAsync(request, null);
}
@Override
public java.util.concurrent.Future listCrossAccountAuthorizationsAsync(
final ListCrossAccountAuthorizationsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListCrossAccountAuthorizationsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListCrossAccountAuthorizationsResult call() throws Exception {
ListCrossAccountAuthorizationsResult result = null;
try {
result = executeListCrossAccountAuthorizations(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 listReadinessChecksAsync(ListReadinessChecksRequest request) {
return listReadinessChecksAsync(request, null);
}
@Override
public java.util.concurrent.Future listReadinessChecksAsync(final ListReadinessChecksRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListReadinessChecksRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListReadinessChecksResult call() throws Exception {
ListReadinessChecksResult result = null;
try {
result = executeListReadinessChecks(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 listRecoveryGroupsAsync(ListRecoveryGroupsRequest request) {
return listRecoveryGroupsAsync(request, null);
}
@Override
public java.util.concurrent.Future listRecoveryGroupsAsync(final ListRecoveryGroupsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListRecoveryGroupsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListRecoveryGroupsResult call() throws Exception {
ListRecoveryGroupsResult result = null;
try {
result = executeListRecoveryGroups(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 listResourceSetsAsync(ListResourceSetsRequest request) {
return listResourceSetsAsync(request, null);
}
@Override
public java.util.concurrent.Future listResourceSetsAsync(final ListResourceSetsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListResourceSetsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListResourceSetsResult call() throws Exception {
ListResourceSetsResult result = null;
try {
result = executeListResourceSets(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 listRulesAsync(ListRulesRequest request) {
return listRulesAsync(request, null);
}
@Override
public java.util.concurrent.Future listRulesAsync(final ListRulesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListRulesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListRulesResult call() throws Exception {
ListRulesResult result = null;
try {
result = executeListRules(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 listTagsForResourcesAsync(ListTagsForResourcesRequest request) {
return listTagsForResourcesAsync(request, null);
}
@Override
public java.util.concurrent.Future listTagsForResourcesAsync(final ListTagsForResourcesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListTagsForResourcesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListTagsForResourcesResult call() throws Exception {
ListTagsForResourcesResult result = null;
try {
result = executeListTagsForResources(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 tagResourceAsync(TagResourceRequest request) {
return tagResourceAsync(request, null);
}
@Override
public java.util.concurrent.Future tagResourceAsync(final TagResourceRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final TagResourceRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public TagResourceResult call() throws Exception {
TagResourceResult result = null;
try {
result = executeTagResource(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 untagResourceAsync(UntagResourceRequest request) {
return untagResourceAsync(request, null);
}
@Override
public java.util.concurrent.Future untagResourceAsync(final UntagResourceRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final UntagResourceRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public UntagResourceResult call() throws Exception {
UntagResourceResult result = null;
try {
result = executeUntagResource(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 updateCellAsync(UpdateCellRequest request) {
return updateCellAsync(request, null);
}
@Override
public java.util.concurrent.Future updateCellAsync(final UpdateCellRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final UpdateCellRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public UpdateCellResult call() throws Exception {
UpdateCellResult result = null;
try {
result = executeUpdateCell(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 updateReadinessCheckAsync(UpdateReadinessCheckRequest request) {
return updateReadinessCheckAsync(request, null);
}
@Override
public java.util.concurrent.Future updateReadinessCheckAsync(final UpdateReadinessCheckRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final UpdateReadinessCheckRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public UpdateReadinessCheckResult call() throws Exception {
UpdateReadinessCheckResult result = null;
try {
result = executeUpdateReadinessCheck(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 updateRecoveryGroupAsync(UpdateRecoveryGroupRequest request) {
return updateRecoveryGroupAsync(request, null);
}
@Override
public java.util.concurrent.Future updateRecoveryGroupAsync(final UpdateRecoveryGroupRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final UpdateRecoveryGroupRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public UpdateRecoveryGroupResult call() throws Exception {
UpdateRecoveryGroupResult result = null;
try {
result = executeUpdateRecoveryGroup(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 updateResourceSetAsync(UpdateResourceSetRequest request) {
return updateResourceSetAsync(request, null);
}
@Override
public java.util.concurrent.Future updateResourceSetAsync(final UpdateResourceSetRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final UpdateResourceSetRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public UpdateResourceSetResult call() throws Exception {
UpdateResourceSetResult result = null;
try {
result = executeUpdateResourceSet(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