Interface QldbSessionAsyncClient
- 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.
The transactional data APIs for Amazon QLDB
Instead of interacting directly with this API, we recommend using the QLDB driver or the QLDB shell to execute data transactions on a ledger.
-
If you are working with an AWS SDK, use the QLDB driver. The driver provides a high-level abstraction layer above this QLDB Session data plane and manages
SendCommand
API calls for you. For information and a list of supported programming languages, see Getting started with the driver in the Amazon QLDB Developer Guide. -
If you are working with the AWS Command Line Interface (AWS CLI), use the QLDB shell. The shell is a command line interface that uses the QLDB driver to interact with a ledger. For information, see Accessing Amazon QLDB using the QLDB shell.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Value for looking up the service's metadata from theServiceMetadataProvider
.static final String
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Create a builder that can be used to configure and create aQldbSessionAsyncClient
.static QldbSessionAsyncClient
create()
Create aQldbSessionAsyncClient
with the region loaded from theDefaultAwsRegionProviderChain
and credentials loaded from theDefaultCredentialsProvider
.default CompletableFuture
<SendCommandResponse> sendCommand
(Consumer<SendCommandRequest.Builder> sendCommandRequest) Sends a command to an Amazon QLDB ledger.default CompletableFuture
<SendCommandResponse> sendCommand
(SendCommandRequest sendCommandRequest) Sends a command to an Amazon QLDB ledger.The SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfigurationMethods inherited from interface software.amazon.awssdk.utils.SdkAutoCloseable
close
Methods 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
-
sendCommand
Sends a command to an Amazon QLDB ledger.
Instead of interacting directly with this API, we recommend using the QLDB driver or the QLDB shell to execute data transactions on a ledger.
-
If you are working with an AWS SDK, use the QLDB driver. The driver provides a high-level abstraction layer above this QLDB Session data plane and manages
SendCommand
API calls for you. For information and a list of supported programming languages, see Getting started with the driver in the Amazon QLDB Developer Guide. -
If you are working with the AWS Command Line Interface (AWS CLI), use the QLDB shell. The shell is a command line interface that uses the QLDB driver to interact with a ledger. For information, see Accessing Amazon QLDB using the QLDB shell.
- Parameters:
sendCommandRequest
-- Returns:
- A Java Future containing the result of the SendCommand 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.- BadRequestException Returned if the request is malformed or contains an error such as an invalid parameter value or a missing required parameter.
- InvalidSessionException Returned if the session doesn't exist anymore because it timed out or expired.
- OccConflictException Returned when a transaction cannot be written to the journal due to a failure in the verification phase of optimistic concurrency control (OCC).
- RateExceededException Returned when the rate of requests exceeds the allowed throughput.
- LimitExceededException Returned if a resource limit such as number of active sessions is exceeded.
- CapacityExceededException Returned when the request exceeds the processing capacity of the ledger.
- 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.
- QldbSessionException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
-
sendCommand
default CompletableFuture<SendCommandResponse> sendCommand(Consumer<SendCommandRequest.Builder> sendCommandRequest) Sends a command to an Amazon QLDB ledger.
Instead of interacting directly with this API, we recommend using the QLDB driver or the QLDB shell to execute data transactions on a ledger.
-
If you are working with an AWS SDK, use the QLDB driver. The driver provides a high-level abstraction layer above this QLDB Session data plane and manages
SendCommand
API calls for you. For information and a list of supported programming languages, see Getting started with the driver in the Amazon QLDB Developer Guide. -
If you are working with the AWS Command Line Interface (AWS CLI), use the QLDB shell. The shell is a command line interface that uses the QLDB driver to interact with a ledger. For information, see Accessing Amazon QLDB using the QLDB shell.
This is a convenience which creates an instance of the
SendCommandRequest.Builder
avoiding the need to create one manually viaSendCommandRequest.builder()
- Parameters:
sendCommandRequest
- AConsumer
that will call methods onSendCommandRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the SendCommand 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.- BadRequestException Returned if the request is malformed or contains an error such as an invalid parameter value or a missing required parameter.
- InvalidSessionException Returned if the session doesn't exist anymore because it timed out or expired.
- OccConflictException Returned when a transaction cannot be written to the journal due to a failure in the verification phase of optimistic concurrency control (OCC).
- RateExceededException Returned when the rate of requests exceeds the allowed throughput.
- LimitExceededException Returned if a resource limit such as number of active sessions is exceeded.
- CapacityExceededException Returned when the request exceeds the processing capacity of the ledger.
- 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.
- QldbSessionException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
-
serviceClientConfiguration
Description copied from interface:SdkClient
The SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfiguration- Specified by:
serviceClientConfiguration
in interfaceAwsClient
- Specified by:
serviceClientConfiguration
in interfaceSdkClient
- Returns:
- SdkServiceClientConfiguration
-
create
Create aQldbSessionAsyncClient
with the region loaded from theDefaultAwsRegionProviderChain
and credentials loaded from theDefaultCredentialsProvider
. -
builder
Create a builder that can be used to configure and create aQldbSessionAsyncClient
.
-