Interface SimpleDbV2AsyncClient
- All Superinterfaces:
AutoCloseable,AwsClient,SdkAutoCloseable,SdkClient
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 Summary
FieldsModifier and TypeFieldDescriptionstatic final StringValue for looking up the service's metadata from theServiceMetadataProvider.static final String -
Method Summary
Modifier and TypeMethodDescriptionstatic SimpleDbV2AsyncClientBuilderbuilder()Create a builder that can be used to configure and create aSimpleDbV2AsyncClient.static SimpleDbV2AsyncClientcreate()Create aSimpleDbV2AsyncClientwith the region loaded from theDefaultAwsRegionProviderChainand credentials loaded from theDefaultCredentialsProvider.default CompletableFuture<GetExportResponse> getExport(Consumer<GetExportRequest.Builder> getExportRequest) Returns information for an existing domain export.default CompletableFuture<GetExportResponse> getExport(GetExportRequest getExportRequest) Returns information for an existing domain export.default CompletableFuture<ListExportsResponse> listExports(Consumer<ListExportsRequest.Builder> listExportsRequest) Lists all exports that were created.default CompletableFuture<ListExportsResponse> listExports(ListExportsRequest listExportsRequest) Lists all exports that were created.default ListExportsPublisherlistExportsPaginator(Consumer<ListExportsRequest.Builder> listExportsRequest) This is a variant oflistExports(software.amazon.awssdk.services.simpledbv2.model.ListExportsRequest)operation.default ListExportsPublisherlistExportsPaginator(ListExportsRequest listExportsRequest) This is a variant oflistExports(software.amazon.awssdk.services.simpledbv2.model.ListExportsRequest)operation.The SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfigurationstartDomainExport(Consumer<StartDomainExportRequest.Builder> startDomainExportRequest) Initiates the export of a SimpleDB domain to an S3 bucket.startDomainExport(StartDomainExportRequest startDomainExportRequest) Initiates the export of a SimpleDB domain to an S3 bucket.default SimpleDbV2AsyncWaiterwaiter()Create an instance ofSimpleDbV2AsyncWaiterusing this client.Methods inherited from interface software.amazon.awssdk.utils.SdkAutoCloseable
closeMethods inherited from interface software.amazon.awssdk.core.SdkClient
serviceName
-
Field Details
-
SERVICE_NAME
- See Also:
-
SERVICE_METADATA_ID
Value for looking up the service's metadata from theServiceMetadataProvider.- See Also:
-
-
Method Details
-
getExport
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 invokeThrowable.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.Builderavoiding the need to create one manually viaGetExportRequest.builder()- Parameters:
getExportRequest- AConsumerthat will call methods onGetExportRequest.Builderto 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 invokeThrowable.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
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 invokeThrowable.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.Builderavoiding the need to create one manually viaListExportsRequest.builder()- Parameters:
listExportsRequest- AConsumerthat will call methods onListExportsRequest.Builderto 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 invokeThrowable.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
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 newSubscriptioni.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
2) Using a custom subscribersoftware.amazon.awssdk.services.simpledbv2.paginators.ListExportsPublisher publisher = client.listExportsPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.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) { //... }; });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 invokeThrowable.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 newSubscriptioni.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
2) Using a custom subscribersoftware.amazon.awssdk.services.simpledbv2.paginators.ListExportsPublisher publisher = client.listExportsPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.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) { //... }; });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.Builderavoiding the need to create one manually viaListExportsRequest.builder()- Parameters:
listExportsRequest- AConsumerthat will call methods onListExportsRequest.Builderto 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 invokeThrowable.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 invokeThrowable.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.Builderavoiding the need to create one manually viaStartDomainExportRequest.builder()- Parameters:
startDomainExportRequest- AConsumerthat will call methods onStartDomainExportRequest.Builderto 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 invokeThrowable.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
Create an instance ofSimpleDbV2AsyncWaiterusing 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
Description copied from interface:SdkClientThe SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfiguration- Specified by:
serviceClientConfigurationin interfaceAwsClient- Specified by:
serviceClientConfigurationin interfaceSdkClient- Returns:
- SdkServiceClientConfiguration
-
create
Create aSimpleDbV2AsyncClientwith the region loaded from theDefaultAwsRegionProviderChainand credentials loaded from theDefaultCredentialsProvider. -
builder
Create a builder that can be used to configure and create aSimpleDbV2AsyncClient.
-