@Override
  public java.util.concurrent.Future<UploadLayerPartResult> uploadLayerPartAsync(
      final UploadLayerPartRequest request,
      final com.amazonaws.handlers.AsyncHandler<UploadLayerPartRequest, UploadLayerPartResult>
          asyncHandler) {

    return executorService.submit(
        new java.util.concurrent.Callable<UploadLayerPartResult>() {
          @Override
          public UploadLayerPartResult call() throws Exception {
            UploadLayerPartResult result;

            try {
              result = uploadLayerPart(request);
            } catch (Exception ex) {
              if (asyncHandler != null) {
                asyncHandler.onError(ex);
              }
              throw ex;
            }

            if (asyncHandler != null) {
              asyncHandler.onSuccess(request, result);
            }
            return result;
          }
        });
  }
  @Override
  public java.util.concurrent.Future<SetRepositoryPolicyResult> setRepositoryPolicyAsync(
      final SetRepositoryPolicyRequest request,
      final com.amazonaws.handlers.AsyncHandler<
              SetRepositoryPolicyRequest, SetRepositoryPolicyResult>
          asyncHandler) {

    return executorService.submit(
        new java.util.concurrent.Callable<SetRepositoryPolicyResult>() {
          @Override
          public SetRepositoryPolicyResult call() throws Exception {
            SetRepositoryPolicyResult result;

            try {
              result = setRepositoryPolicy(request);
            } catch (Exception ex) {
              if (asyncHandler != null) {
                asyncHandler.onError(ex);
              }
              throw ex;
            }

            if (asyncHandler != null) {
              asyncHandler.onSuccess(request, result);
            }
            return result;
          }
        });
  }
  @Override
  public java.util.concurrent.Future<GetDownloadUrlForLayerResult> getDownloadUrlForLayerAsync(
      final GetDownloadUrlForLayerRequest request,
      final com.amazonaws.handlers.AsyncHandler<
              GetDownloadUrlForLayerRequest, GetDownloadUrlForLayerResult>
          asyncHandler) {

    return executorService.submit(
        new java.util.concurrent.Callable<GetDownloadUrlForLayerResult>() {
          @Override
          public GetDownloadUrlForLayerResult call() throws Exception {
            GetDownloadUrlForLayerResult result;

            try {
              result = getDownloadUrlForLayer(request);
            } catch (Exception ex) {
              if (asyncHandler != null) {
                asyncHandler.onError(ex);
              }
              throw ex;
            }

            if (asyncHandler != null) {
              asyncHandler.onSuccess(request, result);
            }
            return result;
          }
        });
  }
  @Override
  public java.util.concurrent.Future<PutImageResult> putImageAsync(
      final PutImageRequest request,
      final com.amazonaws.handlers.AsyncHandler<PutImageRequest, PutImageResult> asyncHandler) {

    return executorService.submit(
        new java.util.concurrent.Callable<PutImageResult>() {
          @Override
          public PutImageResult call() throws Exception {
            PutImageResult result;

            try {
              result = putImage(request);
            } catch (Exception ex) {
              if (asyncHandler != null) {
                asyncHandler.onError(ex);
              }
              throw ex;
            }

            if (asyncHandler != null) {
              asyncHandler.onSuccess(request, result);
            }
            return result;
          }
        });
  }
  @Override
  public java.util.concurrent.Future<BatchCheckLayerAvailabilityResult>
      batchCheckLayerAvailabilityAsync(
          final BatchCheckLayerAvailabilityRequest request,
          final com.amazonaws.handlers.AsyncHandler<
                  BatchCheckLayerAvailabilityRequest, BatchCheckLayerAvailabilityResult>
              asyncHandler) {

    return executorService.submit(
        new java.util.concurrent.Callable<BatchCheckLayerAvailabilityResult>() {
          @Override
          public BatchCheckLayerAvailabilityResult call() throws Exception {
            BatchCheckLayerAvailabilityResult result;

            try {
              result = batchCheckLayerAvailability(request);
            } catch (Exception ex) {
              if (asyncHandler != null) {
                asyncHandler.onError(ex);
              }
              throw ex;
            }

            if (asyncHandler != null) {
              asyncHandler.onSuccess(request, result);
            }
            return result;
          }
        });
  }