Skip to content

Commit

Permalink
Added note about timestamp granularity in MutationApi interface. (#39)
Browse files Browse the repository at this point in the history
* Added note about timestamp granularity in MutationApi interface.

* Reworded the JavaDoc note for timestamp format
  • Loading branch information
rahulKQL committed Oct 29, 2019
1 parent 3a500af commit f2d7c83
Showing 1 changed file with 22 additions and 2 deletions.
Expand Up @@ -35,6 +35,10 @@ public interface MutationApi<T extends MutationApi<T>> {
* Adds a mutation which sets the value of the specified cell.
*
* <p>This is a convenience override that converts Strings to ByteStrings.
*
* <p>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`.
*/
T setCell(
@Nonnull String familyName, @Nonnull String qualifier, long timestamp, @Nonnull String value);
Expand All @@ -46,7 +50,13 @@ T setCell(
*/
T setCell(@Nonnull String familyName, @Nonnull ByteString qualifier, @Nonnull ByteString value);

/** Adds a mutation which sets the value of the specified cell. */
/**
* Adds a mutation which sets the value of the specified cell.
*
* <p>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`.
*/
T setCell(
@Nonnull String familyName,
@Nonnull ByteString qualifier,
Expand All @@ -65,6 +75,10 @@ T setCell(
* Adds a mutation which sets the value of the specified cell.
*
* <p>This is a convenience override that converts Strings to ByteStrings.
*
* <p>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`.
*/
T setCell(@Nonnull String familyName, @Nonnull String qualifier, long timestamp, long value);

Expand All @@ -75,7 +89,13 @@ T setCell(
*/
T setCell(@Nonnull String familyName, @Nonnull ByteString qualifier, long value);

/** Adds a mutation which sets the value of the specified cell. */
/**
* Adds a mutation which sets the value of the specified cell.
*
* <p>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`.
*/
T setCell(@Nonnull String familyName, @Nonnull ByteString qualifier, long timestamp, long value);

/** Adds a mutation which deletes cells from the specified column. */
Expand Down

0 comments on commit f2d7c83

Please sign in to comment.