Class RowMutationEntry (2.44.0)

public class RowMutationEntry implements MutationApi<RowMutationEntry>, Serializable

Represents a list of mutations targeted at a single row. It is meant to be used as an parameter for com.google.cloud.bigtable.data.v2.BigtableDataClient#newBulkMutationBatcher(String).

Note: The changes in the mutation will be applied atomically but the ordering between different RowMutationEntry instances is not guaranteed.

Inheritance

java.lang.Object > RowMutationEntry

Implements

com.google.cloud.bigtable.data.v2.models.MutationApi<com.google.cloud.bigtable.data.v2.models.RowMutationEntry>, Serializable

Static Methods

create(ByteString key)

public static RowMutationEntry create(ByteString key)

Creates a new instance of the mutation builder.

Parameter
Name Description
key ByteString
Returns
Type Description
RowMutationEntry

create(String key)

public static RowMutationEntry create(String key)

Creates a new instance of the mutation builder.

Parameter
Name Description
key String
Returns
Type Description
RowMutationEntry

createFromMutationUnsafe(ByteString key, Mutation mutation)

public static RowMutationEntry createFromMutationUnsafe(ByteString key, Mutation mutation)

Creates a new instance from existing mutation.

Parameters
Name Description
key ByteString
mutation Mutation
Returns
Type Description
RowMutationEntry

createUnsafe(ByteString key)

public static RowMutationEntry createUnsafe(ByteString key)

Creates new instance of mutation builder which allows server timestamp for setCell operations.

NOTE: This functionality is intended for advanced usage. See Also: Mutation#createUnsafe()for more explanation.

Parameter
Name Description
key ByteString
Returns
Type Description
RowMutationEntry

Methods

addToCell(String familyName, Value qualifier, Value timestamp, Value input)

public RowMutationEntry addToCell(String familyName, Value qualifier, Value timestamp, Value input)

Adds a Value to an aggregate cell. The column family must be an aggregate family and have an input type matching the type of Value 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.

Parameters
Name Description
familyName String
qualifier Value
timestamp Value
input Value
Returns
Type Description
RowMutationEntry

deleteCells(String familyName, ByteString qualifier)

public RowMutationEntry deleteCells(String familyName, ByteString qualifier)

Adds a mutation which deletes cells from the specified column.

Parameters
Name Description
familyName String
qualifier ByteString
Returns
Type Description
RowMutationEntry

deleteCells(String familyName, ByteString qualifier, Range.TimestampRange timestampRange)

public RowMutationEntry deleteCells(String familyName, ByteString qualifier, Range.TimestampRange timestampRange)

Adds a mutation which deletes cells from the specified column, restricted to a given timestamp range.

Parameters
Name Description
familyName String
qualifier ByteString
timestampRange Range.TimestampRange
Returns
Type Description
RowMutationEntry

deleteCells(String familyName, String qualifier)

public RowMutationEntry deleteCells(String familyName, String qualifier)

Adds a mutation which deletes cells from the specified column.

Parameters
Name Description
familyName String
qualifier String
Returns
Type Description
RowMutationEntry

deleteFamily(String familyName)

public RowMutationEntry deleteFamily(String familyName)

Adds a mutation which deletes all cells from the specified column family.

Parameter
Name Description
familyName String
Returns
Type Description
RowMutationEntry

deleteRow()

public RowMutationEntry deleteRow()

Adds a mutation which deletes all cells from the containing row.

Returns
Type Description
RowMutationEntry

mergeToCell(String familyName, Value qualifier, Value timestamp, Value input)

public RowMutationEntry mergeToCell(String familyName, Value qualifier, Value timestamp, Value input)

Merges a Value accumulator 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.

Parameters
Name Description
familyName String
qualifier Value
timestamp Value
input Value
Returns
Type Description
RowMutationEntry

setCell(String familyName, ByteString qualifier, ByteString value)

public RowMutationEntry setCell(String familyName, ByteString qualifier, ByteString value)

Adds a mutation which sets the value of the specified cell.

Uses microseconds since epoch as the timestamp.

Parameters
Name Description
familyName String
qualifier ByteString
value ByteString
Returns
Type Description
RowMutationEntry

setCell(String familyName, ByteString qualifier, long value)

public RowMutationEntry setCell(String familyName, ByteString qualifier, long value)

Adds a mutation which sets the value of the specified cell.

Uses microseconds since epoch as the timestamp.

Parameters
Name Description
familyName String
qualifier ByteString
value long
Returns
Type Description
RowMutationEntry

setCell(String familyName, ByteString qualifier, long timestamp, ByteString value)

public RowMutationEntry setCell(String familyName, ByteString qualifier, long timestamp, ByteString value)

Adds 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.

Parameters
Name Description
familyName String
qualifier ByteString
timestamp long
value ByteString
Returns
Type Description
RowMutationEntry

setCell(String familyName, ByteString qualifier, long timestamp, long value)

public RowMutationEntry setCell(String familyName, ByteString qualifier, long timestamp, long value)

Adds 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.

Parameters
Name Description
familyName String
qualifier ByteString
timestamp long
value long
Returns
Type Description
RowMutationEntry

setCell(String familyName, String qualifier, String value)

public RowMutationEntry setCell(String familyName, String qualifier, String value)

Adds 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.

Parameters
Name Description
familyName String
qualifier String
value String
Returns
Type Description
RowMutationEntry

setCell(String familyName, String qualifier, long value)

public RowMutationEntry setCell(String familyName, String qualifier, long value)

Adds 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.

Parameters
Name Description
familyName String
qualifier String
value long
Returns
Type Description
RowMutationEntry

setCell(String familyName, String qualifier, long timestamp, String value)

public RowMutationEntry setCell(String familyName, String qualifier, long timestamp, String value)

Adds 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.

Parameters
Name Description
familyName String
qualifier String
timestamp long
value String
Returns
Type Description
RowMutationEntry

setCell(String familyName, String qualifier, long timestamp, long value)

public RowMutationEntry setCell(String familyName, String qualifier, long timestamp, long value)

Adds 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.

Parameters
Name Description
familyName String
qualifier String
timestamp long
value long
Returns
Type Description
RowMutationEntry

toProto()

public MutateRowsRequest.Entry toProto()
Returns
Type Description
com.google.bigtable.v2.MutateRowsRequest.Entry