com.amazonaws.services.datasync.AWSDataSyncAsyncClient Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aws-java-sdk-datasync Show documentation
Show all versions of aws-java-sdk-datasync Show documentation
The AWS Java SDK for AWS DataSync module holds the client classes that are used for communicating with AWS DataSync Service
/*
* 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.datasync;
import javax.annotation.Generated;
import com.amazonaws.services.datasync.model.*;
import com.amazonaws.client.AwsAsyncClientParams;
import com.amazonaws.annotation.ThreadSafe;
import java.util.concurrent.ExecutorService;
/**
* Client for accessing DataSync 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.
*
* DataSync
*
* DataSync is an online data movement and discovery service that simplifies data migration and helps you quickly,
* easily, and securely transfer your file or object data to, from, and between Amazon Web Services storage services.
*
*
* This API interface reference includes documentation for using DataSync programmatically. For complete information,
* see the DataSync User
* Guide .
*
*/
@ThreadSafe
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class AWSDataSyncAsyncClient extends AWSDataSyncClient implements AWSDataSyncAsync {
private static final int DEFAULT_THREAD_POOL_SIZE = 50;
private final java.util.concurrent.ExecutorService executorService;
public static AWSDataSyncAsyncClientBuilder asyncBuilder() {
return AWSDataSyncAsyncClientBuilder.standard();
}
/**
* Constructs a new asynchronous client to invoke service methods on DataSync using the specified parameters.
*
* @param asyncClientParams
* Object providing client parameters.
*/
AWSDataSyncAsyncClient(AwsAsyncClientParams asyncClientParams) {
this(asyncClientParams, false);
}
/**
* Constructs a new asynchronous client to invoke service methods on DataSync using the specified parameters.
*
* @param asyncClientParams
* Object providing client parameters.
* @param endpointDiscoveryEnabled
* true will enable endpoint discovery if the service supports it.
*/
AWSDataSyncAsyncClient(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 addStorageSystemAsync(AddStorageSystemRequest request) {
return addStorageSystemAsync(request, null);
}
@Override
public java.util.concurrent.Future addStorageSystemAsync(final AddStorageSystemRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final AddStorageSystemRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public AddStorageSystemResult call() throws Exception {
AddStorageSystemResult result = null;
try {
result = executeAddStorageSystem(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 cancelTaskExecutionAsync(CancelTaskExecutionRequest request) {
return cancelTaskExecutionAsync(request, null);
}
@Override
public java.util.concurrent.Future cancelTaskExecutionAsync(final CancelTaskExecutionRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CancelTaskExecutionRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CancelTaskExecutionResult call() throws Exception {
CancelTaskExecutionResult result = null;
try {
result = executeCancelTaskExecution(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 createAgentAsync(CreateAgentRequest request) {
return createAgentAsync(request, null);
}
@Override
public java.util.concurrent.Future createAgentAsync(final CreateAgentRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateAgentRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateAgentResult call() throws Exception {
CreateAgentResult result = null;
try {
result = executeCreateAgent(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 createLocationAzureBlobAsync(CreateLocationAzureBlobRequest request) {
return createLocationAzureBlobAsync(request, null);
}
@Override
public java.util.concurrent.Future createLocationAzureBlobAsync(final CreateLocationAzureBlobRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateLocationAzureBlobRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateLocationAzureBlobResult call() throws Exception {
CreateLocationAzureBlobResult result = null;
try {
result = executeCreateLocationAzureBlob(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 createLocationEfsAsync(CreateLocationEfsRequest request) {
return createLocationEfsAsync(request, null);
}
@Override
public java.util.concurrent.Future createLocationEfsAsync(final CreateLocationEfsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateLocationEfsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateLocationEfsResult call() throws Exception {
CreateLocationEfsResult result = null;
try {
result = executeCreateLocationEfs(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 createLocationFsxLustreAsync(CreateLocationFsxLustreRequest request) {
return createLocationFsxLustreAsync(request, null);
}
@Override
public java.util.concurrent.Future createLocationFsxLustreAsync(final CreateLocationFsxLustreRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateLocationFsxLustreRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateLocationFsxLustreResult call() throws Exception {
CreateLocationFsxLustreResult result = null;
try {
result = executeCreateLocationFsxLustre(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 createLocationFsxOntapAsync(CreateLocationFsxOntapRequest request) {
return createLocationFsxOntapAsync(request, null);
}
@Override
public java.util.concurrent.Future createLocationFsxOntapAsync(final CreateLocationFsxOntapRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateLocationFsxOntapRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateLocationFsxOntapResult call() throws Exception {
CreateLocationFsxOntapResult result = null;
try {
result = executeCreateLocationFsxOntap(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 createLocationFsxOpenZfsAsync(CreateLocationFsxOpenZfsRequest request) {
return createLocationFsxOpenZfsAsync(request, null);
}
@Override
public java.util.concurrent.Future createLocationFsxOpenZfsAsync(final CreateLocationFsxOpenZfsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateLocationFsxOpenZfsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateLocationFsxOpenZfsResult call() throws Exception {
CreateLocationFsxOpenZfsResult result = null;
try {
result = executeCreateLocationFsxOpenZfs(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 createLocationFsxWindowsAsync(CreateLocationFsxWindowsRequest request) {
return createLocationFsxWindowsAsync(request, null);
}
@Override
public java.util.concurrent.Future createLocationFsxWindowsAsync(final CreateLocationFsxWindowsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateLocationFsxWindowsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateLocationFsxWindowsResult call() throws Exception {
CreateLocationFsxWindowsResult result = null;
try {
result = executeCreateLocationFsxWindows(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 createLocationHdfsAsync(CreateLocationHdfsRequest request) {
return createLocationHdfsAsync(request, null);
}
@Override
public java.util.concurrent.Future createLocationHdfsAsync(final CreateLocationHdfsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateLocationHdfsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateLocationHdfsResult call() throws Exception {
CreateLocationHdfsResult result = null;
try {
result = executeCreateLocationHdfs(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 createLocationNfsAsync(CreateLocationNfsRequest request) {
return createLocationNfsAsync(request, null);
}
@Override
public java.util.concurrent.Future createLocationNfsAsync(final CreateLocationNfsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateLocationNfsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateLocationNfsResult call() throws Exception {
CreateLocationNfsResult result = null;
try {
result = executeCreateLocationNfs(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 createLocationObjectStorageAsync(CreateLocationObjectStorageRequest request) {
return createLocationObjectStorageAsync(request, null);
}
@Override
public java.util.concurrent.Future createLocationObjectStorageAsync(final CreateLocationObjectStorageRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateLocationObjectStorageRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateLocationObjectStorageResult call() throws Exception {
CreateLocationObjectStorageResult result = null;
try {
result = executeCreateLocationObjectStorage(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 createLocationS3Async(CreateLocationS3Request request) {
return createLocationS3Async(request, null);
}
@Override
public java.util.concurrent.Future createLocationS3Async(final CreateLocationS3Request request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateLocationS3Request finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateLocationS3Result call() throws Exception {
CreateLocationS3Result result = null;
try {
result = executeCreateLocationS3(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 createLocationSmbAsync(CreateLocationSmbRequest request) {
return createLocationSmbAsync(request, null);
}
@Override
public java.util.concurrent.Future createLocationSmbAsync(final CreateLocationSmbRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateLocationSmbRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateLocationSmbResult call() throws Exception {
CreateLocationSmbResult result = null;
try {
result = executeCreateLocationSmb(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 createTaskAsync(CreateTaskRequest request) {
return createTaskAsync(request, null);
}
@Override
public java.util.concurrent.Future createTaskAsync(final CreateTaskRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final CreateTaskRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public CreateTaskResult call() throws Exception {
CreateTaskResult result = null;
try {
result = executeCreateTask(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 deleteAgentAsync(DeleteAgentRequest request) {
return deleteAgentAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteAgentAsync(final DeleteAgentRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteAgentRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteAgentResult call() throws Exception {
DeleteAgentResult result = null;
try {
result = executeDeleteAgent(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 deleteLocationAsync(DeleteLocationRequest request) {
return deleteLocationAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteLocationAsync(final DeleteLocationRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteLocationRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteLocationResult call() throws Exception {
DeleteLocationResult result = null;
try {
result = executeDeleteLocation(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 deleteTaskAsync(DeleteTaskRequest request) {
return deleteTaskAsync(request, null);
}
@Override
public java.util.concurrent.Future deleteTaskAsync(final DeleteTaskRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DeleteTaskRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DeleteTaskResult call() throws Exception {
DeleteTaskResult result = null;
try {
result = executeDeleteTask(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 describeAgentAsync(DescribeAgentRequest request) {
return describeAgentAsync(request, null);
}
@Override
public java.util.concurrent.Future describeAgentAsync(final DescribeAgentRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeAgentRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeAgentResult call() throws Exception {
DescribeAgentResult result = null;
try {
result = executeDescribeAgent(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 describeDiscoveryJobAsync(DescribeDiscoveryJobRequest request) {
return describeDiscoveryJobAsync(request, null);
}
@Override
public java.util.concurrent.Future describeDiscoveryJobAsync(final DescribeDiscoveryJobRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeDiscoveryJobRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeDiscoveryJobResult call() throws Exception {
DescribeDiscoveryJobResult result = null;
try {
result = executeDescribeDiscoveryJob(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 describeLocationAzureBlobAsync(DescribeLocationAzureBlobRequest request) {
return describeLocationAzureBlobAsync(request, null);
}
@Override
public java.util.concurrent.Future describeLocationAzureBlobAsync(final DescribeLocationAzureBlobRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeLocationAzureBlobRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeLocationAzureBlobResult call() throws Exception {
DescribeLocationAzureBlobResult result = null;
try {
result = executeDescribeLocationAzureBlob(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 describeLocationEfsAsync(DescribeLocationEfsRequest request) {
return describeLocationEfsAsync(request, null);
}
@Override
public java.util.concurrent.Future describeLocationEfsAsync(final DescribeLocationEfsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeLocationEfsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeLocationEfsResult call() throws Exception {
DescribeLocationEfsResult result = null;
try {
result = executeDescribeLocationEfs(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 describeLocationFsxLustreAsync(DescribeLocationFsxLustreRequest request) {
return describeLocationFsxLustreAsync(request, null);
}
@Override
public java.util.concurrent.Future describeLocationFsxLustreAsync(final DescribeLocationFsxLustreRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeLocationFsxLustreRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeLocationFsxLustreResult call() throws Exception {
DescribeLocationFsxLustreResult result = null;
try {
result = executeDescribeLocationFsxLustre(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 describeLocationFsxOntapAsync(DescribeLocationFsxOntapRequest request) {
return describeLocationFsxOntapAsync(request, null);
}
@Override
public java.util.concurrent.Future describeLocationFsxOntapAsync(final DescribeLocationFsxOntapRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeLocationFsxOntapRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeLocationFsxOntapResult call() throws Exception {
DescribeLocationFsxOntapResult result = null;
try {
result = executeDescribeLocationFsxOntap(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 describeLocationFsxOpenZfsAsync(DescribeLocationFsxOpenZfsRequest request) {
return describeLocationFsxOpenZfsAsync(request, null);
}
@Override
public java.util.concurrent.Future describeLocationFsxOpenZfsAsync(final DescribeLocationFsxOpenZfsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeLocationFsxOpenZfsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeLocationFsxOpenZfsResult call() throws Exception {
DescribeLocationFsxOpenZfsResult result = null;
try {
result = executeDescribeLocationFsxOpenZfs(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 describeLocationFsxWindowsAsync(DescribeLocationFsxWindowsRequest request) {
return describeLocationFsxWindowsAsync(request, null);
}
@Override
public java.util.concurrent.Future describeLocationFsxWindowsAsync(final DescribeLocationFsxWindowsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeLocationFsxWindowsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeLocationFsxWindowsResult call() throws Exception {
DescribeLocationFsxWindowsResult result = null;
try {
result = executeDescribeLocationFsxWindows(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 describeLocationHdfsAsync(DescribeLocationHdfsRequest request) {
return describeLocationHdfsAsync(request, null);
}
@Override
public java.util.concurrent.Future describeLocationHdfsAsync(final DescribeLocationHdfsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeLocationHdfsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeLocationHdfsResult call() throws Exception {
DescribeLocationHdfsResult result = null;
try {
result = executeDescribeLocationHdfs(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 describeLocationNfsAsync(DescribeLocationNfsRequest request) {
return describeLocationNfsAsync(request, null);
}
@Override
public java.util.concurrent.Future describeLocationNfsAsync(final DescribeLocationNfsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeLocationNfsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeLocationNfsResult call() throws Exception {
DescribeLocationNfsResult result = null;
try {
result = executeDescribeLocationNfs(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 describeLocationObjectStorageAsync(DescribeLocationObjectStorageRequest request) {
return describeLocationObjectStorageAsync(request, null);
}
@Override
public java.util.concurrent.Future describeLocationObjectStorageAsync(
final DescribeLocationObjectStorageRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeLocationObjectStorageRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeLocationObjectStorageResult call() throws Exception {
DescribeLocationObjectStorageResult result = null;
try {
result = executeDescribeLocationObjectStorage(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 describeLocationS3Async(DescribeLocationS3Request request) {
return describeLocationS3Async(request, null);
}
@Override
public java.util.concurrent.Future describeLocationS3Async(final DescribeLocationS3Request request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeLocationS3Request finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeLocationS3Result call() throws Exception {
DescribeLocationS3Result result = null;
try {
result = executeDescribeLocationS3(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 describeLocationSmbAsync(DescribeLocationSmbRequest request) {
return describeLocationSmbAsync(request, null);
}
@Override
public java.util.concurrent.Future describeLocationSmbAsync(final DescribeLocationSmbRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeLocationSmbRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeLocationSmbResult call() throws Exception {
DescribeLocationSmbResult result = null;
try {
result = executeDescribeLocationSmb(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 describeStorageSystemAsync(DescribeStorageSystemRequest request) {
return describeStorageSystemAsync(request, null);
}
@Override
public java.util.concurrent.Future describeStorageSystemAsync(final DescribeStorageSystemRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeStorageSystemRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeStorageSystemResult call() throws Exception {
DescribeStorageSystemResult result = null;
try {
result = executeDescribeStorageSystem(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 describeStorageSystemResourceMetricsAsync(
DescribeStorageSystemResourceMetricsRequest request) {
return describeStorageSystemResourceMetricsAsync(request, null);
}
@Override
public java.util.concurrent.Future describeStorageSystemResourceMetricsAsync(
final DescribeStorageSystemResourceMetricsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeStorageSystemResourceMetricsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeStorageSystemResourceMetricsResult call() throws Exception {
DescribeStorageSystemResourceMetricsResult result = null;
try {
result = executeDescribeStorageSystemResourceMetrics(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 describeStorageSystemResourcesAsync(DescribeStorageSystemResourcesRequest request) {
return describeStorageSystemResourcesAsync(request, null);
}
@Override
public java.util.concurrent.Future describeStorageSystemResourcesAsync(
final DescribeStorageSystemResourcesRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeStorageSystemResourcesRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeStorageSystemResourcesResult call() throws Exception {
DescribeStorageSystemResourcesResult result = null;
try {
result = executeDescribeStorageSystemResources(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 describeTaskAsync(DescribeTaskRequest request) {
return describeTaskAsync(request, null);
}
@Override
public java.util.concurrent.Future describeTaskAsync(final DescribeTaskRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeTaskRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeTaskResult call() throws Exception {
DescribeTaskResult result = null;
try {
result = executeDescribeTask(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 describeTaskExecutionAsync(DescribeTaskExecutionRequest request) {
return describeTaskExecutionAsync(request, null);
}
@Override
public java.util.concurrent.Future describeTaskExecutionAsync(final DescribeTaskExecutionRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final DescribeTaskExecutionRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public DescribeTaskExecutionResult call() throws Exception {
DescribeTaskExecutionResult result = null;
try {
result = executeDescribeTaskExecution(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 generateRecommendationsAsync(GenerateRecommendationsRequest request) {
return generateRecommendationsAsync(request, null);
}
@Override
public java.util.concurrent.Future generateRecommendationsAsync(final GenerateRecommendationsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final GenerateRecommendationsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public GenerateRecommendationsResult call() throws Exception {
GenerateRecommendationsResult result = null;
try {
result = executeGenerateRecommendations(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 listAgentsAsync(ListAgentsRequest request) {
return listAgentsAsync(request, null);
}
@Override
public java.util.concurrent.Future listAgentsAsync(final ListAgentsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListAgentsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListAgentsResult call() throws Exception {
ListAgentsResult result = null;
try {
result = executeListAgents(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 listDiscoveryJobsAsync(ListDiscoveryJobsRequest request) {
return listDiscoveryJobsAsync(request, null);
}
@Override
public java.util.concurrent.Future listDiscoveryJobsAsync(final ListDiscoveryJobsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListDiscoveryJobsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListDiscoveryJobsResult call() throws Exception {
ListDiscoveryJobsResult result = null;
try {
result = executeListDiscoveryJobs(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 listLocationsAsync(ListLocationsRequest request) {
return listLocationsAsync(request, null);
}
@Override
public java.util.concurrent.Future listLocationsAsync(final ListLocationsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListLocationsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListLocationsResult call() throws Exception {
ListLocationsResult result = null;
try {
result = executeListLocations(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 listStorageSystemsAsync(ListStorageSystemsRequest request) {
return listStorageSystemsAsync(request, null);
}
@Override
public java.util.concurrent.Future listStorageSystemsAsync(final ListStorageSystemsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListStorageSystemsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListStorageSystemsResult call() throws Exception {
ListStorageSystemsResult result = null;
try {
result = executeListStorageSystems(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 listTaskExecutionsAsync(ListTaskExecutionsRequest request) {
return listTaskExecutionsAsync(request, null);
}
@Override
public java.util.concurrent.Future listTaskExecutionsAsync(final ListTaskExecutionsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListTaskExecutionsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListTaskExecutionsResult call() throws Exception {
ListTaskExecutionsResult result = null;
try {
result = executeListTaskExecutions(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 listTasksAsync(ListTasksRequest request) {
return listTasksAsync(request, null);
}
@Override
public java.util.concurrent.Future listTasksAsync(final ListTasksRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final ListTasksRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public ListTasksResult call() throws Exception {
ListTasksResult result = null;
try {
result = executeListTasks(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 removeStorageSystemAsync(RemoveStorageSystemRequest request) {
return removeStorageSystemAsync(request, null);
}
@Override
public java.util.concurrent.Future removeStorageSystemAsync(final RemoveStorageSystemRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final RemoveStorageSystemRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public RemoveStorageSystemResult call() throws Exception {
RemoveStorageSystemResult result = null;
try {
result = executeRemoveStorageSystem(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 startDiscoveryJobAsync(StartDiscoveryJobRequest request) {
return startDiscoveryJobAsync(request, null);
}
@Override
public java.util.concurrent.Future startDiscoveryJobAsync(final StartDiscoveryJobRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final StartDiscoveryJobRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public StartDiscoveryJobResult call() throws Exception {
StartDiscoveryJobResult result = null;
try {
result = executeStartDiscoveryJob(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 startTaskExecutionAsync(StartTaskExecutionRequest request) {
return startTaskExecutionAsync(request, null);
}
@Override
public java.util.concurrent.Future startTaskExecutionAsync(final StartTaskExecutionRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final StartTaskExecutionRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public StartTaskExecutionResult call() throws Exception {
StartTaskExecutionResult result = null;
try {
result = executeStartTaskExecution(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 stopDiscoveryJobAsync(StopDiscoveryJobRequest request) {
return stopDiscoveryJobAsync(request, null);
}
@Override
public java.util.concurrent.Future stopDiscoveryJobAsync(final StopDiscoveryJobRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final StopDiscoveryJobRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public StopDiscoveryJobResult call() throws Exception {
StopDiscoveryJobResult result = null;
try {
result = executeStopDiscoveryJob(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 updateAgentAsync(UpdateAgentRequest request) {
return updateAgentAsync(request, null);
}
@Override
public java.util.concurrent.Future updateAgentAsync(final UpdateAgentRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final UpdateAgentRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public UpdateAgentResult call() throws Exception {
UpdateAgentResult result = null;
try {
result = executeUpdateAgent(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 updateDiscoveryJobAsync(UpdateDiscoveryJobRequest request) {
return updateDiscoveryJobAsync(request, null);
}
@Override
public java.util.concurrent.Future updateDiscoveryJobAsync(final UpdateDiscoveryJobRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final UpdateDiscoveryJobRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public UpdateDiscoveryJobResult call() throws Exception {
UpdateDiscoveryJobResult result = null;
try {
result = executeUpdateDiscoveryJob(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 updateLocationAzureBlobAsync(UpdateLocationAzureBlobRequest request) {
return updateLocationAzureBlobAsync(request, null);
}
@Override
public java.util.concurrent.Future updateLocationAzureBlobAsync(final UpdateLocationAzureBlobRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final UpdateLocationAzureBlobRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public UpdateLocationAzureBlobResult call() throws Exception {
UpdateLocationAzureBlobResult result = null;
try {
result = executeUpdateLocationAzureBlob(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 updateLocationHdfsAsync(UpdateLocationHdfsRequest request) {
return updateLocationHdfsAsync(request, null);
}
@Override
public java.util.concurrent.Future updateLocationHdfsAsync(final UpdateLocationHdfsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final UpdateLocationHdfsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public UpdateLocationHdfsResult call() throws Exception {
UpdateLocationHdfsResult result = null;
try {
result = executeUpdateLocationHdfs(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 updateLocationNfsAsync(UpdateLocationNfsRequest request) {
return updateLocationNfsAsync(request, null);
}
@Override
public java.util.concurrent.Future updateLocationNfsAsync(final UpdateLocationNfsRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final UpdateLocationNfsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public UpdateLocationNfsResult call() throws Exception {
UpdateLocationNfsResult result = null;
try {
result = executeUpdateLocationNfs(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 updateLocationObjectStorageAsync(UpdateLocationObjectStorageRequest request) {
return updateLocationObjectStorageAsync(request, null);
}
@Override
public java.util.concurrent.Future updateLocationObjectStorageAsync(final UpdateLocationObjectStorageRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final UpdateLocationObjectStorageRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public UpdateLocationObjectStorageResult call() throws Exception {
UpdateLocationObjectStorageResult result = null;
try {
result = executeUpdateLocationObjectStorage(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 updateLocationSmbAsync(UpdateLocationSmbRequest request) {
return updateLocationSmbAsync(request, null);
}
@Override
public java.util.concurrent.Future updateLocationSmbAsync(final UpdateLocationSmbRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final UpdateLocationSmbRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public UpdateLocationSmbResult call() throws Exception {
UpdateLocationSmbResult result = null;
try {
result = executeUpdateLocationSmb(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 updateStorageSystemAsync(UpdateStorageSystemRequest request) {
return updateStorageSystemAsync(request, null);
}
@Override
public java.util.concurrent.Future updateStorageSystemAsync(final UpdateStorageSystemRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final UpdateStorageSystemRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public UpdateStorageSystemResult call() throws Exception {
UpdateStorageSystemResult result = null;
try {
result = executeUpdateStorageSystem(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 updateTaskAsync(UpdateTaskRequest request) {
return updateTaskAsync(request, null);
}
@Override
public java.util.concurrent.Future updateTaskAsync(final UpdateTaskRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final UpdateTaskRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public UpdateTaskResult call() throws Exception {
UpdateTaskResult result = null;
try {
result = executeUpdateTask(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 updateTaskExecutionAsync(UpdateTaskExecutionRequest request) {
return updateTaskExecutionAsync(request, null);
}
@Override
public java.util.concurrent.Future updateTaskExecutionAsync(final UpdateTaskExecutionRequest request,
final com.amazonaws.handlers.AsyncHandler asyncHandler) {
final UpdateTaskExecutionRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable() {
@Override
public UpdateTaskExecutionResult call() throws Exception {
UpdateTaskExecutionResult result = null;
try {
result = executeUpdateTaskExecution(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();
}
}