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

com.amazonaws.services.lookoutequipment.AmazonLookoutEquipmentAsyncClient Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon Lookout for Equipment module holds the client classes that are used for communicating with Amazon Lookout for Equipment 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.lookoutequipment;

import javax.annotation.Generated;

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

import java.util.concurrent.ExecutorService;

/**
 * Client for accessing LookoutEquipment 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 Lookout for Equipment is a machine learning service that uses advanced analytics to identify anomalies in * machines from sensor data for use in predictive maintenance. *

*/ @ThreadSafe @Generated("com.amazonaws:aws-java-sdk-code-generator") public class AmazonLookoutEquipmentAsyncClient extends AmazonLookoutEquipmentClient implements AmazonLookoutEquipmentAsync { private static final int DEFAULT_THREAD_POOL_SIZE = 50; private final java.util.concurrent.ExecutorService executorService; public static AmazonLookoutEquipmentAsyncClientBuilder asyncBuilder() { return AmazonLookoutEquipmentAsyncClientBuilder.standard(); } /** * Constructs a new asynchronous client to invoke service methods on LookoutEquipment using the specified * parameters. * * @param asyncClientParams * Object providing client parameters. */ AmazonLookoutEquipmentAsyncClient(AwsAsyncClientParams asyncClientParams) { this(asyncClientParams, false); } /** * Constructs a new asynchronous client to invoke service methods on LookoutEquipment using the specified * parameters. * * @param asyncClientParams * Object providing client parameters. * @param endpointDiscoveryEnabled * true will enable endpoint discovery if the service supports it. */ AmazonLookoutEquipmentAsyncClient(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 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 createInferenceSchedulerAsync(CreateInferenceSchedulerRequest request) { return createInferenceSchedulerAsync(request, null); } @Override public java.util.concurrent.Future createInferenceSchedulerAsync(final CreateInferenceSchedulerRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateInferenceSchedulerRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateInferenceSchedulerResult call() throws Exception { CreateInferenceSchedulerResult result = null; try { result = executeCreateInferenceScheduler(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 createLabelAsync(CreateLabelRequest request) { return createLabelAsync(request, null); } @Override public java.util.concurrent.Future createLabelAsync(final CreateLabelRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateLabelRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateLabelResult call() throws Exception { CreateLabelResult result = null; try { result = executeCreateLabel(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 createLabelGroupAsync(CreateLabelGroupRequest request) { return createLabelGroupAsync(request, null); } @Override public java.util.concurrent.Future createLabelGroupAsync(final CreateLabelGroupRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateLabelGroupRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateLabelGroupResult call() throws Exception { CreateLabelGroupResult result = null; try { result = executeCreateLabelGroup(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 createModelAsync(CreateModelRequest request) { return createModelAsync(request, null); } @Override public java.util.concurrent.Future createModelAsync(final CreateModelRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateModelRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateModelResult call() throws Exception { CreateModelResult result = null; try { result = executeCreateModel(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 createRetrainingSchedulerAsync(CreateRetrainingSchedulerRequest request) { return createRetrainingSchedulerAsync(request, null); } @Override public java.util.concurrent.Future createRetrainingSchedulerAsync(final CreateRetrainingSchedulerRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateRetrainingSchedulerRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateRetrainingSchedulerResult call() throws Exception { CreateRetrainingSchedulerResult result = null; try { result = executeCreateRetrainingScheduler(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 deleteInferenceSchedulerAsync(DeleteInferenceSchedulerRequest request) { return deleteInferenceSchedulerAsync(request, null); } @Override public java.util.concurrent.Future deleteInferenceSchedulerAsync(final DeleteInferenceSchedulerRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteInferenceSchedulerRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteInferenceSchedulerResult call() throws Exception { DeleteInferenceSchedulerResult result = null; try { result = executeDeleteInferenceScheduler(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 deleteLabelAsync(DeleteLabelRequest request) { return deleteLabelAsync(request, null); } @Override public java.util.concurrent.Future deleteLabelAsync(final DeleteLabelRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteLabelRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteLabelResult call() throws Exception { DeleteLabelResult result = null; try { result = executeDeleteLabel(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 deleteLabelGroupAsync(DeleteLabelGroupRequest request) { return deleteLabelGroupAsync(request, null); } @Override public java.util.concurrent.Future deleteLabelGroupAsync(final DeleteLabelGroupRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteLabelGroupRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteLabelGroupResult call() throws Exception { DeleteLabelGroupResult result = null; try { result = executeDeleteLabelGroup(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 deleteModelAsync(DeleteModelRequest request) { return deleteModelAsync(request, null); } @Override public java.util.concurrent.Future deleteModelAsync(final DeleteModelRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteModelRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteModelResult call() throws Exception { DeleteModelResult result = null; try { result = executeDeleteModel(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 deleteResourcePolicyAsync(DeleteResourcePolicyRequest request) { return deleteResourcePolicyAsync(request, null); } @Override public java.util.concurrent.Future deleteResourcePolicyAsync(final DeleteResourcePolicyRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteResourcePolicyRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteResourcePolicyResult call() throws Exception { DeleteResourcePolicyResult result = null; try { result = executeDeleteResourcePolicy(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 deleteRetrainingSchedulerAsync(DeleteRetrainingSchedulerRequest request) { return deleteRetrainingSchedulerAsync(request, null); } @Override public java.util.concurrent.Future deleteRetrainingSchedulerAsync(final DeleteRetrainingSchedulerRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteRetrainingSchedulerRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteRetrainingSchedulerResult call() throws Exception { DeleteRetrainingSchedulerResult result = null; try { result = executeDeleteRetrainingScheduler(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 describeDataIngestionJobAsync(DescribeDataIngestionJobRequest request) { return describeDataIngestionJobAsync(request, null); } @Override public java.util.concurrent.Future describeDataIngestionJobAsync(final DescribeDataIngestionJobRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeDataIngestionJobRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeDataIngestionJobResult call() throws Exception { DescribeDataIngestionJobResult result = null; try { result = executeDescribeDataIngestionJob(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 describeInferenceSchedulerAsync(DescribeInferenceSchedulerRequest request) { return describeInferenceSchedulerAsync(request, null); } @Override public java.util.concurrent.Future describeInferenceSchedulerAsync(final DescribeInferenceSchedulerRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeInferenceSchedulerRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeInferenceSchedulerResult call() throws Exception { DescribeInferenceSchedulerResult result = null; try { result = executeDescribeInferenceScheduler(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 describeLabelAsync(DescribeLabelRequest request) { return describeLabelAsync(request, null); } @Override public java.util.concurrent.Future describeLabelAsync(final DescribeLabelRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeLabelRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeLabelResult call() throws Exception { DescribeLabelResult result = null; try { result = executeDescribeLabel(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 describeLabelGroupAsync(DescribeLabelGroupRequest request) { return describeLabelGroupAsync(request, null); } @Override public java.util.concurrent.Future describeLabelGroupAsync(final DescribeLabelGroupRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeLabelGroupRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeLabelGroupResult call() throws Exception { DescribeLabelGroupResult result = null; try { result = executeDescribeLabelGroup(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 describeModelAsync(DescribeModelRequest request) { return describeModelAsync(request, null); } @Override public java.util.concurrent.Future describeModelAsync(final DescribeModelRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeModelRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeModelResult call() throws Exception { DescribeModelResult result = null; try { result = executeDescribeModel(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 describeModelVersionAsync(DescribeModelVersionRequest request) { return describeModelVersionAsync(request, null); } @Override public java.util.concurrent.Future describeModelVersionAsync(final DescribeModelVersionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeModelVersionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeModelVersionResult call() throws Exception { DescribeModelVersionResult result = null; try { result = executeDescribeModelVersion(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 describeResourcePolicyAsync(DescribeResourcePolicyRequest request) { return describeResourcePolicyAsync(request, null); } @Override public java.util.concurrent.Future describeResourcePolicyAsync(final DescribeResourcePolicyRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeResourcePolicyRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeResourcePolicyResult call() throws Exception { DescribeResourcePolicyResult result = null; try { result = executeDescribeResourcePolicy(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 describeRetrainingSchedulerAsync(DescribeRetrainingSchedulerRequest request) { return describeRetrainingSchedulerAsync(request, null); } @Override public java.util.concurrent.Future describeRetrainingSchedulerAsync(final DescribeRetrainingSchedulerRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeRetrainingSchedulerRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeRetrainingSchedulerResult call() throws Exception { DescribeRetrainingSchedulerResult result = null; try { result = executeDescribeRetrainingScheduler(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 importDatasetAsync(ImportDatasetRequest request) { return importDatasetAsync(request, null); } @Override public java.util.concurrent.Future importDatasetAsync(final ImportDatasetRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ImportDatasetRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ImportDatasetResult call() throws Exception { ImportDatasetResult result = null; try { result = executeImportDataset(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 importModelVersionAsync(ImportModelVersionRequest request) { return importModelVersionAsync(request, null); } @Override public java.util.concurrent.Future importModelVersionAsync(final ImportModelVersionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ImportModelVersionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ImportModelVersionResult call() throws Exception { ImportModelVersionResult result = null; try { result = executeImportModelVersion(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 listDataIngestionJobsAsync(ListDataIngestionJobsRequest request) { return listDataIngestionJobsAsync(request, null); } @Override public java.util.concurrent.Future listDataIngestionJobsAsync(final ListDataIngestionJobsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListDataIngestionJobsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListDataIngestionJobsResult call() throws Exception { ListDataIngestionJobsResult result = null; try { result = executeListDataIngestionJobs(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 listInferenceEventsAsync(ListInferenceEventsRequest request) { return listInferenceEventsAsync(request, null); } @Override public java.util.concurrent.Future listInferenceEventsAsync(final ListInferenceEventsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListInferenceEventsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListInferenceEventsResult call() throws Exception { ListInferenceEventsResult result = null; try { result = executeListInferenceEvents(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 listInferenceExecutionsAsync(ListInferenceExecutionsRequest request) { return listInferenceExecutionsAsync(request, null); } @Override public java.util.concurrent.Future listInferenceExecutionsAsync(final ListInferenceExecutionsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListInferenceExecutionsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListInferenceExecutionsResult call() throws Exception { ListInferenceExecutionsResult result = null; try { result = executeListInferenceExecutions(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 listInferenceSchedulersAsync(ListInferenceSchedulersRequest request) { return listInferenceSchedulersAsync(request, null); } @Override public java.util.concurrent.Future listInferenceSchedulersAsync(final ListInferenceSchedulersRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListInferenceSchedulersRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListInferenceSchedulersResult call() throws Exception { ListInferenceSchedulersResult result = null; try { result = executeListInferenceSchedulers(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 listLabelGroupsAsync(ListLabelGroupsRequest request) { return listLabelGroupsAsync(request, null); } @Override public java.util.concurrent.Future listLabelGroupsAsync(final ListLabelGroupsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListLabelGroupsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListLabelGroupsResult call() throws Exception { ListLabelGroupsResult result = null; try { result = executeListLabelGroups(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 listLabelsAsync(ListLabelsRequest request) { return listLabelsAsync(request, null); } @Override public java.util.concurrent.Future listLabelsAsync(final ListLabelsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListLabelsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListLabelsResult call() throws Exception { ListLabelsResult result = null; try { result = executeListLabels(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 listModelVersionsAsync(ListModelVersionsRequest request) { return listModelVersionsAsync(request, null); } @Override public java.util.concurrent.Future listModelVersionsAsync(final ListModelVersionsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListModelVersionsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListModelVersionsResult call() throws Exception { ListModelVersionsResult result = null; try { result = executeListModelVersions(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 listModelsAsync(ListModelsRequest request) { return listModelsAsync(request, null); } @Override public java.util.concurrent.Future listModelsAsync(final ListModelsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListModelsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListModelsResult call() throws Exception { ListModelsResult result = null; try { result = executeListModels(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 listRetrainingSchedulersAsync(ListRetrainingSchedulersRequest request) { return listRetrainingSchedulersAsync(request, null); } @Override public java.util.concurrent.Future listRetrainingSchedulersAsync(final ListRetrainingSchedulersRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListRetrainingSchedulersRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListRetrainingSchedulersResult call() throws Exception { ListRetrainingSchedulersResult result = null; try { result = executeListRetrainingSchedulers(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 listSensorStatisticsAsync(ListSensorStatisticsRequest request) { return listSensorStatisticsAsync(request, null); } @Override public java.util.concurrent.Future listSensorStatisticsAsync(final ListSensorStatisticsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListSensorStatisticsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListSensorStatisticsResult call() throws Exception { ListSensorStatisticsResult result = null; try { result = executeListSensorStatistics(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 putResourcePolicyAsync(PutResourcePolicyRequest request) { return putResourcePolicyAsync(request, null); } @Override public java.util.concurrent.Future putResourcePolicyAsync(final PutResourcePolicyRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final PutResourcePolicyRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public PutResourcePolicyResult call() throws Exception { PutResourcePolicyResult result = null; try { result = executePutResourcePolicy(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 startDataIngestionJobAsync(StartDataIngestionJobRequest request) { return startDataIngestionJobAsync(request, null); } @Override public java.util.concurrent.Future startDataIngestionJobAsync(final StartDataIngestionJobRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final StartDataIngestionJobRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public StartDataIngestionJobResult call() throws Exception { StartDataIngestionJobResult result = null; try { result = executeStartDataIngestionJob(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 startInferenceSchedulerAsync(StartInferenceSchedulerRequest request) { return startInferenceSchedulerAsync(request, null); } @Override public java.util.concurrent.Future startInferenceSchedulerAsync(final StartInferenceSchedulerRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final StartInferenceSchedulerRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public StartInferenceSchedulerResult call() throws Exception { StartInferenceSchedulerResult result = null; try { result = executeStartInferenceScheduler(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 startRetrainingSchedulerAsync(StartRetrainingSchedulerRequest request) { return startRetrainingSchedulerAsync(request, null); } @Override public java.util.concurrent.Future startRetrainingSchedulerAsync(final StartRetrainingSchedulerRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final StartRetrainingSchedulerRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public StartRetrainingSchedulerResult call() throws Exception { StartRetrainingSchedulerResult result = null; try { result = executeStartRetrainingScheduler(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 stopInferenceSchedulerAsync(StopInferenceSchedulerRequest request) { return stopInferenceSchedulerAsync(request, null); } @Override public java.util.concurrent.Future stopInferenceSchedulerAsync(final StopInferenceSchedulerRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final StopInferenceSchedulerRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public StopInferenceSchedulerResult call() throws Exception { StopInferenceSchedulerResult result = null; try { result = executeStopInferenceScheduler(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 stopRetrainingSchedulerAsync(StopRetrainingSchedulerRequest request) { return stopRetrainingSchedulerAsync(request, null); } @Override public java.util.concurrent.Future stopRetrainingSchedulerAsync(final StopRetrainingSchedulerRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final StopRetrainingSchedulerRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public StopRetrainingSchedulerResult call() throws Exception { StopRetrainingSchedulerResult result = null; try { result = executeStopRetrainingScheduler(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 updateActiveModelVersionAsync(UpdateActiveModelVersionRequest request) { return updateActiveModelVersionAsync(request, null); } @Override public java.util.concurrent.Future updateActiveModelVersionAsync(final UpdateActiveModelVersionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateActiveModelVersionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateActiveModelVersionResult call() throws Exception { UpdateActiveModelVersionResult result = null; try { result = executeUpdateActiveModelVersion(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 updateInferenceSchedulerAsync(UpdateInferenceSchedulerRequest request) { return updateInferenceSchedulerAsync(request, null); } @Override public java.util.concurrent.Future updateInferenceSchedulerAsync(final UpdateInferenceSchedulerRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateInferenceSchedulerRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateInferenceSchedulerResult call() throws Exception { UpdateInferenceSchedulerResult result = null; try { result = executeUpdateInferenceScheduler(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 updateLabelGroupAsync(UpdateLabelGroupRequest request) { return updateLabelGroupAsync(request, null); } @Override public java.util.concurrent.Future updateLabelGroupAsync(final UpdateLabelGroupRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateLabelGroupRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateLabelGroupResult call() throws Exception { UpdateLabelGroupResult result = null; try { result = executeUpdateLabelGroup(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 updateModelAsync(UpdateModelRequest request) { return updateModelAsync(request, null); } @Override public java.util.concurrent.Future updateModelAsync(final UpdateModelRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateModelRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateModelResult call() throws Exception { UpdateModelResult result = null; try { result = executeUpdateModel(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 updateRetrainingSchedulerAsync(UpdateRetrainingSchedulerRequest request) { return updateRetrainingSchedulerAsync(request, null); } @Override public java.util.concurrent.Future updateRetrainingSchedulerAsync(final UpdateRetrainingSchedulerRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateRetrainingSchedulerRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateRetrainingSchedulerResult call() throws Exception { UpdateRetrainingSchedulerResult result = null; try { result = executeUpdateRetrainingScheduler(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