Class DynamoSimplifiedClientBuilder
java.lang.Object
dev.hogwai.dynamodb.simplified.DynamoSimplifiedClientBuilder
Builder for creating
DynamoSimplifiedClient instances with
a custom DynamoDB client and/or extensions.
Use DynamoSimplifiedClient.builder() to obtain an instance.
DynamoSimplifiedClient client = DynamoSimplifiedClient.builder()
.dynamoDbClient(customClient)
.extensions(myExtension)
.build();
-
Method Summary
Modifier and TypeMethodDescription@NonNull DynamoSimplifiedClientbuild()Builds theDynamoSimplifiedClientwith the configured client and extensions.@NonNull DynamoSimplifiedClientBuilderdynamoDbClient(@NonNull software.amazon.awssdk.services.dynamodb.DynamoDbClient client) Sets a custom DynamoDB client.@NonNull DynamoSimplifiedClientBuilderextensions(@NonNull software.amazon.awssdk.enhanced.dynamodb.DynamoDbEnhancedClientExtension... extensions) Sets one or more extensions for theDynamoDbEnhancedClient.
-
Method Details
-
dynamoDbClient
public @NonNull DynamoSimplifiedClientBuilder dynamoDbClient(@NonNull software.amazon.awssdk.services.dynamodb.DynamoDbClient client) Sets a custom DynamoDB client.If not set, a default
DynamoDbClient.create()will be used.- Parameters:
client- the DynamoDB client to use- Returns:
- this builder
-
extensions
public @NonNull DynamoSimplifiedClientBuilder extensions(@NonNull software.amazon.awssdk.enhanced.dynamodb.DynamoDbEnhancedClientExtension... extensions) Sets one or more extensions for theDynamoDbEnhancedClient.- Parameters:
extensions- the extensions to register- Returns:
- this builder
-
build
Builds theDynamoSimplifiedClientwith the configured client and extensions.- Returns:
- a new
DynamoSimplifiedClientinstance
-