Interface SimpleDbV2AsyncClient

All Superinterfaces:
AutoCloseable, AwsClient, SdkAutoCloseable, SdkClient

@Generated("software.amazon.awssdk:codegen") @SdkPublicApi @ThreadSafe public interface SimpleDbV2AsyncClient extends AwsClient
Service client for accessing Amazon SimpleDB v2 asynchronously. This can be created using the static builder() method.The asynchronous client performs non-blocking I/O when configured with any SdkAsyncHttpClient supported in the SDK. However, full non-blocking is not guaranteed as the async client may perform blocking calls in some cases such as credentials retrieval and endpoint discovery as part of the async API call.

Amazon SimpleDB is a web service providing the core database functions of data indexing and querying in the cloud. By offloading the time and effort associated with building and operating a web-scale database, SimpleDB provides developers the freedom to focus on application development.

  A traditional, clustered relational database requires a sizable upfront capital outlay, is complex to design, and often requires extensive and repetitive database administration. Amazon SimpleDB is dramatically simpler, requiring no schema, automatically indexing your data and providing a simple API for storage and access. This approach eliminates the administrative burden of data modeling, index maintenance, and performance tuning. Developers gain access to this functionality within Amazon's proven computing environment, are able to scale instantly, and pay only for what they use. 
 
  • Field Details

  • Method Details

    • getExport

      default CompletableFuture<GetExportResponse> getExport(GetExportRequest getExportRequest)

      Returns information for an existing domain export.

      Parameters:
      getExportRequest -
      Returns:
      A Java Future containing the result of the GetExport operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • NoSuchExportException Export with specified ARN does not exist.
      • InvalidParameterValueException The specified parameter value is not valid.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • SimpleDbV2Exception Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
    • getExport

      default CompletableFuture<GetExportResponse> getExport(Consumer<GetExportRequest.Builder> getExportRequest)

      Returns information for an existing domain export.


      This is a convenience which creates an instance of the GetExportRequest.Builder avoiding the need to create one manually via GetExportRequest.builder()

      Parameters:
      getExportRequest - A Consumer that will call methods on GetExportRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the GetExport operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • NoSuchExportException Export with specified ARN does not exist.
      • InvalidParameterValueException The specified parameter value is not valid.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • SimpleDbV2Exception Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
    • listExports

      default CompletableFuture<ListExportsResponse> listExports(ListExportsRequest listExportsRequest)

      Lists all exports that were created. The results are paginated and can be filtered by domain name.

      Parameters:
      listExportsRequest -
      Returns:
      A Java Future containing the result of the ListExports operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • InvalidNextTokenException The specified next token is not valid.
      • InvalidParameterValueException The specified parameter value is not valid.
      • NoSuchDomainException The specified domain does not exist.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • SimpleDbV2Exception Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
    • listExports

      default CompletableFuture<ListExportsResponse> listExports(Consumer<ListExportsRequest.Builder> listExportsRequest)

      Lists all exports that were created. The results are paginated and can be filtered by domain name.


      This is a convenience which creates an instance of the ListExportsRequest.Builder avoiding the need to create one manually via ListExportsRequest.builder()

      Parameters:
      listExportsRequest - A Consumer that will call methods on ListExportsRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the ListExports operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • InvalidNextTokenException The specified next token is not valid.
      • InvalidParameterValueException The specified parameter value is not valid.
      • NoSuchDomainException The specified domain does not exist.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • SimpleDbV2Exception Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
    • listExportsPaginator

      default ListExportsPublisher listExportsPaginator(ListExportsRequest listExportsRequest)

      This is a variant of listExports(software.amazon.awssdk.services.simpledbv2.model.ListExportsRequest) operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will internally handle making service calls for you.

      When the operation is called, an instance of this class is returned. At this point, no service calls are made yet and so there is no guarantee that the request is valid. If there are errors in your request, you will see the failures only after you start streaming the data. The subscribe method should be called as a request to start streaming data. For more info, see Publisher.subscribe(org.reactivestreams.Subscriber). Each call to the subscribe method will result in a new Subscription i.e., a new contract to stream data from the starting request.

      The following are few ways to use the response class:

      1) Using the subscribe helper method
       
       software.amazon.awssdk.services.simpledbv2.paginators.ListExportsPublisher publisher = client.listExportsPaginator(request);
       CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
       future.get();
       
       
      2) Using a custom subscriber
       
       software.amazon.awssdk.services.simpledbv2.paginators.ListExportsPublisher publisher = client.listExportsPaginator(request);
       publisher.subscribe(new Subscriber<software.amazon.awssdk.services.simpledbv2.model.ListExportsResponse>() {
       
       public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
       
       
       public void onNext(software.amazon.awssdk.services.simpledbv2.model.ListExportsResponse response) { //... };
       });
       
      As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.

      Please notice that the configuration of maxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.

      Note: If you prefer to have control on service calls, use the listExports(software.amazon.awssdk.services.simpledbv2.model.ListExportsRequest) operation.

      Parameters:
      listExportsRequest -
      Returns:
      A custom publisher that can be subscribed to request a stream of response pages.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • InvalidNextTokenException The specified next token is not valid.
      • InvalidParameterValueException The specified parameter value is not valid.
      • NoSuchDomainException The specified domain does not exist.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • SimpleDbV2Exception Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
    • listExportsPaginator

      default ListExportsPublisher listExportsPaginator(Consumer<ListExportsRequest.Builder> listExportsRequest)

      This is a variant of listExports(software.amazon.awssdk.services.simpledbv2.model.ListExportsRequest) operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will internally handle making service calls for you.

      When the operation is called, an instance of this class is returned. At this point, no service calls are made yet and so there is no guarantee that the request is valid. If there are errors in your request, you will see the failures only after you start streaming the data. The subscribe method should be called as a request to start streaming data. For more info, see Publisher.subscribe(org.reactivestreams.Subscriber). Each call to the subscribe method will result in a new Subscription i.e., a new contract to stream data from the starting request.

      The following are few ways to use the response class:

      1) Using the subscribe helper method
       
       software.amazon.awssdk.services.simpledbv2.paginators.ListExportsPublisher publisher = client.listExportsPaginator(request);
       CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
       future.get();
       
       
      2) Using a custom subscriber
       
       software.amazon.awssdk.services.simpledbv2.paginators.ListExportsPublisher publisher = client.listExportsPaginator(request);
       publisher.subscribe(new Subscriber<software.amazon.awssdk.services.simpledbv2.model.ListExportsResponse>() {
       
       public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
       
       
       public void onNext(software.amazon.awssdk.services.simpledbv2.model.ListExportsResponse response) { //... };
       });
       
      As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.

      Please notice that the configuration of maxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.

      Note: If you prefer to have control on service calls, use the listExports(software.amazon.awssdk.services.simpledbv2.model.ListExportsRequest) operation.


      This is a convenience which creates an instance of the ListExportsRequest.Builder avoiding the need to create one manually via ListExportsRequest.builder()

      Parameters:
      listExportsRequest - A Consumer that will call methods on ListExportsRequest.Builder to create a request.
      Returns:
      A custom publisher that can be subscribed to request a stream of response pages.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • InvalidNextTokenException The specified next token is not valid.
      • InvalidParameterValueException The specified parameter value is not valid.
      • NoSuchDomainException The specified domain does not exist.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • SimpleDbV2Exception Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
    • startDomainExport

      default CompletableFuture<StartDomainExportResponse> startDomainExport(StartDomainExportRequest startDomainExportRequest)

      Initiates the export of a SimpleDB domain to an S3 bucket.

      Parameters:
      startDomainExportRequest -
      Returns:
      A Java Future containing the result of the StartDomainExport operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • InvalidParameterCombinationException Parameters that must not be used together were used together in the request.
      • InvalidParameterValueException The specified parameter value is not valid.
      • ConflictException Indicates a conflict with one or more parameters of the request.
      • NumberExportsLimitExceededException Cannot start export as export quota limit was exceeded
      • NoSuchDomainException The specified domain does not exist.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • SimpleDbV2Exception Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
    • startDomainExport

      default CompletableFuture<StartDomainExportResponse> startDomainExport(Consumer<StartDomainExportRequest.Builder> startDomainExportRequest)

      Initiates the export of a SimpleDB domain to an S3 bucket.


      This is a convenience which creates an instance of the StartDomainExportRequest.Builder avoiding the need to create one manually via StartDomainExportRequest.builder()

      Parameters:
      startDomainExportRequest - A Consumer that will call methods on StartDomainExportRequest.Builder to create a request.
      Returns:
      A Java Future containing the result of the StartDomainExport operation returned by the service.
      The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invoke Throwable.getCause() to retrieve the underlying exception.
      • InvalidParameterCombinationException Parameters that must not be used together were used together in the request.
      • InvalidParameterValueException The specified parameter value is not valid.
      • ConflictException Indicates a conflict with one or more parameters of the request.
      • NumberExportsLimitExceededException Cannot start export as export quota limit was exceeded
      • NoSuchDomainException The specified domain does not exist.
      • SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
      • SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
      • SimpleDbV2Exception Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
    • waiter

      default SimpleDbV2AsyncWaiter waiter()
      Create an instance of SimpleDbV2AsyncWaiter using this client.

      Waiters created via this method are managed by the SDK and resources will be released when the service client is closed.

      Returns:
      an instance of SimpleDbV2AsyncWaiter
    • serviceClientConfiguration

      default SimpleDbV2ServiceClientConfiguration serviceClientConfiguration()
      Description copied from interface: SdkClient
      The SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfiguration
      Specified by:
      serviceClientConfiguration in interface AwsClient
      Specified by:
      serviceClientConfiguration in interface SdkClient
      Returns:
      SdkServiceClientConfiguration
    • create

      static SimpleDbV2AsyncClient create()
      Create a SimpleDbV2AsyncClient with the region loaded from the DefaultAwsRegionProviderChain and credentials loaded from the DefaultCredentialsProvider.
    • builder

      static SimpleDbV2AsyncClientBuilder builder()
      Create a builder that can be used to configure and create a SimpleDbV2AsyncClient.