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

com.amazonaws.services.fsx.AmazonFSxAsyncClient Maven / Gradle / Ivy

Go to download

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

There is a newer version: 1.12.780
Show newest version
/*
 * Copyright 2019-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
 * the License. A copy of the License is located at
 * 
 * http://aws.amazon.com/apache2.0
 * 
 * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
 * and limitations under the License.
 */
package com.amazonaws.services.fsx;

import javax.annotation.Generated;

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

import java.util.concurrent.ExecutorService;

/**
 * Client for accessing Amazon FSx 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 FSx is a fully managed service that makes it easy for storage and application administrators to launch and use * shared file storage. *

*/ @ThreadSafe @Generated("com.amazonaws:aws-java-sdk-code-generator") public class AmazonFSxAsyncClient extends AmazonFSxClient implements AmazonFSxAsync { private static final int DEFAULT_THREAD_POOL_SIZE = 50; private final java.util.concurrent.ExecutorService executorService; public static AmazonFSxAsyncClientBuilder asyncBuilder() { return AmazonFSxAsyncClientBuilder.standard(); } /** * Constructs a new asynchronous client to invoke service methods on Amazon FSx using the specified parameters. * * @param asyncClientParams * Object providing client parameters. */ AmazonFSxAsyncClient(AwsAsyncClientParams asyncClientParams) { this(asyncClientParams, false); } /** * Constructs a new asynchronous client to invoke service methods on Amazon FSx using the specified parameters. * * @param asyncClientParams * Object providing client parameters. * @param endpointDiscoveryEnabled * true will enable endpoint discovery if the service supports it. */ AmazonFSxAsyncClient(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 associateFileSystemAliasesAsync(AssociateFileSystemAliasesRequest request) { return associateFileSystemAliasesAsync(request, null); } @Override public java.util.concurrent.Future associateFileSystemAliasesAsync(final AssociateFileSystemAliasesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final AssociateFileSystemAliasesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public AssociateFileSystemAliasesResult call() throws Exception { AssociateFileSystemAliasesResult result = null; try { result = executeAssociateFileSystemAliases(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future cancelDataRepositoryTaskAsync(CancelDataRepositoryTaskRequest request) { return cancelDataRepositoryTaskAsync(request, null); } @Override public java.util.concurrent.Future cancelDataRepositoryTaskAsync(final CancelDataRepositoryTaskRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CancelDataRepositoryTaskRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CancelDataRepositoryTaskResult call() throws Exception { CancelDataRepositoryTaskResult result = null; try { result = executeCancelDataRepositoryTask(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future copyBackupAsync(CopyBackupRequest request) { return copyBackupAsync(request, null); } @Override public java.util.concurrent.Future copyBackupAsync(final CopyBackupRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CopyBackupRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CopyBackupResult call() throws Exception { CopyBackupResult result = null; try { result = executeCopyBackup(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future copySnapshotAndUpdateVolumeAsync(CopySnapshotAndUpdateVolumeRequest request) { return copySnapshotAndUpdateVolumeAsync(request, null); } @Override public java.util.concurrent.Future copySnapshotAndUpdateVolumeAsync(final CopySnapshotAndUpdateVolumeRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CopySnapshotAndUpdateVolumeRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CopySnapshotAndUpdateVolumeResult call() throws Exception { CopySnapshotAndUpdateVolumeResult result = null; try { result = executeCopySnapshotAndUpdateVolume(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future createBackupAsync(CreateBackupRequest request) { return createBackupAsync(request, null); } @Override public java.util.concurrent.Future createBackupAsync(final CreateBackupRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateBackupRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateBackupResult call() throws Exception { CreateBackupResult result = null; try { result = executeCreateBackup(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future createDataRepositoryAssociationAsync( CreateDataRepositoryAssociationRequest request) { return createDataRepositoryAssociationAsync(request, null); } @Override public java.util.concurrent.Future createDataRepositoryAssociationAsync( final CreateDataRepositoryAssociationRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateDataRepositoryAssociationRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateDataRepositoryAssociationResult call() throws Exception { CreateDataRepositoryAssociationResult result = null; try { result = executeCreateDataRepositoryAssociation(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future createDataRepositoryTaskAsync(CreateDataRepositoryTaskRequest request) { return createDataRepositoryTaskAsync(request, null); } @Override public java.util.concurrent.Future createDataRepositoryTaskAsync(final CreateDataRepositoryTaskRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateDataRepositoryTaskRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateDataRepositoryTaskResult call() throws Exception { CreateDataRepositoryTaskResult result = null; try { result = executeCreateDataRepositoryTask(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future createFileCacheAsync(CreateFileCacheRequest request) { return createFileCacheAsync(request, null); } @Override public java.util.concurrent.Future createFileCacheAsync(final CreateFileCacheRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateFileCacheRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateFileCacheResult call() throws Exception { CreateFileCacheResult result = null; try { result = executeCreateFileCache(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future createFileSystemAsync(CreateFileSystemRequest request) { return createFileSystemAsync(request, null); } @Override public java.util.concurrent.Future createFileSystemAsync(final CreateFileSystemRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateFileSystemRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateFileSystemResult call() throws Exception { CreateFileSystemResult result = null; try { result = executeCreateFileSystem(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future createFileSystemFromBackupAsync(CreateFileSystemFromBackupRequest request) { return createFileSystemFromBackupAsync(request, null); } @Override public java.util.concurrent.Future createFileSystemFromBackupAsync(final CreateFileSystemFromBackupRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateFileSystemFromBackupRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateFileSystemFromBackupResult call() throws Exception { CreateFileSystemFromBackupResult result = null; try { result = executeCreateFileSystemFromBackup(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future createSnapshotAsync(CreateSnapshotRequest request) { return createSnapshotAsync(request, null); } @Override public java.util.concurrent.Future createSnapshotAsync(final CreateSnapshotRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateSnapshotRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateSnapshotResult call() throws Exception { CreateSnapshotResult result = null; try { result = executeCreateSnapshot(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future createStorageVirtualMachineAsync(CreateStorageVirtualMachineRequest request) { return createStorageVirtualMachineAsync(request, null); } @Override public java.util.concurrent.Future createStorageVirtualMachineAsync(final CreateStorageVirtualMachineRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateStorageVirtualMachineRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateStorageVirtualMachineResult call() throws Exception { CreateStorageVirtualMachineResult result = null; try { result = executeCreateStorageVirtualMachine(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future createVolumeAsync(CreateVolumeRequest request) { return createVolumeAsync(request, null); } @Override public java.util.concurrent.Future createVolumeAsync(final CreateVolumeRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateVolumeRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateVolumeResult call() throws Exception { CreateVolumeResult result = null; try { result = executeCreateVolume(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future createVolumeFromBackupAsync(CreateVolumeFromBackupRequest request) { return createVolumeFromBackupAsync(request, null); } @Override public java.util.concurrent.Future createVolumeFromBackupAsync(final CreateVolumeFromBackupRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final CreateVolumeFromBackupRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public CreateVolumeFromBackupResult call() throws Exception { CreateVolumeFromBackupResult result = null; try { result = executeCreateVolumeFromBackup(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future deleteBackupAsync(DeleteBackupRequest request) { return deleteBackupAsync(request, null); } @Override public java.util.concurrent.Future deleteBackupAsync(final DeleteBackupRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteBackupRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteBackupResult call() throws Exception { DeleteBackupResult result = null; try { result = executeDeleteBackup(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future deleteDataRepositoryAssociationAsync( DeleteDataRepositoryAssociationRequest request) { return deleteDataRepositoryAssociationAsync(request, null); } @Override public java.util.concurrent.Future deleteDataRepositoryAssociationAsync( final DeleteDataRepositoryAssociationRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteDataRepositoryAssociationRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteDataRepositoryAssociationResult call() throws Exception { DeleteDataRepositoryAssociationResult result = null; try { result = executeDeleteDataRepositoryAssociation(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future deleteFileCacheAsync(DeleteFileCacheRequest request) { return deleteFileCacheAsync(request, null); } @Override public java.util.concurrent.Future deleteFileCacheAsync(final DeleteFileCacheRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteFileCacheRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteFileCacheResult call() throws Exception { DeleteFileCacheResult result = null; try { result = executeDeleteFileCache(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future deleteFileSystemAsync(DeleteFileSystemRequest request) { return deleteFileSystemAsync(request, null); } @Override public java.util.concurrent.Future deleteFileSystemAsync(final DeleteFileSystemRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteFileSystemRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteFileSystemResult call() throws Exception { DeleteFileSystemResult result = null; try { result = executeDeleteFileSystem(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future deleteSnapshotAsync(DeleteSnapshotRequest request) { return deleteSnapshotAsync(request, null); } @Override public java.util.concurrent.Future deleteSnapshotAsync(final DeleteSnapshotRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteSnapshotRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteSnapshotResult call() throws Exception { DeleteSnapshotResult result = null; try { result = executeDeleteSnapshot(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future deleteStorageVirtualMachineAsync(DeleteStorageVirtualMachineRequest request) { return deleteStorageVirtualMachineAsync(request, null); } @Override public java.util.concurrent.Future deleteStorageVirtualMachineAsync(final DeleteStorageVirtualMachineRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteStorageVirtualMachineRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteStorageVirtualMachineResult call() throws Exception { DeleteStorageVirtualMachineResult result = null; try { result = executeDeleteStorageVirtualMachine(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future deleteVolumeAsync(DeleteVolumeRequest request) { return deleteVolumeAsync(request, null); } @Override public java.util.concurrent.Future deleteVolumeAsync(final DeleteVolumeRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DeleteVolumeRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DeleteVolumeResult call() throws Exception { DeleteVolumeResult result = null; try { result = executeDeleteVolume(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future describeBackupsAsync(DescribeBackupsRequest request) { return describeBackupsAsync(request, null); } @Override public java.util.concurrent.Future describeBackupsAsync(final DescribeBackupsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeBackupsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeBackupsResult call() throws Exception { DescribeBackupsResult result = null; try { result = executeDescribeBackups(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future describeDataRepositoryAssociationsAsync( DescribeDataRepositoryAssociationsRequest request) { return describeDataRepositoryAssociationsAsync(request, null); } @Override public java.util.concurrent.Future describeDataRepositoryAssociationsAsync( final DescribeDataRepositoryAssociationsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeDataRepositoryAssociationsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeDataRepositoryAssociationsResult call() throws Exception { DescribeDataRepositoryAssociationsResult result = null; try { result = executeDescribeDataRepositoryAssociations(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future describeDataRepositoryTasksAsync(DescribeDataRepositoryTasksRequest request) { return describeDataRepositoryTasksAsync(request, null); } @Override public java.util.concurrent.Future describeDataRepositoryTasksAsync(final DescribeDataRepositoryTasksRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeDataRepositoryTasksRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeDataRepositoryTasksResult call() throws Exception { DescribeDataRepositoryTasksResult result = null; try { result = executeDescribeDataRepositoryTasks(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future describeFileCachesAsync(DescribeFileCachesRequest request) { return describeFileCachesAsync(request, null); } @Override public java.util.concurrent.Future describeFileCachesAsync(final DescribeFileCachesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeFileCachesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeFileCachesResult call() throws Exception { DescribeFileCachesResult result = null; try { result = executeDescribeFileCaches(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future describeFileSystemAliasesAsync(DescribeFileSystemAliasesRequest request) { return describeFileSystemAliasesAsync(request, null); } @Override public java.util.concurrent.Future describeFileSystemAliasesAsync(final DescribeFileSystemAliasesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeFileSystemAliasesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeFileSystemAliasesResult call() throws Exception { DescribeFileSystemAliasesResult result = null; try { result = executeDescribeFileSystemAliases(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future describeFileSystemsAsync(DescribeFileSystemsRequest request) { return describeFileSystemsAsync(request, null); } @Override public java.util.concurrent.Future describeFileSystemsAsync(final DescribeFileSystemsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeFileSystemsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeFileSystemsResult call() throws Exception { DescribeFileSystemsResult result = null; try { result = executeDescribeFileSystems(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future describeSharedVpcConfigurationAsync(DescribeSharedVpcConfigurationRequest request) { return describeSharedVpcConfigurationAsync(request, null); } @Override public java.util.concurrent.Future describeSharedVpcConfigurationAsync( final DescribeSharedVpcConfigurationRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeSharedVpcConfigurationRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeSharedVpcConfigurationResult call() throws Exception { DescribeSharedVpcConfigurationResult result = null; try { result = executeDescribeSharedVpcConfiguration(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future describeSnapshotsAsync(DescribeSnapshotsRequest request) { return describeSnapshotsAsync(request, null); } @Override public java.util.concurrent.Future describeSnapshotsAsync(final DescribeSnapshotsRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeSnapshotsRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeSnapshotsResult call() throws Exception { DescribeSnapshotsResult result = null; try { result = executeDescribeSnapshots(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future describeStorageVirtualMachinesAsync(DescribeStorageVirtualMachinesRequest request) { return describeStorageVirtualMachinesAsync(request, null); } @Override public java.util.concurrent.Future describeStorageVirtualMachinesAsync( final DescribeStorageVirtualMachinesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeStorageVirtualMachinesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeStorageVirtualMachinesResult call() throws Exception { DescribeStorageVirtualMachinesResult result = null; try { result = executeDescribeStorageVirtualMachines(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future describeVolumesAsync(DescribeVolumesRequest request) { return describeVolumesAsync(request, null); } @Override public java.util.concurrent.Future describeVolumesAsync(final DescribeVolumesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DescribeVolumesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DescribeVolumesResult call() throws Exception { DescribeVolumesResult result = null; try { result = executeDescribeVolumes(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future disassociateFileSystemAliasesAsync(DisassociateFileSystemAliasesRequest request) { return disassociateFileSystemAliasesAsync(request, null); } @Override public java.util.concurrent.Future disassociateFileSystemAliasesAsync( final DisassociateFileSystemAliasesRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final DisassociateFileSystemAliasesRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public DisassociateFileSystemAliasesResult call() throws Exception { DisassociateFileSystemAliasesResult result = null; try { result = executeDisassociateFileSystemAliases(finalRequest); } catch (Exception 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 releaseFileSystemNfsV3LocksAsync(ReleaseFileSystemNfsV3LocksRequest request) { return releaseFileSystemNfsV3LocksAsync(request, null); } @Override public java.util.concurrent.Future releaseFileSystemNfsV3LocksAsync(final ReleaseFileSystemNfsV3LocksRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final ReleaseFileSystemNfsV3LocksRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public ReleaseFileSystemNfsV3LocksResult call() throws Exception { ReleaseFileSystemNfsV3LocksResult result = null; try { result = executeReleaseFileSystemNfsV3Locks(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future restoreVolumeFromSnapshotAsync(RestoreVolumeFromSnapshotRequest request) { return restoreVolumeFromSnapshotAsync(request, null); } @Override public java.util.concurrent.Future restoreVolumeFromSnapshotAsync(final RestoreVolumeFromSnapshotRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final RestoreVolumeFromSnapshotRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public RestoreVolumeFromSnapshotResult call() throws Exception { RestoreVolumeFromSnapshotResult result = null; try { result = executeRestoreVolumeFromSnapshot(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future startMisconfiguredStateRecoveryAsync( StartMisconfiguredStateRecoveryRequest request) { return startMisconfiguredStateRecoveryAsync(request, null); } @Override public java.util.concurrent.Future startMisconfiguredStateRecoveryAsync( final StartMisconfiguredStateRecoveryRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final StartMisconfiguredStateRecoveryRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public StartMisconfiguredStateRecoveryResult call() throws Exception { StartMisconfiguredStateRecoveryResult result = null; try { result = executeStartMisconfiguredStateRecovery(finalRequest); } catch (Exception 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 updateDataRepositoryAssociationAsync( UpdateDataRepositoryAssociationRequest request) { return updateDataRepositoryAssociationAsync(request, null); } @Override public java.util.concurrent.Future updateDataRepositoryAssociationAsync( final UpdateDataRepositoryAssociationRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateDataRepositoryAssociationRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateDataRepositoryAssociationResult call() throws Exception { UpdateDataRepositoryAssociationResult result = null; try { result = executeUpdateDataRepositoryAssociation(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future updateFileCacheAsync(UpdateFileCacheRequest request) { return updateFileCacheAsync(request, null); } @Override public java.util.concurrent.Future updateFileCacheAsync(final UpdateFileCacheRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateFileCacheRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateFileCacheResult call() throws Exception { UpdateFileCacheResult result = null; try { result = executeUpdateFileCache(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future updateFileSystemAsync(UpdateFileSystemRequest request) { return updateFileSystemAsync(request, null); } @Override public java.util.concurrent.Future updateFileSystemAsync(final UpdateFileSystemRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateFileSystemRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateFileSystemResult call() throws Exception { UpdateFileSystemResult result = null; try { result = executeUpdateFileSystem(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future updateSharedVpcConfigurationAsync(UpdateSharedVpcConfigurationRequest request) { return updateSharedVpcConfigurationAsync(request, null); } @Override public java.util.concurrent.Future updateSharedVpcConfigurationAsync(final UpdateSharedVpcConfigurationRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateSharedVpcConfigurationRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateSharedVpcConfigurationResult call() throws Exception { UpdateSharedVpcConfigurationResult result = null; try { result = executeUpdateSharedVpcConfiguration(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future updateSnapshotAsync(UpdateSnapshotRequest request) { return updateSnapshotAsync(request, null); } @Override public java.util.concurrent.Future updateSnapshotAsync(final UpdateSnapshotRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateSnapshotRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateSnapshotResult call() throws Exception { UpdateSnapshotResult result = null; try { result = executeUpdateSnapshot(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future updateStorageVirtualMachineAsync(UpdateStorageVirtualMachineRequest request) { return updateStorageVirtualMachineAsync(request, null); } @Override public java.util.concurrent.Future updateStorageVirtualMachineAsync(final UpdateStorageVirtualMachineRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateStorageVirtualMachineRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateStorageVirtualMachineResult call() throws Exception { UpdateStorageVirtualMachineResult result = null; try { result = executeUpdateStorageVirtualMachine(finalRequest); } catch (Exception ex) { if (asyncHandler != null) { asyncHandler.onError(ex); } throw ex; } if (asyncHandler != null) { asyncHandler.onSuccess(finalRequest, result); } return result; } }); } @Override public java.util.concurrent.Future updateVolumeAsync(UpdateVolumeRequest request) { return updateVolumeAsync(request, null); } @Override public java.util.concurrent.Future updateVolumeAsync(final UpdateVolumeRequest request, final com.amazonaws.handlers.AsyncHandler asyncHandler) { final UpdateVolumeRequest finalRequest = beforeClientExecution(request); return executorService.submit(new java.util.concurrent.Callable() { @Override public UpdateVolumeResult call() throws Exception { UpdateVolumeResult result = null; try { result = executeUpdateVolume(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