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

com.amazonaws.services.forecast.AmazonForecastAsyncClient Maven / Gradle / Ivy

Go to download

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

The 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.forecast;

import javax.annotation.Generated;

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

import java.util.concurrent.ExecutorService;

/**
 * Client for accessing Amazon Forecast Service 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.
 * 

*

* Provides APIs for creating and managing Amazon Forecast resources. *

*/ @ThreadSafe @Generated("com.amazonaws:aws-java-sdk-code-generator") public class AmazonForecastAsyncClient extends AmazonForecastClient implements AmazonForecastAsync { private static final int DEFAULT_THREAD_POOL_SIZE = 50; private final java.util.concurrent.ExecutorService executorService; public static AmazonForecastAsyncClientBuilder asyncBuilder() { return AmazonForecastAsyncClientBuilder.standard(); } /** * Constructs a new asynchronous client to invoke service methods on Amazon Forecast Service using the specified * parameters. * * @param asyncClientParams * Object providing client parameters. */ AmazonForecastAsyncClient(AwsAsyncClientParams asyncClientParams) { this(asyncClientParams, false); } /** * Constructs a new asynchronous client to invoke service methods on Amazon Forecast Service using the specified * parameters. * * @param asyncClientParams * Object providing client parameters. * @param endpointDiscoveryEnabled * true will enable endpoint discovery if the service supports it. */ AmazonForecastAsyncClient(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 createAutoPredictorAsync(CreateAutoPredictorRequest request) { return createAutoPredictorAsync(request, null); } @Override public java.util.concurrent.Future createAutoPredictorAsync(final CreateAutoPredictorRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateAutoPredictorRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateAutoPredictorResult call() throws Exception { CreateAutoPredictorResult result = null; try { result = executeCreateAutoPredictor(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 createDatasetGroupAsync(CreateDatasetGroupRequest request) { return createDatasetGroupAsync(request, null); } @Override public java.util.concurrent.Future createDatasetGroupAsync(final CreateDatasetGroupRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateDatasetGroupRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateDatasetGroupResult call() throws Exception { CreateDatasetGroupResult result = null; try { result = executeCreateDatasetGroup(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 createDatasetImportJobAsync(CreateDatasetImportJobRequest request) { return createDatasetImportJobAsync(request, null); } @Override public java.util.concurrent.Future createDatasetImportJobAsync(final CreateDatasetImportJobRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateDatasetImportJobRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateDatasetImportJobResult call() throws Exception { CreateDatasetImportJobResult result = null; try { result = executeCreateDatasetImportJob(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 createExplainabilityAsync(CreateExplainabilityRequest request) { return createExplainabilityAsync(request, null); } @Override public java.util.concurrent.Future createExplainabilityAsync(final CreateExplainabilityRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateExplainabilityRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateExplainabilityResult call() throws Exception { CreateExplainabilityResult result = null; try { result = executeCreateExplainability(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 createExplainabilityExportAsync(CreateExplainabilityExportRequest request) { return createExplainabilityExportAsync(request, null); } @Override public java.util.concurrent.Future createExplainabilityExportAsync(final CreateExplainabilityExportRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateExplainabilityExportRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateExplainabilityExportResult call() throws Exception { CreateExplainabilityExportResult result = null; try { result = executeCreateExplainabilityExport(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 createForecastAsync(CreateForecastRequest request) { return createForecastAsync(request, null); } @Override public java.util.concurrent.Future createForecastAsync(final CreateForecastRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateForecastRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateForecastResult call() throws Exception { CreateForecastResult result = null; try { result = executeCreateForecast(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 createForecastExportJobAsync(CreateForecastExportJobRequest request) { return createForecastExportJobAsync(request, null); } @Override public java.util.concurrent.Future createForecastExportJobAsync(final CreateForecastExportJobRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateForecastExportJobRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateForecastExportJobResult call() throws Exception { CreateForecastExportJobResult result = null; try { result = executeCreateForecastExportJob(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 createMonitorAsync(CreateMonitorRequest request) { return createMonitorAsync(request, null); } @Override public java.util.concurrent.Future createMonitorAsync(final CreateMonitorRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateMonitorRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateMonitorResult call() throws Exception { CreateMonitorResult result = null; try { result = executeCreateMonitor(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 createPredictorAsync(CreatePredictorRequest request) { return createPredictorAsync(request, null); } @Override public java.util.concurrent.Future createPredictorAsync(final CreatePredictorRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreatePredictorRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreatePredictorResult call() throws Exception { CreatePredictorResult result = null; try { result = executeCreatePredictor(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 createPredictorBacktestExportJobAsync( CreatePredictorBacktestExportJobRequest request) { return createPredictorBacktestExportJobAsync(request, null); } @Override public java.util.concurrent.Future createPredictorBacktestExportJobAsync( final CreatePredictorBacktestExportJobRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreatePredictorBacktestExportJobRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreatePredictorBacktestExportJobResult call() throws Exception { CreatePredictorBacktestExportJobResult result = null; try { result = executeCreatePredictorBacktestExportJob(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 createWhatIfAnalysisAsync(CreateWhatIfAnalysisRequest request) { return createWhatIfAnalysisAsync(request, null); } @Override public java.util.concurrent.Future createWhatIfAnalysisAsync(final CreateWhatIfAnalysisRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateWhatIfAnalysisRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateWhatIfAnalysisResult call() throws Exception { CreateWhatIfAnalysisResult result = null; try { result = executeCreateWhatIfAnalysis(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 createWhatIfForecastAsync(CreateWhatIfForecastRequest request) { return createWhatIfForecastAsync(request, null); } @Override public java.util.concurrent.Future createWhatIfForecastAsync(final CreateWhatIfForecastRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateWhatIfForecastRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateWhatIfForecastResult call() throws Exception { CreateWhatIfForecastResult result = null; try { result = executeCreateWhatIfForecast(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 createWhatIfForecastExportAsync(CreateWhatIfForecastExportRequest request) { return createWhatIfForecastExportAsync(request, null); } @Override public java.util.concurrent.Future createWhatIfForecastExportAsync(final CreateWhatIfForecastExportRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateWhatIfForecastExportRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateWhatIfForecastExportResult call() throws Exception { CreateWhatIfForecastExportResult result = null; try { result = executeCreateWhatIfForecastExport(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 deleteDatasetGroupAsync(DeleteDatasetGroupRequest request) { return deleteDatasetGroupAsync(request, null); } @Override public java.util.concurrent.Future deleteDatasetGroupAsync(final DeleteDatasetGroupRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteDatasetGroupRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteDatasetGroupResult call() throws Exception { DeleteDatasetGroupResult result = null; try { result = executeDeleteDatasetGroup(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 deleteDatasetImportJobAsync(DeleteDatasetImportJobRequest request) { return deleteDatasetImportJobAsync(request, null); } @Override public java.util.concurrent.Future deleteDatasetImportJobAsync(final DeleteDatasetImportJobRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteDatasetImportJobRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteDatasetImportJobResult call() throws Exception { DeleteDatasetImportJobResult result = null; try { result = executeDeleteDatasetImportJob(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 deleteExplainabilityAsync(DeleteExplainabilityRequest request) { return deleteExplainabilityAsync(request, null); } @Override public java.util.concurrent.Future deleteExplainabilityAsync(final DeleteExplainabilityRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteExplainabilityRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteExplainabilityResult call() throws Exception { DeleteExplainabilityResult result = null; try { result = executeDeleteExplainability(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 deleteExplainabilityExportAsync(DeleteExplainabilityExportRequest request) { return deleteExplainabilityExportAsync(request, null); } @Override public java.util.concurrent.Future deleteExplainabilityExportAsync(final DeleteExplainabilityExportRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteExplainabilityExportRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteExplainabilityExportResult call() throws Exception { DeleteExplainabilityExportResult result = null; try { result = executeDeleteExplainabilityExport(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 deleteForecastAsync(DeleteForecastRequest request) { return deleteForecastAsync(request, null); } @Override public java.util.concurrent.Future deleteForecastAsync(final DeleteForecastRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteForecastRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteForecastResult call() throws Exception { DeleteForecastResult result = null; try { result = executeDeleteForecast(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 deleteForecastExportJobAsync(DeleteForecastExportJobRequest request) { return deleteForecastExportJobAsync(request, null); } @Override public java.util.concurrent.Future deleteForecastExportJobAsync(final DeleteForecastExportJobRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteForecastExportJobRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteForecastExportJobResult call() throws Exception { DeleteForecastExportJobResult result = null; try { result = executeDeleteForecastExportJob(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 deleteMonitorAsync(DeleteMonitorRequest request) { return deleteMonitorAsync(request, null); } @Override public java.util.concurrent.Future deleteMonitorAsync(final DeleteMonitorRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteMonitorRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteMonitorResult call() throws Exception { DeleteMonitorResult result = null; try { result = executeDeleteMonitor(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 deletePredictorAsync(DeletePredictorRequest request) { return deletePredictorAsync(request, null); } @Override public java.util.concurrent.Future deletePredictorAsync(final DeletePredictorRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeletePredictorRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeletePredictorResult call() throws Exception { DeletePredictorResult result = null; try { result = executeDeletePredictor(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 deletePredictorBacktestExportJobAsync( DeletePredictorBacktestExportJobRequest request) { return deletePredictorBacktestExportJobAsync(request, null); } @Override public java.util.concurrent.Future deletePredictorBacktestExportJobAsync( final DeletePredictorBacktestExportJobRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeletePredictorBacktestExportJobRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeletePredictorBacktestExportJobResult call() throws Exception { DeletePredictorBacktestExportJobResult result = null; try { result = executeDeletePredictorBacktestExportJob(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 deleteResourceTreeAsync(DeleteResourceTreeRequest request) { return deleteResourceTreeAsync(request, null); } @Override public java.util.concurrent.Future deleteResourceTreeAsync(final DeleteResourceTreeRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteResourceTreeRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteResourceTreeResult call() throws Exception { DeleteResourceTreeResult result = null; try { result = executeDeleteResourceTree(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 deleteWhatIfAnalysisAsync(DeleteWhatIfAnalysisRequest request) { return deleteWhatIfAnalysisAsync(request, null); } @Override public java.util.concurrent.Future deleteWhatIfAnalysisAsync(final DeleteWhatIfAnalysisRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteWhatIfAnalysisRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteWhatIfAnalysisResult call() throws Exception { DeleteWhatIfAnalysisResult result = null; try { result = executeDeleteWhatIfAnalysis(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 deleteWhatIfForecastAsync(DeleteWhatIfForecastRequest request) { return deleteWhatIfForecastAsync(request, null); } @Override public java.util.concurrent.Future deleteWhatIfForecastAsync(final DeleteWhatIfForecastRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteWhatIfForecastRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteWhatIfForecastResult call() throws Exception { DeleteWhatIfForecastResult result = null; try { result = executeDeleteWhatIfForecast(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 deleteWhatIfForecastExportAsync(DeleteWhatIfForecastExportRequest request) { return deleteWhatIfForecastExportAsync(request, null); } @Override public java.util.concurrent.Future deleteWhatIfForecastExportAsync(final DeleteWhatIfForecastExportRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteWhatIfForecastExportRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteWhatIfForecastExportResult call() throws Exception { DeleteWhatIfForecastExportResult result = null; try { result = executeDeleteWhatIfForecastExport(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 describeAutoPredictorAsync(DescribeAutoPredictorRequest request) { return describeAutoPredictorAsync(request, null); } @Override public java.util.concurrent.Future describeAutoPredictorAsync(final DescribeAutoPredictorRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeAutoPredictorRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeAutoPredictorResult call() throws Exception { DescribeAutoPredictorResult result = null; try { result = executeDescribeAutoPredictor(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 describeDatasetAsync(DescribeDatasetRequest request) { return describeDatasetAsync(request, null); } @Override public java.util.concurrent.Future describeDatasetAsync(final DescribeDatasetRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeDatasetRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeDatasetResult call() throws Exception { DescribeDatasetResult result = null; try { result = executeDescribeDataset(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 describeDatasetGroupAsync(DescribeDatasetGroupRequest request) { return describeDatasetGroupAsync(request, null); } @Override public java.util.concurrent.Future describeDatasetGroupAsync(final DescribeDatasetGroupRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeDatasetGroupRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeDatasetGroupResult call() throws Exception { DescribeDatasetGroupResult result = null; try { result = executeDescribeDatasetGroup(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 describeDatasetImportJobAsync(DescribeDatasetImportJobRequest request) { return describeDatasetImportJobAsync(request, null); } @Override public java.util.concurrent.Future describeDatasetImportJobAsync(final DescribeDatasetImportJobRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeDatasetImportJobRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeDatasetImportJobResult call() throws Exception { DescribeDatasetImportJobResult result = null; try { result = executeDescribeDatasetImportJob(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 describeExplainabilityAsync(DescribeExplainabilityRequest request) { return describeExplainabilityAsync(request, null); } @Override public java.util.concurrent.Future describeExplainabilityAsync(final DescribeExplainabilityRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeExplainabilityRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeExplainabilityResult call() throws Exception { DescribeExplainabilityResult result = null; try { result = executeDescribeExplainability(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 describeExplainabilityExportAsync(DescribeExplainabilityExportRequest request) { return describeExplainabilityExportAsync(request, null); } @Override public java.util.concurrent.Future describeExplainabilityExportAsync(final DescribeExplainabilityExportRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeExplainabilityExportRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeExplainabilityExportResult call() throws Exception { DescribeExplainabilityExportResult result = null; try { result = executeDescribeExplainabilityExport(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 describeForecastAsync(DescribeForecastRequest request) { return describeForecastAsync(request, null); } @Override public java.util.concurrent.Future describeForecastAsync(final DescribeForecastRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeForecastRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeForecastResult call() throws Exception { DescribeForecastResult result = null; try { result = executeDescribeForecast(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 describeForecastExportJobAsync(DescribeForecastExportJobRequest request) { return describeForecastExportJobAsync(request, null); } @Override public java.util.concurrent.Future describeForecastExportJobAsync(final DescribeForecastExportJobRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeForecastExportJobRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeForecastExportJobResult call() throws Exception { DescribeForecastExportJobResult result = null; try { result = executeDescribeForecastExportJob(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 describeMonitorAsync(DescribeMonitorRequest request) { return describeMonitorAsync(request, null); } @Override public java.util.concurrent.Future describeMonitorAsync(final DescribeMonitorRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeMonitorRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeMonitorResult call() throws Exception { DescribeMonitorResult result = null; try { result = executeDescribeMonitor(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 describePredictorAsync(DescribePredictorRequest request) { return describePredictorAsync(request, null); } @Override public java.util.concurrent.Future describePredictorAsync(final DescribePredictorRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribePredictorRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribePredictorResult call() throws Exception { DescribePredictorResult result = null; try { result = executeDescribePredictor(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 describePredictorBacktestExportJobAsync( DescribePredictorBacktestExportJobRequest request) { return describePredictorBacktestExportJobAsync(request, null); } @Override public java.util.concurrent.Future describePredictorBacktestExportJobAsync( final DescribePredictorBacktestExportJobRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribePredictorBacktestExportJobRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribePredictorBacktestExportJobResult call() throws Exception { DescribePredictorBacktestExportJobResult result = null; try { result = executeDescribePredictorBacktestExportJob(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 describeWhatIfAnalysisAsync(DescribeWhatIfAnalysisRequest request) { return describeWhatIfAnalysisAsync(request, null); } @Override public java.util.concurrent.Future describeWhatIfAnalysisAsync(final DescribeWhatIfAnalysisRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeWhatIfAnalysisRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeWhatIfAnalysisResult call() throws Exception { DescribeWhatIfAnalysisResult result = null; try { result = executeDescribeWhatIfAnalysis(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 describeWhatIfForecastAsync(DescribeWhatIfForecastRequest request) { return describeWhatIfForecastAsync(request, null); } @Override public java.util.concurrent.Future describeWhatIfForecastAsync(final DescribeWhatIfForecastRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeWhatIfForecastRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeWhatIfForecastResult call() throws Exception { DescribeWhatIfForecastResult result = null; try { result = executeDescribeWhatIfForecast(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 describeWhatIfForecastExportAsync(DescribeWhatIfForecastExportRequest request) { return describeWhatIfForecastExportAsync(request, null); } @Override public java.util.concurrent.Future describeWhatIfForecastExportAsync(final DescribeWhatIfForecastExportRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeWhatIfForecastExportRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeWhatIfForecastExportResult call() throws Exception { DescribeWhatIfForecastExportResult result = null; try { result = executeDescribeWhatIfForecastExport(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 getAccuracyMetricsAsync(GetAccuracyMetricsRequest request) { return getAccuracyMetricsAsync(request, null); } @Override public java.util.concurrent.Future getAccuracyMetricsAsync(final GetAccuracyMetricsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetAccuracyMetricsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetAccuracyMetricsResult call() throws Exception { GetAccuracyMetricsResult result = null; try { result = executeGetAccuracyMetrics(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 listDatasetGroupsAsync(ListDatasetGroupsRequest request) { return listDatasetGroupsAsync(request, null); } @Override public java.util.concurrent.Future listDatasetGroupsAsync(final ListDatasetGroupsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListDatasetGroupsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListDatasetGroupsResult call() throws Exception { ListDatasetGroupsResult result = null; try { result = executeListDatasetGroups(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 listDatasetImportJobsAsync(ListDatasetImportJobsRequest request) { return listDatasetImportJobsAsync(request, null); } @Override public java.util.concurrent.Future listDatasetImportJobsAsync(final ListDatasetImportJobsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListDatasetImportJobsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListDatasetImportJobsResult call() throws Exception { ListDatasetImportJobsResult result = null; try { result = executeListDatasetImportJobs(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 listExplainabilitiesAsync(ListExplainabilitiesRequest request) { return listExplainabilitiesAsync(request, null); } @Override public java.util.concurrent.Future listExplainabilitiesAsync(final ListExplainabilitiesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListExplainabilitiesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListExplainabilitiesResult call() throws Exception { ListExplainabilitiesResult result = null; try { result = executeListExplainabilities(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 listExplainabilityExportsAsync(ListExplainabilityExportsRequest request) { return listExplainabilityExportsAsync(request, null); } @Override public java.util.concurrent.Future listExplainabilityExportsAsync(final ListExplainabilityExportsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListExplainabilityExportsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListExplainabilityExportsResult call() throws Exception { ListExplainabilityExportsResult result = null; try { result = executeListExplainabilityExports(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 listForecastExportJobsAsync(ListForecastExportJobsRequest request) { return listForecastExportJobsAsync(request, null); } @Override public java.util.concurrent.Future listForecastExportJobsAsync(final ListForecastExportJobsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListForecastExportJobsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListForecastExportJobsResult call() throws Exception { ListForecastExportJobsResult result = null; try { result = executeListForecastExportJobs(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 listForecastsAsync(ListForecastsRequest request) { return listForecastsAsync(request, null); } @Override public java.util.concurrent.Future listForecastsAsync(final ListForecastsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListForecastsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListForecastsResult call() throws Exception { ListForecastsResult result = null; try { result = executeListForecasts(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 listMonitorEvaluationsAsync(ListMonitorEvaluationsRequest request) { return listMonitorEvaluationsAsync(request, null); } @Override public java.util.concurrent.Future listMonitorEvaluationsAsync(final ListMonitorEvaluationsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListMonitorEvaluationsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListMonitorEvaluationsResult call() throws Exception { ListMonitorEvaluationsResult result = null; try { result = executeListMonitorEvaluations(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 listMonitorsAsync(ListMonitorsRequest request) { return listMonitorsAsync(request, null); } @Override public java.util.concurrent.Future listMonitorsAsync(final ListMonitorsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListMonitorsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListMonitorsResult call() throws Exception { ListMonitorsResult result = null; try { result = executeListMonitors(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 listPredictorBacktestExportJobsAsync( ListPredictorBacktestExportJobsRequest request) { return listPredictorBacktestExportJobsAsync(request, null); } @Override public java.util.concurrent.Future listPredictorBacktestExportJobsAsync( final ListPredictorBacktestExportJobsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListPredictorBacktestExportJobsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListPredictorBacktestExportJobsResult call() throws Exception { ListPredictorBacktestExportJobsResult result = null; try { result = executeListPredictorBacktestExportJobs(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 listPredictorsAsync(ListPredictorsRequest request) { return listPredictorsAsync(request, null); } @Override public java.util.concurrent.Future listPredictorsAsync(final ListPredictorsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListPredictorsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListPredictorsResult call() throws Exception { ListPredictorsResult result = null; try { result = executeListPredictors(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 listWhatIfAnalysesAsync(ListWhatIfAnalysesRequest request) { return listWhatIfAnalysesAsync(request, null); } @Override public java.util.concurrent.Future listWhatIfAnalysesAsync(final ListWhatIfAnalysesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListWhatIfAnalysesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListWhatIfAnalysesResult call() throws Exception { ListWhatIfAnalysesResult result = null; try { result = executeListWhatIfAnalyses(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 listWhatIfForecastExportsAsync(ListWhatIfForecastExportsRequest request) { return listWhatIfForecastExportsAsync(request, null); } @Override public java.util.concurrent.Future listWhatIfForecastExportsAsync(final ListWhatIfForecastExportsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListWhatIfForecastExportsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListWhatIfForecastExportsResult call() throws Exception { ListWhatIfForecastExportsResult result = null; try { result = executeListWhatIfForecastExports(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 listWhatIfForecastsAsync(ListWhatIfForecastsRequest request) { return listWhatIfForecastsAsync(request, null); } @Override public java.util.concurrent.Future listWhatIfForecastsAsync(final ListWhatIfForecastsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListWhatIfForecastsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListWhatIfForecastsResult call() throws Exception { ListWhatIfForecastsResult result = null; try { result = executeListWhatIfForecasts(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 resumeResourceAsync(ResumeResourceRequest request) { return resumeResourceAsync(request, null); } @Override public java.util.concurrent.Future resumeResourceAsync(final ResumeResourceRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ResumeResourceRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ResumeResourceResult call() throws Exception { ResumeResourceResult result = null; try { result = executeResumeResource(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 stopResourceAsync(StopResourceRequest request) { return stopResourceAsync(request, null); } @Override public java.util.concurrent.Future stopResourceAsync(final StopResourceRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final StopResourceRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public StopResourceResult call() throws Exception { StopResourceResult result = null; try { result = executeStopResource(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 updateDatasetGroupAsync(UpdateDatasetGroupRequest request) { return updateDatasetGroupAsync(request, null); } @Override public java.util.concurrent.Future updateDatasetGroupAsync(final UpdateDatasetGroupRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateDatasetGroupRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateDatasetGroupResult call() throws Exception { UpdateDatasetGroupResult result = null; try { result = executeUpdateDatasetGroup(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