Class ConditionalRowMutation
- All Implemented Interfaces:
Serializable
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptioncondition
(Filters.Filter condition) The filter to be applied to the contents of the specified row.static ConditionalRowMutation
Creates a new instance of the mutation builder.static ConditionalRowMutation
Creates a new instance of the mutation builder.static ConditionalRowMutation
fromProto
(com.google.bigtable.v2.CheckAndMutateRowRequest request) Wraps the protobufCheckAndMutateRowRequest
.Adds changes to be atomically applied to the specified row if the condition does not yields any cells when applied to the row.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 underlyingCheckAndMutateRowRequest
protobuf.
-
Method Details
-
create
Creates a new instance of the mutation builder. -
create
Creates a new instance of the mutation builder. -
condition
The filter to be applied to the contents of the specified row. Depending on whether or not any results are yielded, either the mutations added viathen(Mutation)
orotherwise(Mutation)
will be executed. If unset, checks that the row contains any values at all.Unlike
then(Mutation)
andotherwise(Mutation)
, only a single condition can be set. However that filter can be aFilters.chain()
orFilters.interleave()
, which can wrap multiple other filters.WARNING:
Filters.condition(Filter)
is not supported. -
then
Adds changes to be atomically applied to the specified row if the condition yields at least one cell when applied to the row.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 ifotherwise(Mutation)
is empty, and at most 100000. -
otherwise
Adds changes to be atomically applied to the specified row if the condition does not yields any cells when applied to the row.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 ifthen(Mutation)
is empty, and at most 100000. -
toProto
@InternalApi public com.google.bigtable.v2.CheckAndMutateRowRequest toProto(com.google.cloud.bigtable.data.v2.internal.RequestContext requestContext) Creates the underlyingCheckAndMutateRowRequest
protobuf.This method is considered an internal implementation detail and not meant to be used by applications.
-
fromProto
@BetaApi public static ConditionalRowMutation fromProto(@Nonnull com.google.bigtable.v2.CheckAndMutateRowRequest request) Wraps the protobufCheckAndMutateRowRequest
.WARNING: Please note that the table_name will be overwritten by the configuration in the BigtableDataClient.
-