@Override
  public java.util.concurrent.Future<UpdateProvisionedProductResult> updateProvisionedProductAsync(
      final UpdateProvisionedProductRequest request,
      final com.amazonaws.handlers.AsyncHandler<
              UpdateProvisionedProductRequest, UpdateProvisionedProductResult>
          asyncHandler) {

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

            try {
              result = updateProvisionedProduct(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<ListRecordHistoryResult> listRecordHistoryAsync(
      final ListRecordHistoryRequest request,
      final com.amazonaws.handlers.AsyncHandler<ListRecordHistoryRequest, ListRecordHistoryResult>
          asyncHandler) {

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

            try {
              result = listRecordHistory(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<SearchProductsResult> searchProductsAsync(
      final SearchProductsRequest request,
      final com.amazonaws.handlers.AsyncHandler<SearchProductsRequest, SearchProductsResult>
          asyncHandler) {

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

            try {
              result = searchProducts(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<DescribeProvisioningParametersResult>
      describeProvisioningParametersAsync(
          final DescribeProvisioningParametersRequest request,
          final com.amazonaws.handlers.AsyncHandler<
                  DescribeProvisioningParametersRequest, DescribeProvisioningParametersResult>
              asyncHandler) {

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

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

            if (asyncHandler != null) {
              asyncHandler.onSuccess(request, 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();
 }