Class Mutation
- All Implemented Interfaces:
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.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionAdds aValueto an aggregate cell.static Mutationcreate()Creates new instance of Mutation object.static MutationCreates new instance of Mutation object which allows setCell operation to use server side timestamp.deleteCells(String familyName, com.google.protobuf.ByteString qualifier) Adds a mutation which deletes cells from the specified column.deleteCells(String familyName, com.google.protobuf.ByteString qualifier, Range.TimestampRange timestampRange) Adds a mutation which deletes cells from the specified column, restricted to a given timestamp range.deleteCells(String familyName, String qualifier) Adds a mutation which deletes cells from the specified column.deleteFamily(String familyName) Adds a mutation which deletes all cells from the specified column family.Adds a mutation which deletes all cells from the containing row.static MutationfromProtoUnsafe(Iterable<Mutation> protos) Wraps the List of protobufMutation.static MutationfromProtoUnsafe(List<Mutation> protos) Wraps the List of protobufMutation.mergeToCell(String familyName, Value qualifier, Value timestamp, Value value) Merges aValueaccumulator to an aggregate cell.Adds a mutation which sets the value of the specified cell.Adds a mutation which sets the value of the specified cell.setCell(String familyName, com.google.protobuf.ByteString qualifier, long timestamp, com.google.protobuf.ByteString value) Adds a mutation which sets the value of the specified cell.setCell(String familyName, com.google.protobuf.ByteString qualifier, com.google.protobuf.ByteString value) Adds a mutation which sets the value of the specified cell.Adds a mutation which sets the value of the specified cell.Adds a mutation which sets the value of the specified cell.Adds a mutation which sets the value of the specified cell.Adds a mutation which sets the value of the specified cell.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.google.cloud.bigtable.data.v2.models.MutationApi
addToCell, addToCell, mergeToCell, mergeToCell
-
Method Details
-
create
Creates new instance of Mutation object. -
createUnsafe
Creates new instance of Mutation object which 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. -
fromProtoUnsafe
Wraps the List of protobufMutation. This methods, likecreateUnsafe(), 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. -
fromProtoUnsafe
Wraps the List of protobufMutation. This methods, likecreateUnsafe(), 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. -
setCell
public Mutation setCell(@Nonnull String familyName, @Nonnull String qualifier, @Nonnull String value) Description copied from interface:MutationApiAdds a mutation which sets the value of the specified cell.This a convenience method that converts Strings to ByteStrings and uses microseconds since epoch as the timestamp.
- Specified by:
setCellin interfaceMutationApi<Mutation>
-
setCell
public Mutation setCell(@Nonnull String familyName, @Nonnull String qualifier, long timestamp, @Nonnull String value) Description copied from interface:MutationApiAdds a mutation which sets the value of the specified cell.This is a convenience override that converts Strings to ByteStrings.
Note: The timestamp values are in microseconds but must match the granularity of the table(defaults to `MILLIS`). Therefore, the given value must be a multiple of 1000 (millisecond granularity). For example: `1571902339435000`.
- Specified by:
setCellin interfaceMutationApi<Mutation>
-
setCell
public Mutation setCell(@Nonnull String familyName, @Nonnull com.google.protobuf.ByteString qualifier, @Nonnull com.google.protobuf.ByteString value) Description copied from interface:MutationApiAdds a mutation which sets the value of the specified cell.Uses microseconds since epoch as the timestamp.
- Specified by:
setCellin interfaceMutationApi<Mutation>
-
setCell
public Mutation setCell(@Nonnull String familyName, @Nonnull com.google.protobuf.ByteString qualifier, long timestamp, @Nonnull com.google.protobuf.ByteString value) Description copied from interface:MutationApiAdds a mutation which sets the value of the specified cell.Note: The timestamp values are in microseconds but must match the granularity of the table(defaults to `MILLIS`). Therefore, the given value must be a multiple of 1000 (millisecond granularity). For example: `1571902339435000`.
- Specified by:
setCellin interfaceMutationApi<Mutation>
-
setCell
Description copied from interface:MutationApiAdds a mutation which sets the value of the specified cell.This a convenience method that converts Strings to ByteStrings and uses microseconds since epoch as the timestamp. Also it accepts long value.
- Specified by:
setCellin interfaceMutationApi<Mutation>
-
setCell
public Mutation setCell(@Nonnull String familyName, @Nonnull String qualifier, long timestamp, long value) Description copied from interface:MutationApiAdds a mutation which sets the value of the specified cell.This is a convenience override that converts Strings to ByteStrings.
Note: The timestamp values are in microseconds but must match the granularity of the table(defaults to `MILLIS`). Therefore, the given value must be a multiple of 1000 (millisecond granularity). For example: `1571902339435000`.
- Specified by:
setCellin interfaceMutationApi<Mutation>
-
setCell
public Mutation setCell(@Nonnull String familyName, @Nonnull com.google.protobuf.ByteString qualifier, long value) Description copied from interface:MutationApiAdds a mutation which sets the value of the specified cell.Uses microseconds since epoch as the timestamp.
- Specified by:
setCellin interfaceMutationApi<Mutation>
-
setCell
public Mutation setCell(@Nonnull String familyName, @Nonnull com.google.protobuf.ByteString qualifier, long timestamp, long value) Description copied from interface:MutationApiAdds a mutation which sets the value of the specified cell.Note: The timestamp values are in microseconds but must match the granularity of the table(defaults to `MILLIS`). Therefore, the given value must be a multiple of 1000 (millisecond granularity). For example: `1571902339435000`.
- Specified by:
setCellin interfaceMutationApi<Mutation>
-
deleteCells
Description copied from interface:MutationApiAdds a mutation which deletes cells from the specified column.- Specified by:
deleteCellsin interfaceMutationApi<Mutation>
-
deleteCells
public Mutation deleteCells(@Nonnull String familyName, @Nonnull com.google.protobuf.ByteString qualifier) Description copied from interface:MutationApiAdds a mutation which deletes cells from the specified column.- Specified by:
deleteCellsin interfaceMutationApi<Mutation>
-
deleteCells
public Mutation deleteCells(@Nonnull String familyName, @Nonnull com.google.protobuf.ByteString qualifier, @Nonnull Range.TimestampRange timestampRange) Description copied from interface:MutationApiAdds a mutation which deletes cells from the specified column, restricted to a given timestamp range.- Specified by:
deleteCellsin interfaceMutationApi<Mutation>- Parameters:
familyName- The family name.qualifier- The qualifier.timestampRange- The timestamp range in microseconds.
-
deleteFamily
Description copied from interface:MutationApiAdds a mutation which deletes all cells from the specified column family.- Specified by:
deleteFamilyin interfaceMutationApi<Mutation>
-
deleteRow
Description copied from interface:MutationApiAdds a mutation which deletes all cells from the containing row.- Specified by:
deleteRowin interfaceMutationApi<Mutation>
-
addToCell
public Mutation addToCell(@Nonnull String familyName, @Nonnull Value qualifier, @Nonnull Value timestamp, @Nonnull Value value) Description copied from interface:MutationApiAdds aValueto an aggregate cell. The column family must be an aggregate family and have an input type matching the type ofValueor this mutation will be rejected.Note: The timestamp values are in microseconds but must match the granularity of the table(defaults to `MILLIS`). Therefore, the given value must be a multiple of 1000 (millisecond granularity). For example: `1571902339435000`.
- Specified by:
addToCellin interfaceMutationApi<Mutation>
-
mergeToCell
public Mutation mergeToCell(@Nonnull String familyName, @Nonnull Value qualifier, @Nonnull Value timestamp, @Nonnull Value value) Description copied from interface:MutationApiMerges aValueaccumulator to an aggregate cell. The column family must be an aggregate family or this mutation will be rejected.Note: The timestamp values are in microseconds but must match the granularity of the table(defaults to `MILLIS`). Therefore, the given value must be a multiple of 1000 (millisecond granularity). For example: `1571902339435000`.
- Specified by:
mergeToCellin interfaceMutationApi<Mutation>
-