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

com.amazonaws.services.dataexchange.AWSDataExchangeAsyncClient Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWS Data Exchange module holds the client classes that are used for communicating with AWS Data Exchange 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.dataexchange;

import javax.annotation.Generated;

import com.amazonaws.services.dataexchange.model.*;
import com.amazonaws.client.AwsAsyncClientParams;
import com.amazonaws.annotation.ThreadSafe;

import java.util.concurrent.ExecutorService;

/**
 * Client for accessing AWS Data Exchange 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.
 * 

*

* AWS Data Exchange is a service that makes it easy for AWS customers to exchange data in the cloud. You can use the * AWS Data Exchange APIs to create, update, manage, and access file-based data set in the AWS Cloud. *

*

* As a subscriber, you can view and access the data sets that you have an entitlement to through a subscription. You * can use the APIs to download or copy your entitled data sets to Amazon Simple Storage Service (Amazon S3) for use * across a variety of AWS analytics and machine learning services. *

*

* As a provider, you can create and manage your data sets that you would like to publish to a product. Being able to * package and provide your data sets into products requires a few steps to determine eligibility. For more information, * visit the AWS Data Exchange User Guide. *

*

* A data set is a collection of data that can be changed or updated over time. Data sets can be updated using * revisions, which represent a new version or incremental change to a data set. A revision contains one or more assets. * An asset in AWS Data Exchange is a piece of data that can be stored as an Amazon S3 object, Redshift datashare, API * Gateway API, AWS Lake Formation data permission, or Amazon S3 data access. The asset can be a structured data file, * an image file, or some other data file. Jobs are asynchronous import or export operations used to create or copy * assets. *

*/ @ThreadSafe @Generated("com.amazonaws:aws-java-sdk-code-generator") public class AWSDataExchangeAsyncClient extends AWSDataExchangeClient implements AWSDataExchangeAsync { private static final int DEFAULT_THREAD_POOL_SIZE = 50; private final java.util.concurrent.ExecutorService executorService; public static AWSDataExchangeAsyncClientBuilder asyncBuilder() { return AWSDataExchangeAsyncClientBuilder.standard(); } /** * Constructs a new asynchronous client to invoke service methods on AWS Data Exchange using the specified * parameters. * * @param asyncClientParams * Object providing client parameters. */ AWSDataExchangeAsyncClient(AwsAsyncClientParams asyncClientParams) { this(asyncClientParams, false); } /** * Constructs a new asynchronous client to invoke service methods on AWS Data Exchange using the specified * parameters. * * @param asyncClientParams * Object providing client parameters. * @param endpointDiscoveryEnabled * true will enable endpoint discovery if the service supports it. */ AWSDataExchangeAsyncClient(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 cancelJobAsync(CancelJobRequest request) { return cancelJobAsync(request, null); } @Override public java.util.concurrent.Future cancelJobAsync(final CancelJobRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CancelJobRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CancelJobResult call() throws Exception { CancelJobResult result = null; try { result = executeCancelJob(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 createDataSetAsync(CreateDataSetRequest request) { return createDataSetAsync(request, null); } @Override public java.util.concurrent.Future createDataSetAsync(final CreateDataSetRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateDataSetRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateDataSetResult call() throws Exception { CreateDataSetResult result = null; try { result = executeCreateDataSet(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 createEventActionAsync(CreateEventActionRequest request) { return createEventActionAsync(request, null); } @Override public java.util.concurrent.Future createEventActionAsync(final CreateEventActionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateEventActionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateEventActionResult call() throws Exception { CreateEventActionResult result = null; try { result = executeCreateEventAction(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 createJobAsync(CreateJobRequest request) { return createJobAsync(request, null); } @Override public java.util.concurrent.Future createJobAsync(final CreateJobRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateJobRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateJobResult call() throws Exception { CreateJobResult result = null; try { result = executeCreateJob(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 createRevisionAsync(CreateRevisionRequest request) { return createRevisionAsync(request, null); } @Override public java.util.concurrent.Future createRevisionAsync(final CreateRevisionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateRevisionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateRevisionResult call() throws Exception { CreateRevisionResult result = null; try { result = executeCreateRevision(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 deleteAssetAsync(DeleteAssetRequest request) { return deleteAssetAsync(request, null); } @Override public java.util.concurrent.Future deleteAssetAsync(final DeleteAssetRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteAssetRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteAssetResult call() throws Exception { DeleteAssetResult result = null; try { result = executeDeleteAsset(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 deleteDataSetAsync(DeleteDataSetRequest request) { return deleteDataSetAsync(request, null); } @Override public java.util.concurrent.Future deleteDataSetAsync(final DeleteDataSetRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteDataSetRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteDataSetResult call() throws Exception { DeleteDataSetResult result = null; try { result = executeDeleteDataSet(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 deleteEventActionAsync(DeleteEventActionRequest request) { return deleteEventActionAsync(request, null); } @Override public java.util.concurrent.Future deleteEventActionAsync(final DeleteEventActionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteEventActionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteEventActionResult call() throws Exception { DeleteEventActionResult result = null; try { result = executeDeleteEventAction(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 deleteRevisionAsync(DeleteRevisionRequest request) { return deleteRevisionAsync(request, null); } @Override public java.util.concurrent.Future deleteRevisionAsync(final DeleteRevisionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteRevisionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteRevisionResult call() throws Exception { DeleteRevisionResult result = null; try { result = executeDeleteRevision(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 getAssetAsync(GetAssetRequest request) { return getAssetAsync(request, null); } @Override public java.util.concurrent.Future getAssetAsync(final GetAssetRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetAssetRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetAssetResult call() throws Exception { GetAssetResult result = null; try { result = executeGetAsset(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 getDataSetAsync(GetDataSetRequest request) { return getDataSetAsync(request, null); } @Override public java.util.concurrent.Future getDataSetAsync(final GetDataSetRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetDataSetRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetDataSetResult call() throws Exception { GetDataSetResult result = null; try { result = executeGetDataSet(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 getEventActionAsync(GetEventActionRequest request) { return getEventActionAsync(request, null); } @Override public java.util.concurrent.Future getEventActionAsync(final GetEventActionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetEventActionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetEventActionResult call() throws Exception { GetEventActionResult result = null; try { result = executeGetEventAction(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 getJobAsync(GetJobRequest request) { return getJobAsync(request, null); } @Override public java.util.concurrent.Future getJobAsync(final GetJobRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetJobRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetJobResult call() throws Exception { GetJobResult result = null; try { result = executeGetJob(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 getRevisionAsync(GetRevisionRequest request) { return getRevisionAsync(request, null); } @Override public java.util.concurrent.Future getRevisionAsync(final GetRevisionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetRevisionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetRevisionResult call() throws Exception { GetRevisionResult result = null; try { result = executeGetRevision(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 listDataSetRevisionsAsync(ListDataSetRevisionsRequest request) { return listDataSetRevisionsAsync(request, null); } @Override public java.util.concurrent.Future listDataSetRevisionsAsync(final ListDataSetRevisionsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListDataSetRevisionsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListDataSetRevisionsResult call() throws Exception { ListDataSetRevisionsResult result = null; try { result = executeListDataSetRevisions(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 listDataSetsAsync(ListDataSetsRequest request) { return listDataSetsAsync(request, null); } @Override public java.util.concurrent.Future listDataSetsAsync(final ListDataSetsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListDataSetsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListDataSetsResult call() throws Exception { ListDataSetsResult result = null; try { result = executeListDataSets(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 listEventActionsAsync(ListEventActionsRequest request) { return listEventActionsAsync(request, null); } @Override public java.util.concurrent.Future listEventActionsAsync(final ListEventActionsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListEventActionsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListEventActionsResult call() throws Exception { ListEventActionsResult result = null; try { result = executeListEventActions(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 listJobsAsync(ListJobsRequest request) { return listJobsAsync(request, null); } @Override public java.util.concurrent.Future listJobsAsync(final ListJobsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListJobsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListJobsResult call() throws Exception { ListJobsResult result = null; try { result = executeListJobs(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 listRevisionAssetsAsync(ListRevisionAssetsRequest request) { return listRevisionAssetsAsync(request, null); } @Override public java.util.concurrent.Future listRevisionAssetsAsync(final ListRevisionAssetsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListRevisionAssetsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListRevisionAssetsResult call() throws Exception { ListRevisionAssetsResult result = null; try { result = executeListRevisionAssets(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 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 revokeRevisionAsync(RevokeRevisionRequest request) { return revokeRevisionAsync(request, null); } @Override public java.util.concurrent.Future revokeRevisionAsync(final RevokeRevisionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final RevokeRevisionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public RevokeRevisionResult call() throws Exception { RevokeRevisionResult result = null; try { result = executeRevokeRevision(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 sendDataSetNotificationAsync(SendDataSetNotificationRequest request) { return sendDataSetNotificationAsync(request, null); } @Override public java.util.concurrent.Future sendDataSetNotificationAsync(final SendDataSetNotificationRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final SendDataSetNotificationRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public SendDataSetNotificationResult call() throws Exception { SendDataSetNotificationResult result = null; try { result = executeSendDataSetNotification(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 startJobAsync(StartJobRequest request) { return startJobAsync(request, null); } @Override public java.util.concurrent.Future startJobAsync(final StartJobRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final StartJobRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public StartJobResult call() throws Exception { StartJobResult result = null; try { result = executeStartJob(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 updateAssetAsync(UpdateAssetRequest request) { return updateAssetAsync(request, null); } @Override public java.util.concurrent.Future updateAssetAsync(final UpdateAssetRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateAssetRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateAssetResult call() throws Exception { UpdateAssetResult result = null; try { result = executeUpdateAsset(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 updateDataSetAsync(UpdateDataSetRequest request) { return updateDataSetAsync(request, null); } @Override public java.util.concurrent.Future updateDataSetAsync(final UpdateDataSetRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateDataSetRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateDataSetResult call() throws Exception { UpdateDataSetResult result = null; try { result = executeUpdateDataSet(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 updateEventActionAsync(UpdateEventActionRequest request) { return updateEventActionAsync(request, null); } @Override public java.util.concurrent.Future updateEventActionAsync(final UpdateEventActionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateEventActionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateEventActionResult call() throws Exception { UpdateEventActionResult result = null; try { result = executeUpdateEventAction(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 updateRevisionAsync(UpdateRevisionRequest request) { return updateRevisionAsync(request, null); } @Override public java.util.concurrent.Future updateRevisionAsync(final UpdateRevisionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateRevisionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateRevisionResult call() throws Exception { UpdateRevisionResult result = null; try { result = executeUpdateRevision(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