Class WriteBatch
- java.lang.Object
-
- software.amazon.awssdk.enhanced.dynamodb.model.WriteBatch
-
@ThreadSafe public final class WriteBatch extends Object
Defines a collection of references to keys for delete actions and items for put actions for one specific table. A WriteBatch is part of aBatchWriteItemEnhancedRequest
and used in a batchWriteItem() operation (such asDynamoDbEnhancedClient.batchWriteItem(BatchWriteItemEnhancedRequest)
).A valid write batch should contain one or more delete or put action reference.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
WriteBatch.Builder<T>
A builder that is used to create a request with the desired parameters.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <T> WriteBatch.Builder<T>
builder(Class<? extends T> itemClass)
Creates a newly initialized builder for a write batch.boolean
equals(Object o)
int
hashCode()
String
tableName()
Returns the table name associated with this batch.Collection<WriteRequest>
writeRequests()
Returns the collection of write requests in this writek batch.
-
-
-
Method Detail
-
builder
public static <T> WriteBatch.Builder<T> builder(Class<? extends T> itemClass)
Creates a newly initialized builder for a write batch.- Type Parameters:
T
- The type of the modelled object, corresponding to itemClass- Parameters:
itemClass
- the class that items in this table map to- Returns:
- a WriteBatch builder
-
tableName
public String tableName()
Returns the table name associated with this batch.
-
writeRequests
public Collection<WriteRequest> writeRequests()
Returns the collection of write requests in this writek batch.
-
-