@Generated(value="software.amazon.awssdk:codegen") @ThreadSafe public interface TimestreamQueryAsyncClient extends SdkClient
builder()
method.
| Modifier and Type | Field and Description |
|---|---|
static String |
SERVICE_METADATA_ID
Value for looking up the service's metadata from the
ServiceMetadataProvider. |
static String |
SERVICE_NAME |
| Modifier and Type | Method and Description |
|---|---|
static TimestreamQueryAsyncClientBuilder |
builder()
Create a builder that can be used to configure and create a
TimestreamQueryAsyncClient. |
default CompletableFuture<CancelQueryResponse> |
cancelQuery(CancelQueryRequest cancelQueryRequest)
Cancels a query that has been issued.
|
default CompletableFuture<CancelQueryResponse> |
cancelQuery(Consumer<CancelQueryRequest.Builder> cancelQueryRequest)
Cancels a query that has been issued.
|
static TimestreamQueryAsyncClient |
create()
Create a
TimestreamQueryAsyncClient with the region loaded from the
DefaultAwsRegionProviderChain and credentials loaded from the
DefaultCredentialsProvider. |
default CompletableFuture<DescribeEndpointsResponse> |
describeEndpoints(Consumer<DescribeEndpointsRequest.Builder> describeEndpointsRequest)
DescribeEndpoints returns a list of available endpoints to make Timestream API calls against.
|
default CompletableFuture<DescribeEndpointsResponse> |
describeEndpoints(DescribeEndpointsRequest describeEndpointsRequest)
DescribeEndpoints returns a list of available endpoints to make Timestream API calls against.
|
default CompletableFuture<QueryResponse> |
query(Consumer<QueryRequest.Builder> queryRequest)
Query is a synchronous operation that enables you to execute a query.
|
default CompletableFuture<QueryResponse> |
query(QueryRequest queryRequest)
Query is a synchronous operation that enables you to execute a query.
|
default QueryPublisher |
queryPaginator(Consumer<QueryRequest.Builder> queryRequest)
Query is a synchronous operation that enables you to execute a query.
|
default QueryPublisher |
queryPaginator(QueryRequest queryRequest)
Query is a synchronous operation that enables you to execute a query.
|
serviceNameclosestatic final String SERVICE_NAME
static final String SERVICE_METADATA_ID
ServiceMetadataProvider.static TimestreamQueryAsyncClient create()
TimestreamQueryAsyncClient with the region loaded from the
DefaultAwsRegionProviderChain and credentials loaded from the
DefaultCredentialsProvider.static TimestreamQueryAsyncClientBuilder builder()
TimestreamQueryAsyncClient.default CompletableFuture<CancelQueryResponse> cancelQuery(CancelQueryRequest cancelQueryRequest)
Cancels a query that has been issued. Cancellation is guaranteed only if the query has not completed execution
before the cancellation request was issued. Because cancellation is an idempotent operation, subsequent
cancellation requests will return a CancellationMessage, indicating that the query has already been
canceled.
cancelQueryRequest - default CompletableFuture<CancelQueryResponse> cancelQuery(Consumer<CancelQueryRequest.Builder> cancelQueryRequest)
Cancels a query that has been issued. Cancellation is guaranteed only if the query has not completed execution
before the cancellation request was issued. Because cancellation is an idempotent operation, subsequent
cancellation requests will return a CancellationMessage, indicating that the query has already been
canceled.
This is a convenience which creates an instance of the CancelQueryRequest.Builder avoiding the need to
create one manually via CancelQueryRequest.builder()
cancelQueryRequest - A Consumer that will call methods on CancelQueryRequest.Builder to create a request.default CompletableFuture<DescribeEndpointsResponse> describeEndpoints(DescribeEndpointsRequest describeEndpointsRequest)
DescribeEndpoints returns a list of available endpoints to make Timestream API calls against. This API is available through both Write and Query.
Because Timestream’s SDKs are designed to transparently work with the service’s architecture, including the management and mapping of the service endpoints, it is not recommended that you use this API unless:
Your application uses a programming language that does not yet have SDK support
You require better control over the client-side implementation
For detailed information on how to use DescribeEndpoints, see The Endpoint Discovery Pattern and REST APIs.
describeEndpointsRequest - default CompletableFuture<DescribeEndpointsResponse> describeEndpoints(Consumer<DescribeEndpointsRequest.Builder> describeEndpointsRequest)
DescribeEndpoints returns a list of available endpoints to make Timestream API calls against. This API is available through both Write and Query.
Because Timestream’s SDKs are designed to transparently work with the service’s architecture, including the management and mapping of the service endpoints, it is not recommended that you use this API unless:
Your application uses a programming language that does not yet have SDK support
You require better control over the client-side implementation
For detailed information on how to use DescribeEndpoints, see The Endpoint Discovery Pattern and REST APIs.
This is a convenience which creates an instance of the DescribeEndpointsRequest.Builder avoiding the need
to create one manually via DescribeEndpointsRequest.builder()
describeEndpointsRequest - A Consumer that will call methods on DescribeEndpointsRequest.Builder to create a request.default CompletableFuture<QueryResponse> query(QueryRequest queryRequest)
Query is a synchronous operation that enables you to execute a query. Query will timeout after 60 seconds. You must update the default timeout in the SDK to support a timeout of 60 seconds. The result set will be truncated to 1MB. Service quotas apply. For more information, see Quotas in the Timestream Developer Guide.
queryRequest - default CompletableFuture<QueryResponse> query(Consumer<QueryRequest.Builder> queryRequest)
Query is a synchronous operation that enables you to execute a query. Query will timeout after 60 seconds. You must update the default timeout in the SDK to support a timeout of 60 seconds. The result set will be truncated to 1MB. Service quotas apply. For more information, see Quotas in the Timestream Developer Guide.
This is a convenience which creates an instance of the QueryRequest.Builder avoiding the need to create
one manually via QueryRequest.builder()
queryRequest - A Consumer that will call methods on QueryRequest.Builder to create a request.default QueryPublisher queryPaginator(QueryRequest queryRequest)
Query is a synchronous operation that enables you to execute a query. Query will timeout after 60 seconds. You must update the default timeout in the SDK to support a timeout of 60 seconds. The result set will be truncated to 1MB. Service quotas apply. For more information, see Quotas in the Timestream Developer Guide.
This is a variant of query(software.amazon.awssdk.services.timestreamquery.model.QueryRequest)
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.timestreamquery.paginators.QueryPublisher publisher = client.queryPaginator(request);
CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
future.get();
2) Using a custom subscriber
software.amazon.awssdk.services.timestreamquery.paginators.QueryPublisher publisher = client.queryPaginator(request);
publisher.subscribe(new Subscriber<software.amazon.awssdk.services.timestreamquery.model.QueryResponse>() {
public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
public void onNext(software.amazon.awssdk.services.timestreamquery.model.QueryResponse 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 MaxRows 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
query(software.amazon.awssdk.services.timestreamquery.model.QueryRequest) operation.
queryRequest - default QueryPublisher queryPaginator(Consumer<QueryRequest.Builder> queryRequest)
Query is a synchronous operation that enables you to execute a query. Query will timeout after 60 seconds. You must update the default timeout in the SDK to support a timeout of 60 seconds. The result set will be truncated to 1MB. Service quotas apply. For more information, see Quotas in the Timestream Developer Guide.
This is a variant of query(software.amazon.awssdk.services.timestreamquery.model.QueryRequest)
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.timestreamquery.paginators.QueryPublisher publisher = client.queryPaginator(request);
CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response });
future.get();
2) Using a custom subscriber
software.amazon.awssdk.services.timestreamquery.paginators.QueryPublisher publisher = client.queryPaginator(request);
publisher.subscribe(new Subscriber<software.amazon.awssdk.services.timestreamquery.model.QueryResponse>() {
public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
public void onNext(software.amazon.awssdk.services.timestreamquery.model.QueryResponse 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 MaxRows 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
query(software.amazon.awssdk.services.timestreamquery.model.QueryRequest) operation.
This is a convenience which creates an instance of the QueryRequest.Builder avoiding the need to create
one manually via QueryRequest.builder()
queryRequest - A Consumer that will call methods on QueryRequest.Builder to create a request.Copyright © 2021. All rights reserved.