Class AbstractBatchWriteBuilder<T, S extends AbstractBatchWriteBuilder<T,S>>
java.lang.Object
dev.hogwai.dynamodb.simplified.builder.base.AbstractBatchWriteBuilder<T,S>
- Type Parameters:
T- the item typeS- the concrete builder type (for fluent chaining)
- Direct Known Subclasses:
AsyncBatchWriteBuilder, BatchWriteBuilder
public abstract class AbstractBatchWriteBuilder<T, S extends AbstractBatchWriteBuilder<T,S>>
extends Object
Abstract base for sync and async batch write builders.
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe list of items to put in the batch write.protected final List<software.amazon.awssdk.enhanced.dynamodb.Key> The list of keys to delete in the batch write.protected static final org.slf4j.LoggerLogger for this builder class.protected software.amazon.awssdk.services.dynamodb.model.ReturnConsumedCapacityOptional consumed capacity reporting level. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedConstructs a newAbstractBatchWriteBuilder. -
Method Summary
Modifier and TypeMethodDescriptionBuilds the request items map from the current puts and deletes.@NonNull SAdds a delete operation for the given partition key.@NonNull SAdds a delete operation for the given partition and sort key.@NonNull SAdds an item to be put (inserted or replaced) in the batch write.@NonNull SreturnConsumedCapacity(@NonNull software.amazon.awssdk.services.dynamodb.model.ReturnConsumedCapacity returnConsumedCapacity) Configures whether to return consumed capacity information for the operation.protected abstract Sself()Returnsthistyped asSfor fluent chaining.protected abstract @NonNull StringReturns the DynamoDB table name.protected abstract @NonNull software.amazon.awssdk.enhanced.dynamodb.TableSchema<T> Returns the table schema for converting items to attribute maps.
-
Field Details
-
LOG
protected static final org.slf4j.Logger LOGLogger for this builder class. -
itemsToPut
-
keysToDelete
The list of keys to delete in the batch write. -
returnConsumedCapacity
protected software.amazon.awssdk.services.dynamodb.model.ReturnConsumedCapacity returnConsumedCapacityOptional consumed capacity reporting level.
-
-
Constructor Details
-
AbstractBatchWriteBuilder
protected AbstractBatchWriteBuilder()Constructs a newAbstractBatchWriteBuilder.
-
-
Method Details
-
self
-
tableSchema
Returns the table schema for converting items to attribute maps.- Returns:
- the table schema
-
tableName
Returns the DynamoDB table name.- Returns:
- the DynamoDB table name
-
put
-
delete
-
delete
-
returnConsumedCapacity
public @NonNull S returnConsumedCapacity(@NonNull software.amazon.awssdk.services.dynamodb.model.ReturnConsumedCapacity returnConsumedCapacity) Configures whether to return consumed capacity information for the operation.- Parameters:
returnConsumedCapacity- the consumed capacity reporting level- Returns:
- this builder for chaining
-
buildRequestItems
-