Interface MutationApi<T> (2.37.0)

public interface MutationApi<T>

The API for creating mutations for a single row.

Type Parameter

NameDescription
T

Methods

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

public abstract T 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
NameDescription
familyNameString
qualifierValue
timestampValue
inputValue
Returns
TypeDescription
T

addToCell(String familyName, ByteString qualifier, long timestamp, long input)

public default T addToCell(String familyName, ByteString qualifier, long timestamp, long input)

Adds an int64 value to an aggregate cell. The column family must be an aggregate family and have an "int64" input type 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
NameDescription
familyNameString
qualifierByteString
timestamplong
inputlong
Returns
TypeDescription
T

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

public default T addToCell(String familyName, String qualifier, long timestamp, long value)

Adds an int64 value to an aggregate cell. The column family must be an aggregate family and have an "int64" input type or this mutation will be rejected.

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
T

deleteCells(String familyName, ByteString qualifier)

public abstract T deleteCells(String familyName, ByteString qualifier)

Adds a mutation which deletes cells from the specified column.

Parameters
NameDescription
familyNameString
qualifierByteString
Returns
TypeDescription
T

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

public abstract T 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

The family name.

qualifierByteString

The qualifier.

timestampRangeRange.TimestampRange

The timestamp range in microseconds.

Returns
TypeDescription
T

deleteCells(String familyName, String qualifier)

public abstract T deleteCells(String familyName, String qualifier)

Adds a mutation which deletes cells from the specified column.

Parameters
NameDescription
familyNameString
qualifierString
Returns
TypeDescription
T

deleteFamily(String familyName)

public abstract T deleteFamily(String familyName)

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

Parameter
NameDescription
familyNameString
Returns
TypeDescription
T

deleteRow()

public abstract T deleteRow()

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

Returns
TypeDescription
T

setCell(String familyName, ByteString qualifier, ByteString value)

public abstract T 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
T

setCell(String familyName, ByteString qualifier, long value)

public abstract T 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
T

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

public abstract T 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
T

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

public abstract T 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
T

setCell(String familyName, String qualifier, String value)

public abstract T 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
T

setCell(String familyName, String qualifier, long value)

public abstract T 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
T

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

public abstract T 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
T

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

public abstract T 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
T