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 for the given target with targetId.static ConditionalRowMutation
Creates a new instance of the mutation builder for the given target with targetId.static ConditionalRowMutation
Deprecated.static ConditionalRowMutation
Deprecated.Please usecreate(TargetId, String)
instead.static ConditionalRowMutation
fromProto
(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.toProto
(com.google.cloud.bigtable.data.v2.internal.RequestContext requestContext) Creates the underlyingCheckAndMutateRowRequest
protobuf.
-
Method Details
-
create
Deprecated.Please usecreate(TargetId, String)
instead. -
create
Creates a new instance of the mutation builder for the given target with targetId.- See Also:
-
create
@Deprecated public static ConditionalRowMutation create(String tableId, com.google.protobuf.ByteString rowKey) Deprecated.Please usecreate(TargetId, ByteString)
instead. -
create
public static ConditionalRowMutation create(TargetId targetId, com.google.protobuf.ByteString rowKey) Creates a new instance of the mutation builder for the given target with targetId.- See Also:
-
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 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
Wraps the protobufCheckAndMutateRowRequest
.WARNING: Please note that the table_name will be overwritten by the configuration in the BigtableDataClient.
-
create(TargetId, ByteString)
instead.