public final class ConditionalRowMutation extends Object implements Serializable
Modifier and Type | Method and Description |
---|---|
ConditionalRowMutation |
condition(Filters.Filter condition)
The filter to be applied to the contents of the specified row.
|
static ConditionalRowMutation |
create(String tableId,
ByteString rowKey)
Creates a new instance of the mutation builder.
|
static ConditionalRowMutation |
create(String tableId,
String rowKey)
Creates a new instance of the mutation builder.
|
ConditionalRowMutation |
otherwise(Mutation mutation)
Adds changes to be atomically applied to the specified row if the condition does not yields any
cells when applied to the row.
|
ConditionalRowMutation |
then(Mutation mutation)
Adds changes to be atomically applied to the specified row if the condition yields at least one
cell when applied to the row.
|
com.google.bigtable.v2.CheckAndMutateRowRequest |
toProto(com.google.cloud.bigtable.data.v2.internal.RequestContext requestContext)
Creates the underlying
CheckAndMutateRowRequest protobuf. |
public static ConditionalRowMutation create(String tableId, String rowKey)
public static ConditionalRowMutation create(String tableId, ByteString rowKey)
public ConditionalRowMutation condition(@Nonnull Filters.Filter condition)
then(Mutation)
or otherwise(Mutation)
will be executed. If unset, checks that the row contains any values at
all.
Unlike then(Mutation)
and otherwise(Mutation)
, only a single condition can
be set. However that filter can be a Filters.chain()
or Filters.interleave()
,
which can wrap multiple other filters.
WARNING: Filters.condition(Filter)
is not supported.
public ConditionalRowMutation then(@Nonnull Mutation mutation)
Each mutation
can specify multiple changes and the changes are accumulated each time
this method is called. Mutations are applied in order, meaning that earlier mutations can be
masked by later ones. Must contain at least one entry if otherwise(Mutation)
is empty,
and at most 100000.
public ConditionalRowMutation otherwise(@Nonnull Mutation mutation)
Each mutation
can specify multiple changes and the changes are accumulated each time
this method is called. Mutations are applied in order, meaning that earlier mutations can be
masked by later ones. Must contain at least one entry if then(Mutation)
is empty, and
at most 100000.
@InternalApi public com.google.bigtable.v2.CheckAndMutateRowRequest toProto(com.google.cloud.bigtable.data.v2.internal.RequestContext requestContext)
CheckAndMutateRowRequest
protobuf.
This method is considered an internal implementation detail and not meant to be used by applications.
Copyright © 2019 Google LLC. All rights reserved.