RequestT
- The type of the request object for the DynamoDb call in the low level DynamoDbClient
.ResponseT
- The type of the response object for the DynamoDb call in the low level DynamoDbClient
.ResultT
- The type of the mapped result object that will be returned by the execution of this operation.public interface DatabaseOperation<RequestT,ResponseT,ResultT>
Modifier and Type | Method and Description |
---|---|
Function<RequestT,CompletableFuture<ResponseT>> |
asyncServiceCall(DynamoDbAsyncClient dynamoDbAsyncClient)
Provides a function for making the low level non-blocking asynchronous SDK call to DynamoDb.
|
default ResultT |
execute(DynamoDbClient dynamoDbClient,
DynamoDbEnhancedClientExtension extension)
Default implementation of a complete synchronous execution of this operation.
|
default CompletableFuture<ResultT> |
executeAsync(DynamoDbAsyncClient dynamoDbAsyncClient,
DynamoDbEnhancedClientExtension extension)
Default implementation of a complete non-blocking asynchronous execution of this operation.
|
RequestT |
generateRequest(DynamoDbEnhancedClientExtension extension)
This method generates the request that needs to be sent to a low level
DynamoDbClient . |
Function<RequestT,ResponseT> |
serviceCall(DynamoDbClient dynamoDbClient)
Provides a function for making the low level synchronous SDK call to DynamoDb.
|
ResultT |
transformResponse(ResponseT response,
DynamoDbEnhancedClientExtension extension)
Takes the response object returned by the actual DynamoDb call and maps it into a higher level abstracted
result object.
|
RequestT generateRequest(DynamoDbEnhancedClientExtension extension)
DynamoDbClient
.extension
- A DynamoDbEnhancedClientExtension
that may modify the request of this operation. A null
value here will result in no modifications.DynamoDbClient
call to perform the operation.Function<RequestT,ResponseT> serviceCall(DynamoDbClient dynamoDbClient)
dynamoDbClient
- A low level DynamoDbClient
to make the call against.Function<RequestT,CompletableFuture<ResponseT>> asyncServiceCall(DynamoDbAsyncClient dynamoDbAsyncClient)
dynamoDbAsyncClient
- A low level DynamoDbAsyncClient
to make the call against.CompletableFuture
for the response object.ResultT transformResponse(ResponseT response, DynamoDbEnhancedClientExtension extension)
response
- The response object returned by the DynamoDb call for this operation.extension
- A DynamoDbEnhancedClientExtension
that may modify the result of this operation. A null
value here will result in no modifications.default ResultT execute(DynamoDbClient dynamoDbClient, DynamoDbEnhancedClientExtension extension)
dynamoDbClient
- A DynamoDbClient
to make the call against.extension
- A DynamoDbEnhancedClientExtension
that may modify the request or result of this
operation. A null value here will result in no modifications.default CompletableFuture<ResultT> executeAsync(DynamoDbAsyncClient dynamoDbAsyncClient, DynamoDbEnhancedClientExtension extension)
CompletableFuture
returned by the SDK in a new one that calls transformResponse() to
convert the response object returned in the previous step to a high level result.dynamoDbAsyncClient
- A DynamoDbAsyncClient
to make the call against.extension
- A DynamoDbEnhancedClientExtension
that may modify the request or result of this
operation. A null value here will result in no modifications.Copyright © 2021. All rights reserved.