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

com.amazonaws.services.elasticmapreduce.AmazonElasticMapReduceAsyncClient Maven / Gradle / Ivy

Go to download

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

There is a newer version: 1.12.780
Show newest version
/*
 * Copyright 2017-2022 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.elasticmapreduce;

import static java.util.concurrent.Executors.newFixedThreadPool;

import javax.annotation.Generated;

import com.amazonaws.services.elasticmapreduce.model.*;
import com.amazonaws.client.AwsAsyncClientParams;
import com.amazonaws.annotation.ThreadSafe;
import com.amazonaws.ClientConfiguration;
import com.amazonaws.auth.AWSCredentials;
import com.amazonaws.auth.AWSCredentialsProvider;
import java.util.concurrent.ExecutorService;
import com.amazonaws.auth.DefaultAWSCredentialsProviderChain;

/**
 * Client for accessing Amazon EMR 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 EMR is a web service that makes it easier to process large amounts of data efficiently. Amazon EMR uses Hadoop * processing combined with several Amazon Web Services services to do tasks such as web indexing, data mining, log file * analysis, machine learning, scientific simulation, and data warehouse management. *

*/ @ThreadSafe @Generated("com.amazonaws:aws-java-sdk-code-generator") public class AmazonElasticMapReduceAsyncClient extends AmazonElasticMapReduceClient implements AmazonElasticMapReduceAsync { private static final int DEFAULT_THREAD_POOL_SIZE = 50; private final java.util.concurrent.ExecutorService executorService; /** * Constructs a new asynchronous client to invoke service methods on Amazon EMR. A credentials provider chain will * be used that searches for credentials in this order: *
    *
  • Environment Variables - AWS_ACCESS_KEY_ID and AWS_SECRET_KEY
  • *
  • Java System Properties - aws.accessKeyId and aws.secretKey
  • *
  • Credential profiles file at the default location (~/.aws/credentials) shared by all AWS SDKs and the AWS CLI
  • *
  • Instance profile credentials delivered through the Amazon EC2 metadata service
  • *
*

* Asynchronous methods are delegated to a fixed-size thread pool containing 50 threads (to match the default * maximum number of concurrent connections to the service). * * @see com.amazonaws.auth.DefaultAWSCredentialsProviderChain * @see java.util.concurrent.Executors#newFixedThreadPool(int) * @deprecated use {@link AmazonElasticMapReduceAsyncClientBuilder#defaultClient()} */ @Deprecated public AmazonElasticMapReduceAsyncClient() { this(DefaultAWSCredentialsProviderChain.getInstance()); } /** * Constructs a new asynchronous client to invoke service methods on Amazon EMR. A credentials provider chain will * be used that searches for credentials in this order: *

    *
  • Environment Variables - AWS_ACCESS_KEY_ID and AWS_SECRET_KEY
  • *
  • Java System Properties - aws.accessKeyId and aws.secretKey
  • *
  • Credential profiles file at the default location (~/.aws/credentials) shared by all AWS SDKs and the AWS CLI
  • *
  • Instance profile credentials delivered through the Amazon EC2 metadata service
  • *
*

* Asynchronous methods are delegated to a fixed-size thread pool containing a number of threads equal to the * maximum number of concurrent connections configured via {@code ClientConfiguration.getMaxConnections()}. * * @param clientConfiguration * The client configuration options controlling how this client connects to Amazon EMR (ex: proxy settings, * retry counts, etc). * * @see com.amazonaws.auth.DefaultAWSCredentialsProviderChain * @see java.util.concurrent.Executors#newFixedThreadPool(int) * @deprecated use {@link AmazonElasticMapReduceAsyncClientBuilder#withClientConfiguration(ClientConfiguration)} */ @Deprecated public AmazonElasticMapReduceAsyncClient(ClientConfiguration clientConfiguration) { this(DefaultAWSCredentialsProviderChain.getInstance(), clientConfiguration, newFixedThreadPool(clientConfiguration.getMaxConnections())); } /** * Constructs a new asynchronous client to invoke service methods on Amazon EMR using the specified AWS account * credentials. *

* Asynchronous methods are delegated to a fixed-size thread pool containing 50 threads (to match the default * maximum number of concurrent connections to the service). * * @param awsCredentials * The AWS credentials (access key ID and secret key) to use when authenticating with AWS services. * @see java.util.concurrent.Executors#newFixedThreadPool(int) * @deprecated use {@link AmazonElasticMapReduceAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} */ @Deprecated public AmazonElasticMapReduceAsyncClient(AWSCredentials awsCredentials) { this(awsCredentials, newFixedThreadPool(DEFAULT_THREAD_POOL_SIZE)); } /** * Constructs a new asynchronous client to invoke service methods on Amazon EMR using the specified AWS account * credentials and executor service. Default client settings will be used. * * @param awsCredentials * The AWS credentials (access key ID and secret key) to use when authenticating with AWS services. * @param executorService * The executor service by which all asynchronous requests will be executed. * @deprecated use {@link AmazonElasticMapReduceAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} and * {@link AmazonElasticMapReduceAsyncClientBuilder#withExecutorFactory(com.amazonaws.client.builder.ExecutorFactory)} */ @Deprecated public AmazonElasticMapReduceAsyncClient(AWSCredentials awsCredentials, ExecutorService executorService) { this(awsCredentials, configFactory.getConfig(), executorService); } /** * Constructs a new asynchronous client to invoke service methods on Amazon EMR using the specified AWS account * credentials, executor service, and client configuration options. * * @param awsCredentials * The AWS credentials (access key ID and secret key) to use when authenticating with AWS services. * @param clientConfiguration * Client configuration options (ex: max retry limit, proxy settings, etc). * @param executorService * The executor service by which all asynchronous requests will be executed. * @deprecated use {@link AmazonElasticMapReduceAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} and * {@link AmazonElasticMapReduceAsyncClientBuilder#withClientConfiguration(ClientConfiguration)} and * {@link AmazonElasticMapReduceAsyncClientBuilder#withExecutorFactory(com.amazonaws.client.builder.ExecutorFactory)} */ @Deprecated public AmazonElasticMapReduceAsyncClient(AWSCredentials awsCredentials, ClientConfiguration clientConfiguration, ExecutorService executorService) { super(awsCredentials, clientConfiguration); this.executorService = executorService; } /** * Constructs a new asynchronous client to invoke service methods on Amazon EMR using the specified AWS account * credentials provider. Default client settings will be used. *

* Asynchronous methods are delegated to a fixed-size thread pool containing 50 threads (to match the default * maximum number of concurrent connections to the service). * * @param awsCredentialsProvider * The AWS credentials provider which will provide credentials to authenticate requests with AWS services. * @see java.util.concurrent.Executors#newFixedThreadPool(int) * @deprecated use {@link AmazonElasticMapReduceAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} */ @Deprecated public AmazonElasticMapReduceAsyncClient(AWSCredentialsProvider awsCredentialsProvider) { this(awsCredentialsProvider, newFixedThreadPool(DEFAULT_THREAD_POOL_SIZE)); } /** * Constructs a new asynchronous client to invoke service methods on Amazon EMR using the provided AWS account * credentials provider and client configuration options. *

* Asynchronous methods are delegated to a fixed-size thread pool containing a number of threads equal to the * maximum number of concurrent connections configured via {@code ClientConfiguration.getMaxConnections()}. * * @param awsCredentialsProvider * The AWS credentials provider which will provide credentials to authenticate requests with AWS services. * @param clientConfiguration * Client configuration options (ex: max retry limit, proxy settings, etc). * * @see com.amazonaws.auth.DefaultAWSCredentialsProviderChain * @see java.util.concurrent.Executors#newFixedThreadPool(int) * @deprecated use {@link AmazonElasticMapReduceAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} and * {@link AmazonElasticMapReduceAsyncClientBuilder#withClientConfiguration(ClientConfiguration)} */ @Deprecated public AmazonElasticMapReduceAsyncClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration) { this(awsCredentialsProvider, clientConfiguration, newFixedThreadPool(clientConfiguration.getMaxConnections())); } /** * Constructs a new asynchronous client to invoke service methods on Amazon EMR using the specified AWS account * credentials provider and executor service. Default client settings will be used. * * @param awsCredentialsProvider * The AWS credentials provider which will provide credentials to authenticate requests with AWS services. * @param executorService * The executor service by which all asynchronous requests will be executed. * @deprecated use {@link AmazonElasticMapReduceAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} and * {@link AmazonElasticMapReduceAsyncClientBuilder#withExecutorFactory(com.amazonaws.client.builder.ExecutorFactory)} */ @Deprecated public AmazonElasticMapReduceAsyncClient(AWSCredentialsProvider awsCredentialsProvider, ExecutorService executorService) { this(awsCredentialsProvider, configFactory.getConfig(), executorService); } /** * Constructs a new asynchronous client to invoke service methods on Amazon EMR using the specified AWS account * credentials provider, executor service, and client configuration options. * * @param awsCredentialsProvider * The AWS credentials provider which will provide credentials to authenticate requests with AWS services. * @param clientConfiguration * Client configuration options (ex: max retry limit, proxy settings, etc). * @param executorService * The executor service by which all asynchronous requests will be executed. * @deprecated use {@link AmazonElasticMapReduceAsyncClientBuilder#withCredentials(AWSCredentialsProvider)} and * {@link AmazonElasticMapReduceAsyncClientBuilder#withClientConfiguration(ClientConfiguration)} and * {@link AmazonElasticMapReduceAsyncClientBuilder#withExecutorFactory(com.amazonaws.client.builder.ExecutorFactory)} */ @Deprecated public AmazonElasticMapReduceAsyncClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration, ExecutorService executorService) { super(awsCredentialsProvider, clientConfiguration); this.executorService = executorService; } public static AmazonElasticMapReduceAsyncClientBuilder asyncBuilder() { return AmazonElasticMapReduceAsyncClientBuilder.standard(); } /** * Constructs a new asynchronous client to invoke service methods on Amazon EMR using the specified parameters. * * @param asyncClientParams * Object providing client parameters. */ AmazonElasticMapReduceAsyncClient(AwsAsyncClientParams asyncClientParams) { this(asyncClientParams, false); } /** * Constructs a new asynchronous client to invoke service methods on Amazon EMR using the specified parameters. * * @param asyncClientParams * Object providing client parameters. * @param endpointDiscoveryEnabled * true will enable endpoint discovery if the service supports it. */ AmazonElasticMapReduceAsyncClient(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 addInstanceFleetAsync(AddInstanceFleetRequest request) { return addInstanceFleetAsync(request, null); } @Override public java.util.concurrent.Future addInstanceFleetAsync(final AddInstanceFleetRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final AddInstanceFleetRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public AddInstanceFleetResult call() throws Exception { AddInstanceFleetResult result = null; try { result = executeAddInstanceFleet(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 addInstanceGroupsAsync(AddInstanceGroupsRequest request) { return addInstanceGroupsAsync(request, null); } @Override public java.util.concurrent.Future addInstanceGroupsAsync(final AddInstanceGroupsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final AddInstanceGroupsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public AddInstanceGroupsResult call() throws Exception { AddInstanceGroupsResult result = null; try { result = executeAddInstanceGroups(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 addJobFlowStepsAsync(AddJobFlowStepsRequest request) { return addJobFlowStepsAsync(request, null); } @Override public java.util.concurrent.Future addJobFlowStepsAsync(final AddJobFlowStepsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final AddJobFlowStepsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public AddJobFlowStepsResult call() throws Exception { AddJobFlowStepsResult result = null; try { result = executeAddJobFlowSteps(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 addTagsAsync(AddTagsRequest request) { return addTagsAsync(request, null); } @Override public java.util.concurrent.Future addTagsAsync(final AddTagsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final AddTagsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public AddTagsResult call() throws Exception { AddTagsResult result = null; try { result = executeAddTags(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 cancelStepsAsync(CancelStepsRequest request) { return cancelStepsAsync(request, null); } @Override public java.util.concurrent.Future cancelStepsAsync(final CancelStepsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CancelStepsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CancelStepsResult call() throws Exception { CancelStepsResult result = null; try { result = executeCancelSteps(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 createSecurityConfigurationAsync(CreateSecurityConfigurationRequest request) { return createSecurityConfigurationAsync(request, null); } @Override public java.util.concurrent.Future createSecurityConfigurationAsync(final CreateSecurityConfigurationRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateSecurityConfigurationRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateSecurityConfigurationResult call() throws Exception { CreateSecurityConfigurationResult result = null; try { result = executeCreateSecurityConfiguration(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 createStudioAsync(CreateStudioRequest request) { return createStudioAsync(request, null); } @Override public java.util.concurrent.Future createStudioAsync(final CreateStudioRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateStudioRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateStudioResult call() throws Exception { CreateStudioResult result = null; try { result = executeCreateStudio(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 createStudioSessionMappingAsync(CreateStudioSessionMappingRequest request) { return createStudioSessionMappingAsync(request, null); } @Override public java.util.concurrent.Future createStudioSessionMappingAsync(final CreateStudioSessionMappingRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateStudioSessionMappingRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateStudioSessionMappingResult call() throws Exception { CreateStudioSessionMappingResult result = null; try { result = executeCreateStudioSessionMapping(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 deleteSecurityConfigurationAsync(DeleteSecurityConfigurationRequest request) { return deleteSecurityConfigurationAsync(request, null); } @Override public java.util.concurrent.Future deleteSecurityConfigurationAsync(final DeleteSecurityConfigurationRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteSecurityConfigurationRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteSecurityConfigurationResult call() throws Exception { DeleteSecurityConfigurationResult result = null; try { result = executeDeleteSecurityConfiguration(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 deleteStudioAsync(DeleteStudioRequest request) { return deleteStudioAsync(request, null); } @Override public java.util.concurrent.Future deleteStudioAsync(final DeleteStudioRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteStudioRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteStudioResult call() throws Exception { DeleteStudioResult result = null; try { result = executeDeleteStudio(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 deleteStudioSessionMappingAsync(DeleteStudioSessionMappingRequest request) { return deleteStudioSessionMappingAsync(request, null); } @Override public java.util.concurrent.Future deleteStudioSessionMappingAsync(final DeleteStudioSessionMappingRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteStudioSessionMappingRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteStudioSessionMappingResult call() throws Exception { DeleteStudioSessionMappingResult result = null; try { result = executeDeleteStudioSessionMapping(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 describeClusterAsync(DescribeClusterRequest request) { return describeClusterAsync(request, null); } @Override public java.util.concurrent.Future describeClusterAsync(final DescribeClusterRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeClusterRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeClusterResult call() throws Exception { DescribeClusterResult result = null; try { result = executeDescribeCluster(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override @Deprecated public java.util.concurrent.Future describeJobFlowsAsync(DescribeJobFlowsRequest request) { return describeJobFlowsAsync(request, null); } @Override @Deprecated public java.util.concurrent.Future describeJobFlowsAsync(final DescribeJobFlowsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeJobFlowsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeJobFlowsResult call() throws Exception { DescribeJobFlowsResult result = null; try { result = executeDescribeJobFlows(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } /** * Simplified method form for invoking the DescribeJobFlows operation. * * @see #describeJobFlowsAsync(DescribeJobFlowsRequest) */ @Override @Deprecated public java.util.concurrent.Future describeJobFlowsAsync() { return describeJobFlowsAsync(new DescribeJobFlowsRequest()); } /** * Simplified method form for invoking the DescribeJobFlows operation with an AsyncHandler. * * @see #describeJobFlowsAsync(DescribeJobFlowsRequest, com.amazonaws.handlers.AsyncHandler) */ @Override @Deprecated public java.util.concurrent.Future describeJobFlowsAsync( com.amazonaws.handlers.AsyncHandler asyncHandler) { return describeJobFlowsAsync(new DescribeJobFlowsRequest(), asyncHandler); } @Override public java.util.concurrent.Future describeNotebookExecutionAsync(DescribeNotebookExecutionRequest request) { return describeNotebookExecutionAsync(request, null); } @Override public java.util.concurrent.Future describeNotebookExecutionAsync(final DescribeNotebookExecutionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeNotebookExecutionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeNotebookExecutionResult call() throws Exception { DescribeNotebookExecutionResult result = null; try { result = executeDescribeNotebookExecution(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 describeReleaseLabelAsync(DescribeReleaseLabelRequest request) { return describeReleaseLabelAsync(request, null); } @Override public java.util.concurrent.Future describeReleaseLabelAsync(final DescribeReleaseLabelRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeReleaseLabelRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeReleaseLabelResult call() throws Exception { DescribeReleaseLabelResult result = null; try { result = executeDescribeReleaseLabel(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 describeSecurityConfigurationAsync(DescribeSecurityConfigurationRequest request) { return describeSecurityConfigurationAsync(request, null); } @Override public java.util.concurrent.Future describeSecurityConfigurationAsync( final DescribeSecurityConfigurationRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeSecurityConfigurationRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeSecurityConfigurationResult call() throws Exception { DescribeSecurityConfigurationResult result = null; try { result = executeDescribeSecurityConfiguration(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 describeStepAsync(DescribeStepRequest request) { return describeStepAsync(request, null); } @Override public java.util.concurrent.Future describeStepAsync(final DescribeStepRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeStepRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeStepResult call() throws Exception { DescribeStepResult result = null; try { result = executeDescribeStep(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 describeStudioAsync(DescribeStudioRequest request) { return describeStudioAsync(request, null); } @Override public java.util.concurrent.Future describeStudioAsync(final DescribeStudioRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeStudioRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeStudioResult call() throws Exception { DescribeStudioResult result = null; try { result = executeDescribeStudio(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 getAutoTerminationPolicyAsync(GetAutoTerminationPolicyRequest request) { return getAutoTerminationPolicyAsync(request, null); } @Override public java.util.concurrent.Future getAutoTerminationPolicyAsync(final GetAutoTerminationPolicyRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetAutoTerminationPolicyRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetAutoTerminationPolicyResult call() throws Exception { GetAutoTerminationPolicyResult result = null; try { result = executeGetAutoTerminationPolicy(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 getBlockPublicAccessConfigurationAsync( GetBlockPublicAccessConfigurationRequest request) { return getBlockPublicAccessConfigurationAsync(request, null); } @Override public java.util.concurrent.Future getBlockPublicAccessConfigurationAsync( final GetBlockPublicAccessConfigurationRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetBlockPublicAccessConfigurationRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetBlockPublicAccessConfigurationResult call() throws Exception { GetBlockPublicAccessConfigurationResult result = null; try { result = executeGetBlockPublicAccessConfiguration(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 getManagedScalingPolicyAsync(GetManagedScalingPolicyRequest request) { return getManagedScalingPolicyAsync(request, null); } @Override public java.util.concurrent.Future getManagedScalingPolicyAsync(final GetManagedScalingPolicyRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetManagedScalingPolicyRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetManagedScalingPolicyResult call() throws Exception { GetManagedScalingPolicyResult result = null; try { result = executeGetManagedScalingPolicy(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 getStudioSessionMappingAsync(GetStudioSessionMappingRequest request) { return getStudioSessionMappingAsync(request, null); } @Override public java.util.concurrent.Future getStudioSessionMappingAsync(final GetStudioSessionMappingRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final GetStudioSessionMappingRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public GetStudioSessionMappingResult call() throws Exception { GetStudioSessionMappingResult result = null; try { result = executeGetStudioSessionMapping(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 listBootstrapActionsAsync(ListBootstrapActionsRequest request) { return listBootstrapActionsAsync(request, null); } @Override public java.util.concurrent.Future listBootstrapActionsAsync(final ListBootstrapActionsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListBootstrapActionsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListBootstrapActionsResult call() throws Exception { ListBootstrapActionsResult result = null; try { result = executeListBootstrapActions(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 listClustersAsync(ListClustersRequest request) { return listClustersAsync(request, null); } @Override public java.util.concurrent.Future listClustersAsync(final ListClustersRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListClustersRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListClustersResult call() throws Exception { ListClustersResult result = null; try { result = executeListClusters(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } /** * Simplified method form for invoking the ListClusters operation. * * @see #listClustersAsync(ListClustersRequest) */ @Override public java.util.concurrent.Future listClustersAsync() { return listClustersAsync(new ListClustersRequest()); } /** * Simplified method form for invoking the ListClusters operation with an AsyncHandler. * * @see #listClustersAsync(ListClustersRequest, com.amazonaws.handlers.AsyncHandler) */ @Override public java.util.concurrent.Future listClustersAsync( com.amazonaws.handlers.AsyncHandler asyncHandler) { return listClustersAsync(new ListClustersRequest(), asyncHandler); } @Override public java.util.concurrent.Future listInstanceFleetsAsync(ListInstanceFleetsRequest request) { return listInstanceFleetsAsync(request, null); } @Override public java.util.concurrent.Future listInstanceFleetsAsync(final ListInstanceFleetsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListInstanceFleetsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListInstanceFleetsResult call() throws Exception { ListInstanceFleetsResult result = null; try { result = executeListInstanceFleets(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 listInstanceGroupsAsync(ListInstanceGroupsRequest request) { return listInstanceGroupsAsync(request, null); } @Override public java.util.concurrent.Future listInstanceGroupsAsync(final ListInstanceGroupsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListInstanceGroupsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListInstanceGroupsResult call() throws Exception { ListInstanceGroupsResult result = null; try { result = executeListInstanceGroups(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 listInstancesAsync(ListInstancesRequest request) { return listInstancesAsync(request, null); } @Override public java.util.concurrent.Future listInstancesAsync(final ListInstancesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListInstancesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListInstancesResult call() throws Exception { ListInstancesResult result = null; try { result = executeListInstances(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 listNotebookExecutionsAsync(ListNotebookExecutionsRequest request) { return listNotebookExecutionsAsync(request, null); } @Override public java.util.concurrent.Future listNotebookExecutionsAsync(final ListNotebookExecutionsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListNotebookExecutionsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListNotebookExecutionsResult call() throws Exception { ListNotebookExecutionsResult result = null; try { result = executeListNotebookExecutions(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 listReleaseLabelsAsync(ListReleaseLabelsRequest request) { return listReleaseLabelsAsync(request, null); } @Override public java.util.concurrent.Future listReleaseLabelsAsync(final ListReleaseLabelsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListReleaseLabelsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListReleaseLabelsResult call() throws Exception { ListReleaseLabelsResult result = null; try { result = executeListReleaseLabels(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 listSecurityConfigurationsAsync(ListSecurityConfigurationsRequest request) { return listSecurityConfigurationsAsync(request, null); } @Override public java.util.concurrent.Future listSecurityConfigurationsAsync(final ListSecurityConfigurationsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListSecurityConfigurationsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListSecurityConfigurationsResult call() throws Exception { ListSecurityConfigurationsResult result = null; try { result = executeListSecurityConfigurations(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 listStepsAsync(ListStepsRequest request) { return listStepsAsync(request, null); } @Override public java.util.concurrent.Future listStepsAsync(final ListStepsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListStepsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListStepsResult call() throws Exception { ListStepsResult result = null; try { result = executeListSteps(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 listStudioSessionMappingsAsync(ListStudioSessionMappingsRequest request) { return listStudioSessionMappingsAsync(request, null); } @Override public java.util.concurrent.Future listStudioSessionMappingsAsync(final ListStudioSessionMappingsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListStudioSessionMappingsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListStudioSessionMappingsResult call() throws Exception { ListStudioSessionMappingsResult result = null; try { result = executeListStudioSessionMappings(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 listStudiosAsync(ListStudiosRequest request) { return listStudiosAsync(request, null); } @Override public java.util.concurrent.Future listStudiosAsync(final ListStudiosRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ListStudiosRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ListStudiosResult call() throws Exception { ListStudiosResult result = null; try { result = executeListStudios(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 modifyClusterAsync(ModifyClusterRequest request) { return modifyClusterAsync(request, null); } @Override public java.util.concurrent.Future modifyClusterAsync(final ModifyClusterRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ModifyClusterRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ModifyClusterResult call() throws Exception { ModifyClusterResult result = null; try { result = executeModifyCluster(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 modifyInstanceFleetAsync(ModifyInstanceFleetRequest request) { return modifyInstanceFleetAsync(request, null); } @Override public java.util.concurrent.Future modifyInstanceFleetAsync(final ModifyInstanceFleetRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ModifyInstanceFleetRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ModifyInstanceFleetResult call() throws Exception { ModifyInstanceFleetResult result = null; try { result = executeModifyInstanceFleet(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 modifyInstanceGroupsAsync(ModifyInstanceGroupsRequest request) { return modifyInstanceGroupsAsync(request, null); } @Override public java.util.concurrent.Future modifyInstanceGroupsAsync(final ModifyInstanceGroupsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ModifyInstanceGroupsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ModifyInstanceGroupsResult call() throws Exception { ModifyInstanceGroupsResult result = null; try { result = executeModifyInstanceGroups(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } /** * Simplified method form for invoking the ModifyInstanceGroups operation. * * @see #modifyInstanceGroupsAsync(ModifyInstanceGroupsRequest) */ @Override public java.util.concurrent.Future modifyInstanceGroupsAsync() { return modifyInstanceGroupsAsync(new ModifyInstanceGroupsRequest()); } /** * Simplified method form for invoking the ModifyInstanceGroups operation with an AsyncHandler. * * @see #modifyInstanceGroupsAsync(ModifyInstanceGroupsRequest, com.amazonaws.handlers.AsyncHandler) */ @Override public java.util.concurrent.Future modifyInstanceGroupsAsync( com.amazonaws.handlers.AsyncHandler asyncHandler) { return modifyInstanceGroupsAsync(new ModifyInstanceGroupsRequest(), asyncHandler); } @Override public java.util.concurrent.Future putAutoScalingPolicyAsync(PutAutoScalingPolicyRequest request) { return putAutoScalingPolicyAsync(request, null); } @Override public java.util.concurrent.Future putAutoScalingPolicyAsync(final PutAutoScalingPolicyRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final PutAutoScalingPolicyRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public PutAutoScalingPolicyResult call() throws Exception { PutAutoScalingPolicyResult result = null; try { result = executePutAutoScalingPolicy(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 putAutoTerminationPolicyAsync(PutAutoTerminationPolicyRequest request) { return putAutoTerminationPolicyAsync(request, null); } @Override public java.util.concurrent.Future putAutoTerminationPolicyAsync(final PutAutoTerminationPolicyRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final PutAutoTerminationPolicyRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public PutAutoTerminationPolicyResult call() throws Exception { PutAutoTerminationPolicyResult result = null; try { result = executePutAutoTerminationPolicy(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 putBlockPublicAccessConfigurationAsync( PutBlockPublicAccessConfigurationRequest request) { return putBlockPublicAccessConfigurationAsync(request, null); } @Override public java.util.concurrent.Future putBlockPublicAccessConfigurationAsync( final PutBlockPublicAccessConfigurationRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final PutBlockPublicAccessConfigurationRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public PutBlockPublicAccessConfigurationResult call() throws Exception { PutBlockPublicAccessConfigurationResult result = null; try { result = executePutBlockPublicAccessConfiguration(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 putManagedScalingPolicyAsync(PutManagedScalingPolicyRequest request) { return putManagedScalingPolicyAsync(request, null); } @Override public java.util.concurrent.Future putManagedScalingPolicyAsync(final PutManagedScalingPolicyRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final PutManagedScalingPolicyRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public PutManagedScalingPolicyResult call() throws Exception { PutManagedScalingPolicyResult result = null; try { result = executePutManagedScalingPolicy(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 removeAutoScalingPolicyAsync(RemoveAutoScalingPolicyRequest request) { return removeAutoScalingPolicyAsync(request, null); } @Override public java.util.concurrent.Future removeAutoScalingPolicyAsync(final RemoveAutoScalingPolicyRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final RemoveAutoScalingPolicyRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public RemoveAutoScalingPolicyResult call() throws Exception { RemoveAutoScalingPolicyResult result = null; try { result = executeRemoveAutoScalingPolicy(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 removeAutoTerminationPolicyAsync(RemoveAutoTerminationPolicyRequest request) { return removeAutoTerminationPolicyAsync(request, null); } @Override public java.util.concurrent.Future removeAutoTerminationPolicyAsync(final RemoveAutoTerminationPolicyRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final RemoveAutoTerminationPolicyRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public RemoveAutoTerminationPolicyResult call() throws Exception { RemoveAutoTerminationPolicyResult result = null; try { result = executeRemoveAutoTerminationPolicy(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 removeManagedScalingPolicyAsync(RemoveManagedScalingPolicyRequest request) { return removeManagedScalingPolicyAsync(request, null); } @Override public java.util.concurrent.Future removeManagedScalingPolicyAsync(final RemoveManagedScalingPolicyRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final RemoveManagedScalingPolicyRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public RemoveManagedScalingPolicyResult call() throws Exception { RemoveManagedScalingPolicyResult result = null; try { result = executeRemoveManagedScalingPolicy(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 removeTagsAsync(RemoveTagsRequest request) { return removeTagsAsync(request, null); } @Override public java.util.concurrent.Future removeTagsAsync(final RemoveTagsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final RemoveTagsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public RemoveTagsResult call() throws Exception { RemoveTagsResult result = null; try { result = executeRemoveTags(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 runJobFlowAsync(RunJobFlowRequest request) { return runJobFlowAsync(request, null); } @Override public java.util.concurrent.Future runJobFlowAsync(final RunJobFlowRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final RunJobFlowRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public RunJobFlowResult call() throws Exception { RunJobFlowResult result = null; try { result = executeRunJobFlow(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 setTerminationProtectionAsync(SetTerminationProtectionRequest request) { return setTerminationProtectionAsync(request, null); } @Override public java.util.concurrent.Future setTerminationProtectionAsync(final SetTerminationProtectionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final SetTerminationProtectionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public SetTerminationProtectionResult call() throws Exception { SetTerminationProtectionResult result = null; try { result = executeSetTerminationProtection(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 setVisibleToAllUsersAsync(SetVisibleToAllUsersRequest request) { return setVisibleToAllUsersAsync(request, null); } @Override public java.util.concurrent.Future setVisibleToAllUsersAsync(final SetVisibleToAllUsersRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final SetVisibleToAllUsersRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public SetVisibleToAllUsersResult call() throws Exception { SetVisibleToAllUsersResult result = null; try { result = executeSetVisibleToAllUsers(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 startNotebookExecutionAsync(StartNotebookExecutionRequest request) { return startNotebookExecutionAsync(request, null); } @Override public java.util.concurrent.Future startNotebookExecutionAsync(final StartNotebookExecutionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final StartNotebookExecutionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public StartNotebookExecutionResult call() throws Exception { StartNotebookExecutionResult result = null; try { result = executeStartNotebookExecution(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 stopNotebookExecutionAsync(StopNotebookExecutionRequest request) { return stopNotebookExecutionAsync(request, null); } @Override public java.util.concurrent.Future stopNotebookExecutionAsync(final StopNotebookExecutionRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final StopNotebookExecutionRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public StopNotebookExecutionResult call() throws Exception { StopNotebookExecutionResult result = null; try { result = executeStopNotebookExecution(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 terminateJobFlowsAsync(TerminateJobFlowsRequest request) { return terminateJobFlowsAsync(request, null); } @Override public java.util.concurrent.Future terminateJobFlowsAsync(final TerminateJobFlowsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final TerminateJobFlowsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public TerminateJobFlowsResult call() throws Exception { TerminateJobFlowsResult result = null; try { result = executeTerminateJobFlows(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 updateStudioAsync(UpdateStudioRequest request) { return updateStudioAsync(request, null); } @Override public java.util.concurrent.Future updateStudioAsync(final UpdateStudioRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateStudioRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateStudioResult call() throws Exception { UpdateStudioResult result = null; try { result = executeUpdateStudio(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 updateStudioSessionMappingAsync(UpdateStudioSessionMappingRequest request) { return updateStudioSessionMappingAsync(request, null); } @Override public java.util.concurrent.Future updateStudioSessionMappingAsync(final UpdateStudioSessionMappingRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateStudioSessionMappingRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateStudioSessionMappingResult call() throws Exception { UpdateStudioSessionMappingResult result = null; try { result = executeUpdateStudioSessionMapping(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