com.amazonaws.services.athena.AmazonAthenaAsyncClient Maven / Gradle / Ivy
Show all versions of aws-java-sdk-athena Show documentation
/*
* 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.athena;
import javax.annotation.Generated;
import com.amazonaws.services.athena.model.*;
import com.amazonaws.client.AwsAsyncClientParams;
import com.amazonaws.annotation.ThreadSafe;
import java.util.concurrent.ExecutorService;
/**
* Client for accessing Amazon Athena 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 Athena is an interactive query service that lets you use standard SQL to analyze data directly in Amazon S3.
* You can point Athena at your data in Amazon S3 and run ad-hoc queries and get results in seconds. Athena is
* serverless, so there is no infrastructure to set up or manage. You pay only for the queries you run. Athena scales
* automatically—executing queries in parallel—so results are fast, even with large datasets and complex queries. For
* more information, see What is Amazon Athena in
* the Amazon Athena User Guide.
*
*
* If you connect to Athena using the JDBC driver, use version 1.1.0 of the driver or later with the Amazon Athena API.
* Earlier version drivers do not support the API. For more information and to download the driver, see Accessing Amazon Athena with JDBC.
*
*/
@ThreadSafe
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class AmazonAthenaAsyncClient extends AmazonAthenaClient implements AmazonAthenaAsync {
private static final int DEFAULT_THREAD_POOL_SIZE = 50;
private final java.util.concurrent.ExecutorService executorService;
public static AmazonAthenaAsyncClientBuilder asyncBuilder() {
return AmazonAthenaAsyncClientBuilder.standard();
}
/**
* Constructs a new asynchronous client to invoke service methods on Amazon Athena using the specified parameters.
*
* @param asyncClientParams
* Object providing client parameters.
*/
AmazonAthenaAsyncClient(AwsAsyncClientParams asyncClientParams) {
this(asyncClientParams, false);
}
/**
* Constructs a new asynchronous client to invoke service methods on Amazon Athena using the specified parameters.
*
* @param asyncClientParams
* Object providing client parameters.
* @param endpointDiscoveryEnabled
* true will enable endpoint discovery if the service supports it.
*/
AmazonAthenaAsyncClient(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 batchGetNamedQueryAsync(BatchGetNamedQueryRequest request) {
return batchGetNamedQueryAsync(request, null);
}
@Override
public java.util.concurrent.Future batchGetNamedQueryAsync(final BatchGetNamedQueryRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final BatchGetNamedQueryRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public BatchGetNamedQueryResult call() throws Exception {
BatchGetNamedQueryResult result = null;
try {
result = executeBatchGetNamedQuery(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 batchGetPreparedStatementAsync(BatchGetPreparedStatementRequest request) {
return batchGetPreparedStatementAsync(request, null);
}
@Override
public java.util.concurrent.Future batchGetPreparedStatementAsync(final BatchGetPreparedStatementRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final BatchGetPreparedStatementRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public BatchGetPreparedStatementResult call() throws Exception {
BatchGetPreparedStatementResult result = null;
try {
result = executeBatchGetPreparedStatement(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 batchGetQueryExecutionAsync(BatchGetQueryExecutionRequest request) {
return batchGetQueryExecutionAsync(request, null);
}
@Override
public java.util.concurrent.Future batchGetQueryExecutionAsync(final BatchGetQueryExecutionRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final BatchGetQueryExecutionRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public BatchGetQueryExecutionResult call() throws Exception {
BatchGetQueryExecutionResult result = null;
try {
result = executeBatchGetQueryExecution(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 cancelCapacityReservationAsync(CancelCapacityReservationRequest request) {
return cancelCapacityReservationAsync(request, null);
}
@Override
public java.util.concurrent.Future cancelCapacityReservationAsync(final CancelCapacityReservationRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CancelCapacityReservationRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CancelCapacityReservationResult call() throws Exception {
CancelCapacityReservationResult result = null;
try {
result = executeCancelCapacityReservation(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 createCapacityReservationAsync(CreateCapacityReservationRequest request) {
return createCapacityReservationAsync(request, null);
}
@Override
public java.util.concurrent.Future createCapacityReservationAsync(final CreateCapacityReservationRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateCapacityReservationRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateCapacityReservationResult call() throws Exception {
CreateCapacityReservationResult result = null;
try {
result = executeCreateCapacityReservation(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 createDataCatalogAsync(CreateDataCatalogRequest request) {
return createDataCatalogAsync(request, null);
}
@Override
public java.util.concurrent.Future createDataCatalogAsync(final CreateDataCatalogRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateDataCatalogRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateDataCatalogResult call() throws Exception {
CreateDataCatalogResult result = null;
try {
result = executeCreateDataCatalog(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 createNamedQueryAsync(CreateNamedQueryRequest request) {
return createNamedQueryAsync(request, null);
}
@Override
public java.util.concurrent.Future createNamedQueryAsync(final CreateNamedQueryRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateNamedQueryRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateNamedQueryResult call() throws Exception {
CreateNamedQueryResult result = null;
try {
result = executeCreateNamedQuery(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 createNotebookAsync(CreateNotebookRequest request) {
return createNotebookAsync(request, null);
}
@Override
public java.util.concurrent.Future createNotebookAsync(final CreateNotebookRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateNotebookRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateNotebookResult call() throws Exception {
CreateNotebookResult result = null;
try {
result = executeCreateNotebook(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 createPreparedStatementAsync(CreatePreparedStatementRequest request) {
return createPreparedStatementAsync(request, null);
}
@Override
public java.util.concurrent.Future createPreparedStatementAsync(final CreatePreparedStatementRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreatePreparedStatementRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreatePreparedStatementResult call() throws Exception {
CreatePreparedStatementResult result = null;
try {
result = executeCreatePreparedStatement(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 createPresignedNotebookUrlAsync(CreatePresignedNotebookUrlRequest request) {
return createPresignedNotebookUrlAsync(request, null);
}
@Override
public java.util.concurrent.Future createPresignedNotebookUrlAsync(final CreatePresignedNotebookUrlRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreatePresignedNotebookUrlRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreatePresignedNotebookUrlResult call() throws Exception {
CreatePresignedNotebookUrlResult result = null;
try {
result = executeCreatePresignedNotebookUrl(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 createWorkGroupAsync(CreateWorkGroupRequest request) {
return createWorkGroupAsync(request, null);
}
@Override
public java.util.concurrent.Future createWorkGroupAsync(final CreateWorkGroupRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateWorkGroupRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateWorkGroupResult call() throws Exception {
CreateWorkGroupResult result = null;
try {
result = executeCreateWorkGroup(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 deleteCapacityReservationAsync(DeleteCapacityReservationRequest request) {
return deleteCapacityReservationAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteCapacityReservationAsync(final DeleteCapacityReservationRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteCapacityReservationRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteCapacityReservationResult call() throws Exception {
DeleteCapacityReservationResult result = null;
try {
result = executeDeleteCapacityReservation(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 deleteDataCatalogAsync(DeleteDataCatalogRequest request) {
return deleteDataCatalogAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteDataCatalogAsync(final DeleteDataCatalogRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteDataCatalogRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteDataCatalogResult call() throws Exception {
DeleteDataCatalogResult result = null;
try {
result = executeDeleteDataCatalog(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 deleteNamedQueryAsync(DeleteNamedQueryRequest request) {
return deleteNamedQueryAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteNamedQueryAsync(final DeleteNamedQueryRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteNamedQueryRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteNamedQueryResult call() throws Exception {
DeleteNamedQueryResult result = null;
try {
result = executeDeleteNamedQuery(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 deleteNotebookAsync(DeleteNotebookRequest request) {
return deleteNotebookAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteNotebookAsync(final DeleteNotebookRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteNotebookRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteNotebookResult call() throws Exception {
DeleteNotebookResult result = null;
try {
result = executeDeleteNotebook(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 deletePreparedStatementAsync(DeletePreparedStatementRequest request) {
return deletePreparedStatementAsync(request, null);
}
@Override
public java.util.concurrent.Future deletePreparedStatementAsync(final DeletePreparedStatementRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeletePreparedStatementRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeletePreparedStatementResult call() throws Exception {
DeletePreparedStatementResult result = null;
try {
result = executeDeletePreparedStatement(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 deleteWorkGroupAsync(DeleteWorkGroupRequest request) {
return deleteWorkGroupAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteWorkGroupAsync(final DeleteWorkGroupRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteWorkGroupRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteWorkGroupResult call() throws Exception {
DeleteWorkGroupResult result = null;
try {
result = executeDeleteWorkGroup(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 exportNotebookAsync(ExportNotebookRequest request) {
return exportNotebookAsync(request, null);
}
@Override
public java.util.concurrent.Future exportNotebookAsync(final ExportNotebookRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ExportNotebookRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ExportNotebookResult call() throws Exception {
ExportNotebookResult result = null;
try {
result = executeExportNotebook(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 getCalculationExecutionAsync(GetCalculationExecutionRequest request) {
return getCalculationExecutionAsync(request, null);
}
@Override
public java.util.concurrent.Future getCalculationExecutionAsync(final GetCalculationExecutionRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetCalculationExecutionRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetCalculationExecutionResult call() throws Exception {
GetCalculationExecutionResult result = null;
try {
result = executeGetCalculationExecution(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 getCalculationExecutionCodeAsync(GetCalculationExecutionCodeRequest request) {
return getCalculationExecutionCodeAsync(request, null);
}
@Override
public java.util.concurrent.Future getCalculationExecutionCodeAsync(final GetCalculationExecutionCodeRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetCalculationExecutionCodeRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetCalculationExecutionCodeResult call() throws Exception {
GetCalculationExecutionCodeResult result = null;
try {
result = executeGetCalculationExecutionCode(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 getCalculationExecutionStatusAsync(GetCalculationExecutionStatusRequest request) {
return getCalculationExecutionStatusAsync(request, null);
}
@Override
public java.util.concurrent.Future getCalculationExecutionStatusAsync(
final GetCalculationExecutionStatusRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetCalculationExecutionStatusRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetCalculationExecutionStatusResult call() throws Exception {
GetCalculationExecutionStatusResult result = null;
try {
result = executeGetCalculationExecutionStatus(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 getCapacityAssignmentConfigurationAsync(
GetCapacityAssignmentConfigurationRequest request) {
return getCapacityAssignmentConfigurationAsync(request, null);
}
@Override
public java.util.concurrent.Future getCapacityAssignmentConfigurationAsync(
final GetCapacityAssignmentConfigurationRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetCapacityAssignmentConfigurationRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetCapacityAssignmentConfigurationResult call() throws Exception {
GetCapacityAssignmentConfigurationResult result = null;
try {
result = executeGetCapacityAssignmentConfiguration(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 getCapacityReservationAsync(GetCapacityReservationRequest request) {
return getCapacityReservationAsync(request, null);
}
@Override
public java.util.concurrent.Future getCapacityReservationAsync(final GetCapacityReservationRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetCapacityReservationRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetCapacityReservationResult call() throws Exception {
GetCapacityReservationResult result = null;
try {
result = executeGetCapacityReservation(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 getDataCatalogAsync(GetDataCatalogRequest request) {
return getDataCatalogAsync(request, null);
}
@Override
public java.util.concurrent.Future getDataCatalogAsync(final GetDataCatalogRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetDataCatalogRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetDataCatalogResult call() throws Exception {
GetDataCatalogResult result = null;
try {
result = executeGetDataCatalog(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 getDatabaseAsync(GetDatabaseRequest request) {
return getDatabaseAsync(request, null);
}
@Override
public java.util.concurrent.Future getDatabaseAsync(final GetDatabaseRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetDatabaseRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetDatabaseResult call() throws Exception {
GetDatabaseResult result = null;
try {
result = executeGetDatabase(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 getNamedQueryAsync(GetNamedQueryRequest request) {
return getNamedQueryAsync(request, null);
}
@Override
public java.util.concurrent.Future getNamedQueryAsync(final GetNamedQueryRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetNamedQueryRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetNamedQueryResult call() throws Exception {
GetNamedQueryResult result = null;
try {
result = executeGetNamedQuery(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 getNotebookMetadataAsync(GetNotebookMetadataRequest request) {
return getNotebookMetadataAsync(request, null);
}
@Override
public java.util.concurrent.Future getNotebookMetadataAsync(final GetNotebookMetadataRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetNotebookMetadataRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetNotebookMetadataResult call() throws Exception {
GetNotebookMetadataResult result = null;
try {
result = executeGetNotebookMetadata(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 getPreparedStatementAsync(GetPreparedStatementRequest request) {
return getPreparedStatementAsync(request, null);
}
@Override
public java.util.concurrent.Future getPreparedStatementAsync(final GetPreparedStatementRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetPreparedStatementRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetPreparedStatementResult call() throws Exception {
GetPreparedStatementResult result = null;
try {
result = executeGetPreparedStatement(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 getQueryExecutionAsync(GetQueryExecutionRequest request) {
return getQueryExecutionAsync(request, null);
}
@Override
public java.util.concurrent.Future getQueryExecutionAsync(final GetQueryExecutionRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetQueryExecutionRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetQueryExecutionResult call() throws Exception {
GetQueryExecutionResult result = null;
try {
result = executeGetQueryExecution(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 getQueryResultsAsync(GetQueryResultsRequest request) {
return getQueryResultsAsync(request, null);
}
@Override
public java.util.concurrent.Future getQueryResultsAsync(final GetQueryResultsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetQueryResultsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetQueryResultsResult call() throws Exception {
GetQueryResultsResult result = null;
try {
result = executeGetQueryResults(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 getQueryRuntimeStatisticsAsync(GetQueryRuntimeStatisticsRequest request) {
return getQueryRuntimeStatisticsAsync(request, null);
}
@Override
public java.util.concurrent.Future getQueryRuntimeStatisticsAsync(final GetQueryRuntimeStatisticsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetQueryRuntimeStatisticsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetQueryRuntimeStatisticsResult call() throws Exception {
GetQueryRuntimeStatisticsResult result = null;
try {
result = executeGetQueryRuntimeStatistics(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 getSessionAsync(GetSessionRequest request) {
return getSessionAsync(request, null);
}
@Override
public java.util.concurrent.Future getSessionAsync(final GetSessionRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetSessionRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetSessionResult call() throws Exception {
GetSessionResult result = null;
try {
result = executeGetSession(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 getSessionStatusAsync(GetSessionStatusRequest request) {
return getSessionStatusAsync(request, null);
}
@Override
public java.util.concurrent.Future getSessionStatusAsync(final GetSessionStatusRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetSessionStatusRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetSessionStatusResult call() throws Exception {
GetSessionStatusResult result = null;
try {
result = executeGetSessionStatus(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 getTableMetadataAsync(GetTableMetadataRequest request) {
return getTableMetadataAsync(request, null);
}
@Override
public java.util.concurrent.Future getTableMetadataAsync(final GetTableMetadataRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetTableMetadataRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetTableMetadataResult call() throws Exception {
GetTableMetadataResult result = null;
try {
result = executeGetTableMetadata(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 getWorkGroupAsync(GetWorkGroupRequest request) {
return getWorkGroupAsync(request, null);
}
@Override
public java.util.concurrent.Future getWorkGroupAsync(final GetWorkGroupRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GetWorkGroupRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GetWorkGroupResult call() throws Exception {
GetWorkGroupResult result = null;
try {
result = executeGetWorkGroup(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 importNotebookAsync(ImportNotebookRequest request) {
return importNotebookAsync(request, null);
}
@Override
public java.util.concurrent.Future importNotebookAsync(final ImportNotebookRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ImportNotebookRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ImportNotebookResult call() throws Exception {
ImportNotebookResult result = null;
try {
result = executeImportNotebook(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 listApplicationDPUSizesAsync(ListApplicationDPUSizesRequest request) {
return listApplicationDPUSizesAsync(request, null);
}
@Override
public java.util.concurrent.Future listApplicationDPUSizesAsync(final ListApplicationDPUSizesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListApplicationDPUSizesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListApplicationDPUSizesResult call() throws Exception {
ListApplicationDPUSizesResult result = null;
try {
result = executeListApplicationDPUSizes(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 listCalculationExecutionsAsync(ListCalculationExecutionsRequest request) {
return listCalculationExecutionsAsync(request, null);
}
@Override
public java.util.concurrent.Future listCalculationExecutionsAsync(final ListCalculationExecutionsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListCalculationExecutionsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListCalculationExecutionsResult call() throws Exception {
ListCalculationExecutionsResult result = null;
try {
result = executeListCalculationExecutions(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 listCapacityReservationsAsync(ListCapacityReservationsRequest request) {
return listCapacityReservationsAsync(request, null);
}
@Override
public java.util.concurrent.Future listCapacityReservationsAsync(final ListCapacityReservationsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListCapacityReservationsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListCapacityReservationsResult call() throws Exception {
ListCapacityReservationsResult result = null;
try {
result = executeListCapacityReservations(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 listDataCatalogsAsync(ListDataCatalogsRequest request) {
return listDataCatalogsAsync(request, null);
}
@Override
public java.util.concurrent.Future listDataCatalogsAsync(final ListDataCatalogsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListDataCatalogsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListDataCatalogsResult call() throws Exception {
ListDataCatalogsResult result = null;
try {
result = executeListDataCatalogs(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 listDatabasesAsync(ListDatabasesRequest request) {
return listDatabasesAsync(request, null);
}
@Override
public java.util.concurrent.Future listDatabasesAsync(final ListDatabasesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListDatabasesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListDatabasesResult call() throws Exception {
ListDatabasesResult result = null;
try {
result = executeListDatabases(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 listEngineVersionsAsync(ListEngineVersionsRequest request) {
return listEngineVersionsAsync(request, null);
}
@Override
public java.util.concurrent.Future listEngineVersionsAsync(final ListEngineVersionsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListEngineVersionsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListEngineVersionsResult call() throws Exception {
ListEngineVersionsResult result = null;
try {
result = executeListEngineVersions(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 listExecutorsAsync(ListExecutorsRequest request) {
return listExecutorsAsync(request, null);
}
@Override
public java.util.concurrent.Future listExecutorsAsync(final ListExecutorsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListExecutorsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListExecutorsResult call() throws Exception {
ListExecutorsResult result = null;
try {
result = executeListExecutors(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 listNamedQueriesAsync(ListNamedQueriesRequest request) {
return listNamedQueriesAsync(request, null);
}
@Override
public java.util.concurrent.Future listNamedQueriesAsync(final ListNamedQueriesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListNamedQueriesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListNamedQueriesResult call() throws Exception {
ListNamedQueriesResult result = null;
try {
result = executeListNamedQueries(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 listNotebookMetadataAsync(ListNotebookMetadataRequest request) {
return listNotebookMetadataAsync(request, null);
}
@Override
public java.util.concurrent.Future listNotebookMetadataAsync(final ListNotebookMetadataRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListNotebookMetadataRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListNotebookMetadataResult call() throws Exception {
ListNotebookMetadataResult result = null;
try {
result = executeListNotebookMetadata(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 listNotebookSessionsAsync(ListNotebookSessionsRequest request) {
return listNotebookSessionsAsync(request, null);
}
@Override
public java.util.concurrent.Future listNotebookSessionsAsync(final ListNotebookSessionsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListNotebookSessionsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListNotebookSessionsResult call() throws Exception {
ListNotebookSessionsResult result = null;
try {
result = executeListNotebookSessions(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 listPreparedStatementsAsync(ListPreparedStatementsRequest request) {
return listPreparedStatementsAsync(request, null);
}
@Override
public java.util.concurrent.Future listPreparedStatementsAsync(final ListPreparedStatementsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListPreparedStatementsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListPreparedStatementsResult call() throws Exception {
ListPreparedStatementsResult result = null;
try {
result = executeListPreparedStatements(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 listQueryExecutionsAsync(ListQueryExecutionsRequest request) {
return listQueryExecutionsAsync(request, null);
}
@Override
public java.util.concurrent.Future listQueryExecutionsAsync(final ListQueryExecutionsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListQueryExecutionsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListQueryExecutionsResult call() throws Exception {
ListQueryExecutionsResult result = null;
try {
result = executeListQueryExecutions(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 listSessionsAsync(ListSessionsRequest request) {
return listSessionsAsync(request, null);
}
@Override
public java.util.concurrent.Future listSessionsAsync(final ListSessionsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListSessionsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListSessionsResult call() throws Exception {
ListSessionsResult result = null;
try {
result = executeListSessions(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 listTableMetadataAsync(ListTableMetadataRequest request) {
return listTableMetadataAsync(request, null);
}
@Override
public java.util.concurrent.Future listTableMetadataAsync(final ListTableMetadataRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListTableMetadataRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListTableMetadataResult call() throws Exception {
ListTableMetadataResult result = null;
try {
result = executeListTableMetadata(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 listWorkGroupsAsync(ListWorkGroupsRequest request) {
return listWorkGroupsAsync(request, null);
}
@Override
public java.util.concurrent.Future listWorkGroupsAsync(final ListWorkGroupsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListWorkGroupsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListWorkGroupsResult call() throws Exception {
ListWorkGroupsResult result = null;
try {
result = executeListWorkGroups(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 putCapacityAssignmentConfigurationAsync(
PutCapacityAssignmentConfigurationRequest request) {
return putCapacityAssignmentConfigurationAsync(request, null);
}
@Override
public java.util.concurrent.Future putCapacityAssignmentConfigurationAsync(
final PutCapacityAssignmentConfigurationRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final PutCapacityAssignmentConfigurationRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public PutCapacityAssignmentConfigurationResult call() throws Exception {
PutCapacityAssignmentConfigurationResult result = null;
try {
result = executePutCapacityAssignmentConfiguration(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 startCalculationExecutionAsync(StartCalculationExecutionRequest request) {
return startCalculationExecutionAsync(request, null);
}
@Override
public java.util.concurrent.Future startCalculationExecutionAsync(final StartCalculationExecutionRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final StartCalculationExecutionRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public StartCalculationExecutionResult call() throws Exception {
StartCalculationExecutionResult result = null;
try {
result = executeStartCalculationExecution(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 startQueryExecutionAsync(StartQueryExecutionRequest request) {
return startQueryExecutionAsync(request, null);
}
@Override
public java.util.concurrent.Future startQueryExecutionAsync(final StartQueryExecutionRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final StartQueryExecutionRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public StartQueryExecutionResult call() throws Exception {
StartQueryExecutionResult result = null;
try {
result = executeStartQueryExecution(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 startSessionAsync(StartSessionRequest request) {
return startSessionAsync(request, null);
}
@Override
public java.util.concurrent.Future startSessionAsync(final StartSessionRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final StartSessionRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public StartSessionResult call() throws Exception {
StartSessionResult result = null;
try {
result = executeStartSession(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 stopCalculationExecutionAsync(StopCalculationExecutionRequest request) {
return stopCalculationExecutionAsync(request, null);
}
@Override
public java.util.concurrent.Future stopCalculationExecutionAsync(final StopCalculationExecutionRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final StopCalculationExecutionRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public StopCalculationExecutionResult call() throws Exception {
StopCalculationExecutionResult result = null;
try {
result = executeStopCalculationExecution(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 stopQueryExecutionAsync(StopQueryExecutionRequest request) {
return stopQueryExecutionAsync(request, null);
}
@Override
public java.util.concurrent.Future stopQueryExecutionAsync(final StopQueryExecutionRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final StopQueryExecutionRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public StopQueryExecutionResult call() throws Exception {
StopQueryExecutionResult result = null;
try {
result = executeStopQueryExecution(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 terminateSessionAsync(TerminateSessionRequest request) {
return terminateSessionAsync(request, null);
}
@Override
public java.util.concurrent.Future terminateSessionAsync(final TerminateSessionRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final TerminateSessionRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public TerminateSessionResult call() throws Exception {
TerminateSessionResult result = null;
try {
result = executeTerminateSession(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 updateCapacityReservationAsync(UpdateCapacityReservationRequest request) {
return updateCapacityReservationAsync(request, null);
}
@Override
public java.util.concurrent.Future updateCapacityReservationAsync(final UpdateCapacityReservationRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final UpdateCapacityReservationRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public UpdateCapacityReservationResult call() throws Exception {
UpdateCapacityReservationResult result = null;
try {
result = executeUpdateCapacityReservation(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 updateDataCatalogAsync(UpdateDataCatalogRequest request) {
return updateDataCatalogAsync(request, null);
}
@Override
public java.util.concurrent.Future updateDataCatalogAsync(final UpdateDataCatalogRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final UpdateDataCatalogRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable