/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.rdsdata; import javax.annotation.Generated; import com.amazonaws.services.rdsdata.model.*; /** * Interface for accessing AWS RDS DataService asynchronously. Each asynchronous method will return a Java Future object * representing the asynchronous operation; overloads which accept an {@code AsyncHandler} can be used to receive * notification when an asynchronous operation completes. *

* Note: Do not directly implement this interface, new methods are added to it regularly. Extend from * {@link com.amazonaws.services.rdsdata.AbstractAWSRDSDataAsync} instead. *

*

*

* Amazon RDS Data Service *

* Amazon RDS provides an HTTP endpoint to run SQL statements on an Amazon Aurora Serverless v1 DB cluster. To run these * statements, you work with the Data Service API. *

* *

* The Data Service API isn't supported on Amazon Aurora Serverless v2 DB clusters. *

*
*

* For more information about the Data Service API, see Using the Data API in the * Amazon Aurora User Guide. *

*

*/ @Generated("com.amazonaws:aws-java-sdk-code-generator") public interface AWSRDSDataAsync extends AWSRDSData { /** *

* Runs a batch SQL statement over an array of data. *

*

* You can run bulk update and insert operations for multiple records using a DML statement with different parameter * sets. Bulk operations can provide a significant performance improvement over individual insert and update * operations. *

* *

* If a call isn't part of a transaction because it doesn't include the transactionID parameter, * changes that result from the call are committed automatically. *

*

* There isn't a fixed upper limit on the number of parameter sets. However, the maximum size of the HTTP request * submitted through the Data API is 4 MiB. If the request exceeds this limit, the Data API returns an error and * doesn't process the request. This 4-MiB limit includes the size of the HTTP headers and the JSON notation in the * request. Thus, the number of parameter sets that you can include depends on a combination of factors, such as the * size of the SQL statement and the size of each parameter set. *

*

* The response size limit is 1 MiB. If the call returns more than 1 MiB of response data, the call is terminated. *

*
* * @param batchExecuteStatementRequest * The request parameters represent the input of a SQL statement over an array of data. * @return A Java Future containing the result of the BatchExecuteStatement operation returned by the service. * @sample AWSRDSDataAsync.BatchExecuteStatement * @see AWS * API Documentation */ java.util.concurrent.Future batchExecuteStatementAsync(BatchExecuteStatementRequest batchExecuteStatementRequest); /** *

* Runs a batch SQL statement over an array of data. *

*

* You can run bulk update and insert operations for multiple records using a DML statement with different parameter * sets. Bulk operations can provide a significant performance improvement over individual insert and update * operations. *

* *

* If a call isn't part of a transaction because it doesn't include the transactionID parameter, * changes that result from the call are committed automatically. *

*

* There isn't a fixed upper limit on the number of parameter sets. However, the maximum size of the HTTP request * submitted through the Data API is 4 MiB. If the request exceeds this limit, the Data API returns an error and * doesn't process the request. This 4-MiB limit includes the size of the HTTP headers and the JSON notation in the * request. Thus, the number of parameter sets that you can include depends on a combination of factors, such as the * size of the SQL statement and the size of each parameter set. *

*

* The response size limit is 1 MiB. If the call returns more than 1 MiB of response data, the call is terminated. *

*
* * @param batchExecuteStatementRequest * The request parameters represent the input of a SQL statement over an array of data. * @param asyncHandler * Asynchronous callback handler for events in the lifecycle of the request. Users can provide an * implementation of the callback methods in this interface to receive notification of successful or * unsuccessful completion of the operation. * @return A Java Future containing the result of the BatchExecuteStatement operation returned by the service. * @sample AWSRDSDataAsyncHandler.BatchExecuteStatement * @see AWS * API Documentation */ java.util.concurrent.Future batchExecuteStatementAsync(BatchExecuteStatementRequest batchExecuteStatementRequest, com.amazonaws.handlers.AsyncHandler asyncHandler); /** *

* Starts a SQL transaction. *

* *

* A transaction can run for a maximum of 24 hours. A transaction is terminated and rolled back automatically after * 24 hours. *

*

* A transaction times out if no calls use its transaction ID in three minutes. If a transaction times out before * it's committed, it's rolled back automatically. *

*

* DDL statements inside a transaction cause an implicit commit. We recommend that you run each DDL statement in a * separate ExecuteStatement call with continueAfterTimeout enabled. *

*
* * @param beginTransactionRequest * The request parameters represent the input of a request to start a SQL transaction. * @return A Java Future containing the result of the BeginTransaction operation returned by the service. * @sample AWSRDSDataAsync.BeginTransaction * @see AWS API * Documentation */ java.util.concurrent.Future beginTransactionAsync(BeginTransactionRequest beginTransactionRequest); /** *

* Starts a SQL transaction. *

* *

* A transaction can run for a maximum of 24 hours. A transaction is terminated and rolled back automatically after * 24 hours. *

*

* A transaction times out if no calls use its transaction ID in three minutes. If a transaction times out before * it's committed, it's rolled back automatically. *

*

* DDL statements inside a transaction cause an implicit commit. We recommend that you run each DDL statement in a * separate ExecuteStatement call with continueAfterTimeout enabled. *

*
* * @param beginTransactionRequest * The request parameters represent the input of a request to start a SQL transaction. * @param asyncHandler * Asynchronous callback handler for events in the lifecycle of the request. Users can provide an * implementation of the callback methods in this interface to receive notification of successful or * unsuccessful completion of the operation. * @return A Java Future containing the result of the BeginTransaction operation returned by the service. * @sample AWSRDSDataAsyncHandler.BeginTransaction * @see AWS API * Documentation */ java.util.concurrent.Future beginTransactionAsync(BeginTransactionRequest beginTransactionRequest, com.amazonaws.handlers.AsyncHandler asyncHandler); /** *

* Ends a SQL transaction started with the BeginTransaction operation and commits the changes. *

* * @param commitTransactionRequest * The request parameters represent the input of a commit transaction request. * @return A Java Future containing the result of the CommitTransaction operation returned by the service. * @sample AWSRDSDataAsync.CommitTransaction * @see AWS API * Documentation */ java.util.concurrent.Future commitTransactionAsync(CommitTransactionRequest commitTransactionRequest); /** *

* Ends a SQL transaction started with the BeginTransaction operation and commits the changes. *

* * @param commitTransactionRequest * The request parameters represent the input of a commit transaction request. * @param asyncHandler * Asynchronous callback handler for events in the lifecycle of the request. Users can provide an * implementation of the callback methods in this interface to receive notification of successful or * unsuccessful completion of the operation. * @return A Java Future containing the result of the CommitTransaction operation returned by the service. * @sample AWSRDSDataAsyncHandler.CommitTransaction * @see AWS API * Documentation */ java.util.concurrent.Future commitTransactionAsync(CommitTransactionRequest commitTransactionRequest, com.amazonaws.handlers.AsyncHandler asyncHandler); /** *

* Runs one or more SQL statements. *

* *

* This operation is deprecated. Use the BatchExecuteStatement or ExecuteStatement * operation. *

*
* * @param executeSqlRequest * The request parameters represent the input of a request to run one or more SQL statements. * @return A Java Future containing the result of the ExecuteSql operation returned by the service. * @sample AWSRDSDataAsync.ExecuteSql * @see AWS API * Documentation */ @Deprecated java.util.concurrent.Future executeSqlAsync(ExecuteSqlRequest executeSqlRequest); /** *

* Runs one or more SQL statements. *

* *

* This operation is deprecated. Use the BatchExecuteStatement or ExecuteStatement * operation. *

*
* * @param executeSqlRequest * The request parameters represent the input of a request to run one or more SQL statements. * @param asyncHandler * Asynchronous callback handler for events in the lifecycle of the request. Users can provide an * implementation of the callback methods in this interface to receive notification of successful or * unsuccessful completion of the operation. * @return A Java Future containing the result of the ExecuteSql operation returned by the service. * @sample AWSRDSDataAsyncHandler.ExecuteSql * @see AWS API * Documentation */ @Deprecated java.util.concurrent.Future executeSqlAsync(ExecuteSqlRequest executeSqlRequest, com.amazonaws.handlers.AsyncHandler asyncHandler); /** *

* Runs a SQL statement against a database. *

* *

* If a call isn't part of a transaction because it doesn't include the transactionID parameter, * changes that result from the call are committed automatically. *

*

* If the binary response data from the database is more than 1 MB, the call is terminated. *

*
* * @param executeStatementRequest * The request parameters represent the input of a request to run a SQL statement against a database. * @return A Java Future containing the result of the ExecuteStatement operation returned by the service. * @sample AWSRDSDataAsync.ExecuteStatement * @see AWS API * Documentation */ java.util.concurrent.Future executeStatementAsync(ExecuteStatementRequest executeStatementRequest); /** *

* Runs a SQL statement against a database. *

* *

* If a call isn't part of a transaction because it doesn't include the transactionID parameter, * changes that result from the call are committed automatically. *

*

* If the binary response data from the database is more than 1 MB, the call is terminated. *

*
* * @param executeStatementRequest * The request parameters represent the input of a request to run a SQL statement against a database. * @param asyncHandler * Asynchronous callback handler for events in the lifecycle of the request. Users can provide an * implementation of the callback methods in this interface to receive notification of successful or * unsuccessful completion of the operation. * @return A Java Future containing the result of the ExecuteStatement operation returned by the service. * @sample AWSRDSDataAsyncHandler.ExecuteStatement * @see AWS API * Documentation */ java.util.concurrent.Future executeStatementAsync(ExecuteStatementRequest executeStatementRequest, com.amazonaws.handlers.AsyncHandler asyncHandler); /** *

* Performs a rollback of a transaction. Rolling back a transaction cancels its changes. *

* * @param rollbackTransactionRequest * The request parameters represent the input of a request to perform a rollback of a transaction. * @return A Java Future containing the result of the RollbackTransaction operation returned by the service. * @sample AWSRDSDataAsync.RollbackTransaction * @see AWS * API Documentation */ java.util.concurrent.Future rollbackTransactionAsync(RollbackTransactionRequest rollbackTransactionRequest); /** *

* Performs a rollback of a transaction. Rolling back a transaction cancels its changes. *

* * @param rollbackTransactionRequest * The request parameters represent the input of a request to perform a rollback of a transaction. * @param asyncHandler * Asynchronous callback handler for events in the lifecycle of the request. Users can provide an * implementation of the callback methods in this interface to receive notification of successful or * unsuccessful completion of the operation. * @return A Java Future containing the result of the RollbackTransaction operation returned by the service. * @sample AWSRDSDataAsyncHandler.RollbackTransaction * @see AWS * API Documentation */ java.util.concurrent.Future rollbackTransactionAsync(RollbackTransactionRequest rollbackTransactionRequest, com.amazonaws.handlers.AsyncHandler asyncHandler); }