Interface QldbSessionAsyncClient

All Superinterfaces:
AutoCloseable, AwsClient, SdkAutoCloseable, SdkClient

@Generated("software.amazon.awssdk:codegen") @ThreadSafe public interface QldbSessionAsyncClient extends AwsClient
Service client for accessing QLDB Session 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.

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 Details

  • Method Details

    • sendCommand

      default CompletableFuture<SendCommandResponse> sendCommand(SendCommandRequest 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.

      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 invoke Throwable.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 via SendCommandRequest.builder()

      Parameters:
      sendCommandRequest - A Consumer that will call methods on SendCommandRequest.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 invoke Throwable.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

      default QldbSessionServiceClientConfiguration 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 QldbSessionAsyncClient create()
      Create a QldbSessionAsyncClient with the region loaded from the DefaultAwsRegionProviderChain and credentials loaded from the DefaultCredentialsProvider.
    • builder

      Create a builder that can be used to configure and create a QldbSessionAsyncClient.