public static final class StandardSdkModule.Builder extends Object
Modifier and Type | Field and Description |
---|---|
protected Boolean |
autoCreateTable
Boolean value to specify auto creation of a DynamoDB table.
|
protected com.amazonaws.services.dynamodbv2.AmazonDynamoDB |
customDynamoDBClient
Custom DynamoDB client.
|
protected org.apache.http.impl.client.CloseableHttpClient |
customHttpClient
Custom HTTP client.
|
protected Function<RequestEnvelope,String> |
partitionKeyGenerator
Partition Key Generator, the key of which is used as input for a hash function to determine storage.
|
protected String |
tableName
DynamoDB table name.
|
protected String |
templateDirectoryPath
Directory path where the templates are stored.
|
Modifier and Type | Method and Description |
---|---|
StandardSdkModule |
build()
Returns a new
StandardSdkModule instance. |
StandardSdkModule.Builder |
withAutoCreateTable(boolean autoCreateTable)
Allows SDK to create a table if the table doesn't exist.
|
StandardSdkModule.Builder |
withDynamoDbClient(com.amazonaws.services.dynamodbv2.AmazonDynamoDB customDynamoDBClient)
Allows the user to specify a custom DynamoDB client.
|
StandardSdkModule.Builder |
withHttpClient(org.apache.http.impl.client.CloseableHttpClient customHttpClient)
Allows the user to configure custom HTTP client.
|
StandardSdkModule.Builder |
withPartitionKeyGenerator(Function<RequestEnvelope,String> partitionKeyGenerator)
Allows the user to specify a partition key generator.
|
StandardSdkModule.Builder |
withTableName(String tableName)
Allows the user to configure a name for the DynamoDB table.
|
StandardSdkModule.Builder |
withTemplateDirectoryPath(String templateDirectoryPath)
Allows the user to specify directory path where the templates are stored.
|
protected org.apache.http.impl.client.CloseableHttpClient customHttpClient
protected com.amazonaws.services.dynamodbv2.AmazonDynamoDB customDynamoDBClient
protected String tableName
protected Boolean autoCreateTable
protected Function<RequestEnvelope,String> partitionKeyGenerator
protected String templateDirectoryPath
public StandardSdkModule.Builder withHttpClient(org.apache.http.impl.client.CloseableHttpClient customHttpClient)
customHttpClient
- which extends CloseableHttpClient.StandardSdkModule.Builder
public StandardSdkModule.Builder withTableName(String tableName)
tableName
- name for the DynamoDB table.StandardSdkModule.Builder
public StandardSdkModule.Builder withAutoCreateTable(boolean autoCreateTable)
autoCreateTable
- boolean. If set to true, allows SDK to auto create table.StandardSdkModule.Builder
public StandardSdkModule.Builder withPartitionKeyGenerator(Function<RequestEnvelope,String> partitionKeyGenerator)
partitionKeyGenerator
- DynamoDB uses the partition key as input for a hash function to determine storage.StandardSdkModule.Builder
public StandardSdkModule.Builder withDynamoDbClient(com.amazonaws.services.dynamodbv2.AmazonDynamoDB customDynamoDBClient)
customDynamoDBClient
- should implement AmazonDynamoDB
.StandardSdkModule.Builder
public StandardSdkModule.Builder withTemplateDirectoryPath(String templateDirectoryPath)
templateDirectoryPath
- string.StandardSdkModule.Builder
public StandardSdkModule build()
StandardSdkModule
instance.Copyright © 2023. All rights reserved.