Class RowMutationEntry (2.16.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
NameDescription
keyByteString
Returns
TypeDescription
RowMutationEntry

create(String key)

public static RowMutationEntry create(String key)

Creates a new instance of the mutation builder.

Parameter
NameDescription
keyString
Returns
TypeDescription
RowMutationEntry

createFromMutationUnsafe(ByteString key, Mutation mutation)

public static RowMutationEntry createFromMutationUnsafe(ByteString key, Mutation mutation)

Creates a new instance from existing mutation.

Parameters
NameDescription
keyByteString
mutationMutation
Returns
TypeDescription
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
NameDescription
keyByteString
Returns
TypeDescription
RowMutationEntry

Methods

deleteCells(String familyName, ByteString qualifier)

public RowMutationEntry deleteCells(String familyName, ByteString qualifier)

Adds a mutation which deletes cells from the specified column.

Parameters
NameDescription
familyNameString
qualifierByteString
Returns
TypeDescription
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
NameDescription
familyNameString
qualifierByteString
timestampRangeRange.TimestampRange
Returns
TypeDescription
RowMutationEntry

deleteCells(String familyName, String qualifier)

public RowMutationEntry deleteCells(String familyName, String qualifier)

Adds a mutation which deletes cells from the specified column.

Parameters
NameDescription
familyNameString
qualifierString
Returns
TypeDescription
RowMutationEntry

deleteFamily(String familyName)

public RowMutationEntry deleteFamily(String familyName)

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

Parameter
NameDescription
familyNameString
Returns
TypeDescription
RowMutationEntry

deleteRow()

public RowMutationEntry deleteRow()

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

Returns
TypeDescription
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
NameDescription
familyNameString
qualifierByteString
valueByteString
Returns
TypeDescription
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
NameDescription
familyNameString
qualifierByteString
valuelong
Returns
TypeDescription
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
NameDescription
familyNameString
qualifierByteString
timestamplong
valueByteString
Returns
TypeDescription
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
NameDescription
familyNameString
qualifierByteString
timestamplong
valuelong
Returns
TypeDescription
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
NameDescription
familyNameString
qualifierString
valueString
Returns
TypeDescription
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
NameDescription
familyNameString
qualifierString
valuelong
Returns
TypeDescription
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
NameDescription
familyNameString
qualifierString
timestamplong
valueString
Returns
TypeDescription
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
NameDescription
familyNameString
qualifierString
timestamplong
valuelong
Returns
TypeDescription
RowMutationEntry

toProto()

public MutateRowsRequest.Entry toProto()
Returns
TypeDescription
MutateRowsRequest.Entry