-
Notifications
You must be signed in to change notification settings - Fork 2.8k
/
Copy pathAWSDataSyncAsyncClient.java
2078 lines (1707 loc) · 80.7 KB
/
AWSDataSyncAsyncClient.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
* Copyright 2020-2025 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.
* <p>
* <fullname>DataSync</fullname>
* <p>
* 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.
* </p>
* <p>
* This API interface reference includes documentation for using DataSync programmatically. For complete information,
* see the <i> <a href="https://docs.aws.amazon.com/datasync/latest/userguide/what-is-datasync.html">DataSync User
* Guide</a> </i>.
* </p>
*/
@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<AddStorageSystemResult> addStorageSystemAsync(AddStorageSystemRequest request) {
return addStorageSystemAsync(request, null);
}
@Override
public java.util.concurrent.Future<AddStorageSystemResult> addStorageSystemAsync(final AddStorageSystemRequest request,
final com.amazonaws.handlers.AsyncHandler<AddStorageSystemRequest, AddStorageSystemResult> asyncHandler) {
final AddStorageSystemRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable<AddStorageSystemResult>() {
@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<CancelTaskExecutionResult> cancelTaskExecutionAsync(CancelTaskExecutionRequest request) {
return cancelTaskExecutionAsync(request, null);
}
@Override
public java.util.concurrent.Future<CancelTaskExecutionResult> cancelTaskExecutionAsync(final CancelTaskExecutionRequest request,
final com.amazonaws.handlers.AsyncHandler<CancelTaskExecutionRequest, CancelTaskExecutionResult> asyncHandler) {
final CancelTaskExecutionRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable<CancelTaskExecutionResult>() {
@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<CreateAgentResult> createAgentAsync(CreateAgentRequest request) {
return createAgentAsync(request, null);
}
@Override
public java.util.concurrent.Future<CreateAgentResult> createAgentAsync(final CreateAgentRequest request,
final com.amazonaws.handlers.AsyncHandler<CreateAgentRequest, CreateAgentResult> asyncHandler) {
final CreateAgentRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable<CreateAgentResult>() {
@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<CreateLocationAzureBlobResult> createLocationAzureBlobAsync(CreateLocationAzureBlobRequest request) {
return createLocationAzureBlobAsync(request, null);
}
@Override
public java.util.concurrent.Future<CreateLocationAzureBlobResult> createLocationAzureBlobAsync(final CreateLocationAzureBlobRequest request,
final com.amazonaws.handlers.AsyncHandler<CreateLocationAzureBlobRequest, CreateLocationAzureBlobResult> asyncHandler) {
final CreateLocationAzureBlobRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable<CreateLocationAzureBlobResult>() {
@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<CreateLocationEfsResult> createLocationEfsAsync(CreateLocationEfsRequest request) {
return createLocationEfsAsync(request, null);
}
@Override
public java.util.concurrent.Future<CreateLocationEfsResult> createLocationEfsAsync(final CreateLocationEfsRequest request,
final com.amazonaws.handlers.AsyncHandler<CreateLocationEfsRequest, CreateLocationEfsResult> asyncHandler) {
final CreateLocationEfsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable<CreateLocationEfsResult>() {
@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<CreateLocationFsxLustreResult> createLocationFsxLustreAsync(CreateLocationFsxLustreRequest request) {
return createLocationFsxLustreAsync(request, null);
}
@Override
public java.util.concurrent.Future<CreateLocationFsxLustreResult> createLocationFsxLustreAsync(final CreateLocationFsxLustreRequest request,
final com.amazonaws.handlers.AsyncHandler<CreateLocationFsxLustreRequest, CreateLocationFsxLustreResult> asyncHandler) {
final CreateLocationFsxLustreRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable<CreateLocationFsxLustreResult>() {
@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<CreateLocationFsxOntapResult> createLocationFsxOntapAsync(CreateLocationFsxOntapRequest request) {
return createLocationFsxOntapAsync(request, null);
}
@Override
public java.util.concurrent.Future<CreateLocationFsxOntapResult> createLocationFsxOntapAsync(final CreateLocationFsxOntapRequest request,
final com.amazonaws.handlers.AsyncHandler<CreateLocationFsxOntapRequest, CreateLocationFsxOntapResult> asyncHandler) {
final CreateLocationFsxOntapRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable<CreateLocationFsxOntapResult>() {
@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<CreateLocationFsxOpenZfsResult> createLocationFsxOpenZfsAsync(CreateLocationFsxOpenZfsRequest request) {
return createLocationFsxOpenZfsAsync(request, null);
}
@Override
public java.util.concurrent.Future<CreateLocationFsxOpenZfsResult> createLocationFsxOpenZfsAsync(final CreateLocationFsxOpenZfsRequest request,
final com.amazonaws.handlers.AsyncHandler<CreateLocationFsxOpenZfsRequest, CreateLocationFsxOpenZfsResult> asyncHandler) {
final CreateLocationFsxOpenZfsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable<CreateLocationFsxOpenZfsResult>() {
@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<CreateLocationFsxWindowsResult> createLocationFsxWindowsAsync(CreateLocationFsxWindowsRequest request) {
return createLocationFsxWindowsAsync(request, null);
}
@Override
public java.util.concurrent.Future<CreateLocationFsxWindowsResult> createLocationFsxWindowsAsync(final CreateLocationFsxWindowsRequest request,
final com.amazonaws.handlers.AsyncHandler<CreateLocationFsxWindowsRequest, CreateLocationFsxWindowsResult> asyncHandler) {
final CreateLocationFsxWindowsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable<CreateLocationFsxWindowsResult>() {
@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<CreateLocationHdfsResult> createLocationHdfsAsync(CreateLocationHdfsRequest request) {
return createLocationHdfsAsync(request, null);
}
@Override
public java.util.concurrent.Future<CreateLocationHdfsResult> createLocationHdfsAsync(final CreateLocationHdfsRequest request,
final com.amazonaws.handlers.AsyncHandler<CreateLocationHdfsRequest, CreateLocationHdfsResult> asyncHandler) {
final CreateLocationHdfsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable<CreateLocationHdfsResult>() {
@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<CreateLocationNfsResult> createLocationNfsAsync(CreateLocationNfsRequest request) {
return createLocationNfsAsync(request, null);
}
@Override
public java.util.concurrent.Future<CreateLocationNfsResult> createLocationNfsAsync(final CreateLocationNfsRequest request,
final com.amazonaws.handlers.AsyncHandler<CreateLocationNfsRequest, CreateLocationNfsResult> asyncHandler) {
final CreateLocationNfsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable<CreateLocationNfsResult>() {
@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<CreateLocationObjectStorageResult> createLocationObjectStorageAsync(CreateLocationObjectStorageRequest request) {
return createLocationObjectStorageAsync(request, null);
}
@Override
public java.util.concurrent.Future<CreateLocationObjectStorageResult> createLocationObjectStorageAsync(final CreateLocationObjectStorageRequest request,
final com.amazonaws.handlers.AsyncHandler<CreateLocationObjectStorageRequest, CreateLocationObjectStorageResult> asyncHandler) {
final CreateLocationObjectStorageRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable<CreateLocationObjectStorageResult>() {
@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<CreateLocationS3Result> createLocationS3Async(CreateLocationS3Request request) {
return createLocationS3Async(request, null);
}
@Override
public java.util.concurrent.Future<CreateLocationS3Result> createLocationS3Async(final CreateLocationS3Request request,
final com.amazonaws.handlers.AsyncHandler<CreateLocationS3Request, CreateLocationS3Result> asyncHandler) {
final CreateLocationS3Request finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable<CreateLocationS3Result>() {
@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<CreateLocationSmbResult> createLocationSmbAsync(CreateLocationSmbRequest request) {
return createLocationSmbAsync(request, null);
}
@Override
public java.util.concurrent.Future<CreateLocationSmbResult> createLocationSmbAsync(final CreateLocationSmbRequest request,
final com.amazonaws.handlers.AsyncHandler<CreateLocationSmbRequest, CreateLocationSmbResult> asyncHandler) {
final CreateLocationSmbRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable<CreateLocationSmbResult>() {
@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<CreateTaskResult> createTaskAsync(CreateTaskRequest request) {
return createTaskAsync(request, null);
}
@Override
public java.util.concurrent.Future<CreateTaskResult> createTaskAsync(final CreateTaskRequest request,
final com.amazonaws.handlers.AsyncHandler<CreateTaskRequest, CreateTaskResult> asyncHandler) {
final CreateTaskRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable<CreateTaskResult>() {
@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<DeleteAgentResult> deleteAgentAsync(DeleteAgentRequest request) {
return deleteAgentAsync(request, null);
}
@Override
public java.util.concurrent.Future<DeleteAgentResult> deleteAgentAsync(final DeleteAgentRequest request,
final com.amazonaws.handlers.AsyncHandler<DeleteAgentRequest, DeleteAgentResult> asyncHandler) {
final DeleteAgentRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable<DeleteAgentResult>() {
@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<DeleteLocationResult> deleteLocationAsync(DeleteLocationRequest request) {
return deleteLocationAsync(request, null);
}
@Override
public java.util.concurrent.Future<DeleteLocationResult> deleteLocationAsync(final DeleteLocationRequest request,
final com.amazonaws.handlers.AsyncHandler<DeleteLocationRequest, DeleteLocationResult> asyncHandler) {
final DeleteLocationRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable<DeleteLocationResult>() {
@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<DeleteTaskResult> deleteTaskAsync(DeleteTaskRequest request) {
return deleteTaskAsync(request, null);
}
@Override
public java.util.concurrent.Future<DeleteTaskResult> deleteTaskAsync(final DeleteTaskRequest request,
final com.amazonaws.handlers.AsyncHandler<DeleteTaskRequest, DeleteTaskResult> asyncHandler) {
final DeleteTaskRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable<DeleteTaskResult>() {
@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<DescribeAgentResult> describeAgentAsync(DescribeAgentRequest request) {
return describeAgentAsync(request, null);
}
@Override
public java.util.concurrent.Future<DescribeAgentResult> describeAgentAsync(final DescribeAgentRequest request,
final com.amazonaws.handlers.AsyncHandler<DescribeAgentRequest, DescribeAgentResult> asyncHandler) {
final DescribeAgentRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable<DescribeAgentResult>() {
@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<DescribeDiscoveryJobResult> describeDiscoveryJobAsync(DescribeDiscoveryJobRequest request) {
return describeDiscoveryJobAsync(request, null);
}
@Override
public java.util.concurrent.Future<DescribeDiscoveryJobResult> describeDiscoveryJobAsync(final DescribeDiscoveryJobRequest request,
final com.amazonaws.handlers.AsyncHandler<DescribeDiscoveryJobRequest, DescribeDiscoveryJobResult> asyncHandler) {
final DescribeDiscoveryJobRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable<DescribeDiscoveryJobResult>() {
@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<DescribeLocationAzureBlobResult> describeLocationAzureBlobAsync(DescribeLocationAzureBlobRequest request) {
return describeLocationAzureBlobAsync(request, null);
}
@Override
public java.util.concurrent.Future<DescribeLocationAzureBlobResult> describeLocationAzureBlobAsync(final DescribeLocationAzureBlobRequest request,
final com.amazonaws.handlers.AsyncHandler<DescribeLocationAzureBlobRequest, DescribeLocationAzureBlobResult> asyncHandler) {
final DescribeLocationAzureBlobRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable<DescribeLocationAzureBlobResult>() {
@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<DescribeLocationEfsResult> describeLocationEfsAsync(DescribeLocationEfsRequest request) {
return describeLocationEfsAsync(request, null);
}
@Override
public java.util.concurrent.Future<DescribeLocationEfsResult> describeLocationEfsAsync(final DescribeLocationEfsRequest request,
final com.amazonaws.handlers.AsyncHandler<DescribeLocationEfsRequest, DescribeLocationEfsResult> asyncHandler) {
final DescribeLocationEfsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable<DescribeLocationEfsResult>() {
@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<DescribeLocationFsxLustreResult> describeLocationFsxLustreAsync(DescribeLocationFsxLustreRequest request) {
return describeLocationFsxLustreAsync(request, null);
}
@Override
public java.util.concurrent.Future<DescribeLocationFsxLustreResult> describeLocationFsxLustreAsync(final DescribeLocationFsxLustreRequest request,
final com.amazonaws.handlers.AsyncHandler<DescribeLocationFsxLustreRequest, DescribeLocationFsxLustreResult> asyncHandler) {
final DescribeLocationFsxLustreRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable<DescribeLocationFsxLustreResult>() {
@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<DescribeLocationFsxOntapResult> describeLocationFsxOntapAsync(DescribeLocationFsxOntapRequest request) {
return describeLocationFsxOntapAsync(request, null);
}
@Override
public java.util.concurrent.Future<DescribeLocationFsxOntapResult> describeLocationFsxOntapAsync(final DescribeLocationFsxOntapRequest request,
final com.amazonaws.handlers.AsyncHandler<DescribeLocationFsxOntapRequest, DescribeLocationFsxOntapResult> asyncHandler) {
final DescribeLocationFsxOntapRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable<DescribeLocationFsxOntapResult>() {
@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<DescribeLocationFsxOpenZfsResult> describeLocationFsxOpenZfsAsync(DescribeLocationFsxOpenZfsRequest request) {
return describeLocationFsxOpenZfsAsync(request, null);
}
@Override
public java.util.concurrent.Future<DescribeLocationFsxOpenZfsResult> describeLocationFsxOpenZfsAsync(final DescribeLocationFsxOpenZfsRequest request,
final com.amazonaws.handlers.AsyncHandler<DescribeLocationFsxOpenZfsRequest, DescribeLocationFsxOpenZfsResult> asyncHandler) {
final DescribeLocationFsxOpenZfsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable<DescribeLocationFsxOpenZfsResult>() {
@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<DescribeLocationFsxWindowsResult> describeLocationFsxWindowsAsync(DescribeLocationFsxWindowsRequest request) {
return describeLocationFsxWindowsAsync(request, null);
}
@Override
public java.util.concurrent.Future<DescribeLocationFsxWindowsResult> describeLocationFsxWindowsAsync(final DescribeLocationFsxWindowsRequest request,
final com.amazonaws.handlers.AsyncHandler<DescribeLocationFsxWindowsRequest, DescribeLocationFsxWindowsResult> asyncHandler) {
final DescribeLocationFsxWindowsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable<DescribeLocationFsxWindowsResult>() {
@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<DescribeLocationHdfsResult> describeLocationHdfsAsync(DescribeLocationHdfsRequest request) {
return describeLocationHdfsAsync(request, null);
}
@Override
public java.util.concurrent.Future<DescribeLocationHdfsResult> describeLocationHdfsAsync(final DescribeLocationHdfsRequest request,
final com.amazonaws.handlers.AsyncHandler<DescribeLocationHdfsRequest, DescribeLocationHdfsResult> asyncHandler) {
final DescribeLocationHdfsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable<DescribeLocationHdfsResult>() {
@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<DescribeLocationNfsResult> describeLocationNfsAsync(DescribeLocationNfsRequest request) {
return describeLocationNfsAsync(request, null);
}
@Override
public java.util.concurrent.Future<DescribeLocationNfsResult> describeLocationNfsAsync(final DescribeLocationNfsRequest request,
final com.amazonaws.handlers.AsyncHandler<DescribeLocationNfsRequest, DescribeLocationNfsResult> asyncHandler) {
final DescribeLocationNfsRequest finalRequest = beforeClientExecution(request);
return executorService.submit(new java.util.concurrent.Callable<DescribeLocationNfsResult>() {
@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);