Skip to content

Make it clear that bean and immutable table schemas are moderately expensive to create. #2069

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 28, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public interface TableSchema<T> {
/**
* Returns a builder for the {@link StaticTableSchema} implementation of this interface which allows all attributes,
* tags and table structure to be directly declared in the builder.
*
* @param itemClass The class of the item this {@link TableSchema} will map records to.
* @param <T> The type of the item this {@link TableSchema} will map records to.
* @return A newly initialized {@link StaticTableSchema.Builder}.
Expand All @@ -50,6 +51,7 @@ static <T> StaticTableSchema.Builder<T> builder(Class<T> itemClass) {
/**
* Returns a builder for the {@link StaticImmutableTableSchema} implementation of this interface which allows all
* attributes, tags and table structure to be directly declared in the builder.
*
* @param immutableItemClass The class of the immutable item this {@link TableSchema} will map records to.
* @param immutableBuilderClass The class that can be used to construct immutable items this {@link TableSchema}
* maps records to.
Expand All @@ -66,6 +68,10 @@ static <T, B> StaticImmutableTableSchema.Builder<T, B> builder(Class<T> immutabl
* Scans a bean class that has been annotated with DynamoDb bean annotations and then returns a
* {@link BeanTableSchema} implementation of this interface that can map records to and from items of that bean
* class.
*
* Creating a {@link BeanTableSchema} is a moderately expensive operation, and should be performed sparingly. This is
* usually done once at application startup.
*
* @param beanClass The bean class this {@link TableSchema} will map records to.
* @param <T> The type of the item this {@link TableSchema} will map records to.
* @return An initialized {@link BeanTableSchema}.
Expand All @@ -79,6 +85,9 @@ static <T> BeanTableSchema<T> fromBean(Class<T> beanClass) {
* {@link ImmutableTableSchema} implementation of this interface that can map records to and from items of that
* immutable class.
*
* Creating a {@link ImmutableTableSchema} is a moderately expensive operation, and should be performed sparingly. This is
* usually done once at application startup.
*
* @param immutableClass The immutable class this {@link TableSchema} will map records to.
* @param <T> The type of the item this {@link TableSchema} will map records to.
* @return An initialized {@link ImmutableTableSchema}.
Expand All @@ -95,6 +104,9 @@ static <T> ImmutableTableSchema<T> fromImmutableClass(Class<T> immutableClass) {
* {@link software.amazon.awssdk.enhanced.dynamodb.mapper.annotations.DynamoDbBean}<br>
* {@link software.amazon.awssdk.enhanced.dynamodb.mapper.annotations.DynamoDbImmutable}
*
* This is a moderately expensive operation, and should be performed sparingly. This is usually done once at
* application startup.
*
* @param annotatedClass A class that has been annotated with DynamoDb enhanced client annotations.
* @param <T> The type of the item this {@link TableSchema} will map records to.
* @return An initialized {@link TableSchema}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@
*
* </pre>
*
* Creating an {@link BeanTableSchema} is a moderately expensive operation, and should be performed sparingly. This is
* usually done once at application startup.
*
* @param <T> The type of object that this {@link TableSchema} maps to.
*/
@SdkPublicApi
Expand All @@ -101,6 +104,10 @@ private BeanTableSchema(StaticTableSchema<T> staticTableSchema) {
/**
* Scans a bean class and builds a {@link BeanTableSchema} from it that can be used with the
* {@link DynamoDbEnhancedClient}.
*
* Creating an {@link BeanTableSchema} is a moderately expensive operation, and should be performed sparingly. This is
* usually done once at application startup.
*
* @param beanClass The bean class to build the table schema from.
* @param <T> The bean class type.
* @return An initialized {@link BeanTableSchema}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,11 @@
* public Customer build() { ... };
* }
* }
*
* </pre>
*
* Creating an {@link ImmutableTableSchema} is a moderately expensive operation, and should be performed sparingly. This is
* usually done once at application startup.
*
* @param <T> The type of object that this {@link TableSchema} maps to.
*/
@SdkPublicApi
Expand All @@ -101,6 +104,10 @@ private ImmutableTableSchema(StaticImmutableTableSchema<T, ?> wrappedTableSchema
/**
* Scans an immutable class and builds an {@link ImmutableTableSchema} from it that can be used with the
* {@link DynamoDbEnhancedClient}.
*
* Creating an {@link ImmutableTableSchema} is a moderately expensive operation, and should be performed sparingly. This is
* usually done once at application startup.
*
* @param immutableClass The annotated immutable class to build the table schema from.
* @param <T> The immutable class type.
* @return An initialized {@link ImmutableTableSchema}
Expand Down