public final class Mutation extends Object implements MutationApi<Mutation>, Serializable
MutationApi that can be used to create and represent a
list of mutations. It used by RowMutation and ConditionalRowMutation to
encapsulate a list of mutations that will to be applied to a single row.| Modifier and Type | Method and Description |
|---|---|
static Mutation |
create()
Creates new instance of Mutation object.
|
static Mutation |
createUnsafe()
Creates new instance of Mutation object which allows setCell operation to use server side
timestamp.
|
Mutation |
deleteCells(String familyName,
ByteString qualifier)
Adds a mutation which deletes cells from the specified column.
|
Mutation |
deleteCells(String familyName,
ByteString qualifier,
Range.TimestampRange timestampRange)
Adds a mutation which deletes cells from the specified column, restricted to a given timestamp
range.
|
Mutation |
deleteCells(String familyName,
String qualifier)
Adds a mutation which deletes cells from the specified column.
|
Mutation |
deleteFamily(String familyName)
Adds a mutation which deletes all cells from the specified column family.
|
Mutation |
deleteRow()
Adds a mutation which deletes all cells from the containing row.
|
static Mutation |
fromProtoUnsafe(List<Mutation> protos)
Wraps the List of protobuf
Mutation. |
Mutation |
setCell(String familyName,
ByteString qualifier,
ByteString value)
Adds a mutation which sets the value of the specified cell.
|
Mutation |
setCell(String familyName,
ByteString qualifier,
long value)
Adds a mutation which sets the value of the specified cell.
|
Mutation |
setCell(String familyName,
ByteString qualifier,
long timestamp,
ByteString value)
Adds a mutation which sets the value of the specified cell.
|
Mutation |
setCell(String familyName,
ByteString qualifier,
long timestamp,
long value)
Adds a mutation which sets the value of the specified cell.
|
Mutation |
setCell(String familyName,
String qualifier,
long value)
Adds a mutation which sets the value of the specified cell.
|
Mutation |
setCell(String familyName,
String qualifier,
long timestamp,
long value)
Adds a mutation which sets the value of the specified cell.
|
Mutation |
setCell(String familyName,
String qualifier,
long timestamp,
String value)
Adds a mutation which sets the value of the specified cell.
|
Mutation |
setCell(String familyName,
String qualifier,
String value)
Adds a mutation which sets the value of the specified cell.
|
public static Mutation create()
@BetaApi public static Mutation createUnsafe()
@BetaApi public static Mutation fromProtoUnsafe(List<Mutation> protos)
Mutation. This methods, like createUnsafe(), allows setCell operation to use server side timestamp. This is dangerous
because mutations will no longer be idempotent, which might cause multiple duplicate values to
be stored in Bigtable. This option should only be used for advanced usecases with extreme care.public Mutation setCell(@Nonnull String familyName, @Nonnull String qualifier, @Nonnull String value)
MutationApiThis a convenience method that converts Strings to ByteStrings and uses microseconds since epoch as the timestamp.
setCell in interface MutationApi<Mutation>public Mutation setCell(@Nonnull String familyName, @Nonnull String qualifier, long timestamp, @Nonnull String value)
MutationApiThis is a convenience override that converts Strings to ByteStrings.
setCell in interface MutationApi<Mutation>public Mutation setCell(@Nonnull String familyName, @Nonnull ByteString qualifier, @Nonnull ByteString value)
MutationApiUses microseconds since epoch as the timestamp.
setCell in interface MutationApi<Mutation>public Mutation setCell(@Nonnull String familyName, @Nonnull ByteString qualifier, long timestamp, @Nonnull ByteString value)
MutationApisetCell in interface MutationApi<Mutation>public Mutation setCell(@Nonnull String familyName, @Nonnull String qualifier, long value)
MutationApiThis a convenience method that converts Strings to ByteStrings and uses microseconds since epoch as the timestamp. Also it accepts long value.
setCell in interface MutationApi<Mutation>public Mutation setCell(@Nonnull String familyName, @Nonnull String qualifier, long timestamp, long value)
MutationApiThis is a convenience override that converts Strings to ByteStrings.
setCell in interface MutationApi<Mutation>public Mutation setCell(@Nonnull String familyName, @Nonnull ByteString qualifier, long value)
MutationApiUses microseconds since epoch as the timestamp.
setCell in interface MutationApi<Mutation>public Mutation setCell(@Nonnull String familyName, @Nonnull ByteString qualifier, long timestamp, long value)
MutationApisetCell in interface MutationApi<Mutation>public Mutation deleteCells(@Nonnull String familyName, @Nonnull String qualifier)
MutationApideleteCells in interface MutationApi<Mutation>public Mutation deleteCells(@Nonnull String familyName, @Nonnull ByteString qualifier)
MutationApideleteCells in interface MutationApi<Mutation>public Mutation deleteCells(@Nonnull String familyName, @Nonnull ByteString qualifier, @Nonnull Range.TimestampRange timestampRange)
MutationApideleteCells in interface MutationApi<Mutation>familyName - The family name.qualifier - The qualifier.timestampRange - The timestamp range in microseconds.public Mutation deleteFamily(@Nonnull String familyName)
MutationApideleteFamily in interface MutationApi<Mutation>public Mutation deleteRow()
MutationApideleteRow in interface MutationApi<Mutation>Copyright © 2019 Google LLC. All rights reserved.