Class BulkMutation
- java.lang.Object
-
- com.google.cloud.bigtable.data.v2.models.BulkMutation
-
- All Implemented Interfaces:
Serializable
,Cloneable
public final class BulkMutation extends Object implements Serializable, Cloneable
Represents a list of mutations for multiple rows. Each mutation contains multiple changes that will be atomically applied to each row. However, ordering between rows is not guaranteed.This class is meant for manual batching.
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description BulkMutation
add(RowMutationEntry entry)
Add mutation for a particular row.BulkMutation
add(com.google.protobuf.ByteString rowKey, Mutation mutation)
Add mutation for a particular row.BulkMutation
add(String rowKey, Mutation mutation)
Add mutation for a particular row.BulkMutation
clone()
Creates a copy ofBulkMutation
.static BulkMutation
create(String tableId)
static BulkMutation
fromProto(MutateRowsRequest request)
Wraps the protobufMutateRowsRequest
.int
getEntryCount()
MutateRowsRequest
toProto(com.google.cloud.bigtable.data.v2.internal.RequestContext requestContext)
-
-
-
Method Detail
-
create
public static BulkMutation create(String tableId)
-
add
public BulkMutation add(@Nonnull String rowKey, @Nonnull Mutation mutation)
Add mutation for a particular row. The changes in the mutation will be applied atomically. However there is no guarantees about the relative ordering between mutations affecting different rows.
-
add
public BulkMutation add(@Nonnull com.google.protobuf.ByteString rowKey, @Nonnull Mutation mutation)
Add mutation for a particular row. The changes in the mutation will be applied atomic. However there is no guarantees about the relative ordering between mutations affecting different rows.
-
add
public BulkMutation add(@Nonnull RowMutationEntry entry)
Add mutation for a particular row. The changes in the mutation will be applied atomic. However there is no guarantees about the relative ordering between mutations affecting different rows.
-
getEntryCount
public int getEntryCount()
-
toProto
@InternalApi public MutateRowsRequest toProto(com.google.cloud.bigtable.data.v2.internal.RequestContext requestContext)
-
fromProto
@BetaApi public static BulkMutation fromProto(@Nonnull MutateRowsRequest request)
Wraps the protobufMutateRowsRequest
.This is meant for advanced usage only. Please ensure that the MutateRowsRequest does not use server side timestamps. The BigtableDataClient assumes that mutation present in BulkMutation are idempotent and is configured to enable retries by default. If serverside timestamps are enabled then that can lead to duplicate mutations.
WARNING: when applied, the resulting mutation object will ignore the project id and instance id in the table_name and instead apply the configuration in the client.
-
clone
public BulkMutation clone()
Creates a copy ofBulkMutation
.
-
-