Class MetadataTableEncoder


  • @Internal
    public class MetadataTableEncoder
    extends java.lang.Object
    Helper methods that simplifies some conversion and extraction of metadata table content.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean isRowLocked​(com.google.cloud.bigtable.data.v2.models.Row row)
      Returns true if row is locked.
      static java.util.List<com.google.cloud.bigtable.data.v2.models.ChangeStreamContinuationToken> parseInitialContinuationTokens​(com.google.cloud.bigtable.data.v2.models.Row row)
      Return a list of initial token from a row.
      static @Nullable java.lang.String parseLockUuid​(com.google.cloud.bigtable.data.v2.models.Row row)
      Returns the uuid from a row.
      static @Nullable java.lang.String parseTokenFromRow​(com.google.cloud.bigtable.data.v2.models.Row row)
      Read the continuation token cell of a row from ReadRows.
      static @Nullable org.joda.time.Instant parseWatermarkFromRow​(com.google.cloud.bigtable.data.v2.models.Row row)
      Read the watermark cell of a row from ReadRows.
      static @Nullable org.joda.time.Instant parseWatermarkLastUpdatedFromRow​(com.google.cloud.bigtable.data.v2.models.Row row)
      Return the timestamp (the time it was updated) of the watermark cell.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MetadataTableEncoder

        public MetadataTableEncoder()
    • Method Detail

      • parseWatermarkFromRow

        public static @Nullable org.joda.time.Instant parseWatermarkFromRow​(com.google.cloud.bigtable.data.v2.models.Row row)
        Read the watermark cell of a row from ReadRows.
        Parameters:
        row - row to extract the watermark from
        Returns:
        the watermark of the row
      • parseWatermarkLastUpdatedFromRow

        public static @Nullable org.joda.time.Instant parseWatermarkLastUpdatedFromRow​(com.google.cloud.bigtable.data.v2.models.Row row)
        Return the timestamp (the time it was updated) of the watermark cell.
        Parameters:
        row - row to extract the timestamp from
        Returns:
        the timestamp of the watermark cell.
      • parseTokenFromRow

        public static @Nullable java.lang.String parseTokenFromRow​(com.google.cloud.bigtable.data.v2.models.Row row)
        Read the continuation token cell of a row from ReadRows.
        Parameters:
        row - to extract the token from
        Returns:
        the token of the row
      • isRowLocked

        public static boolean isRowLocked​(com.google.cloud.bigtable.data.v2.models.Row row)
        Returns true if row is locked.
        Parameters:
        row - to evaluate if it's locked
        Returns:
        true if row is locked. Otherwise, false.
      • parseLockUuid

        public static @Nullable java.lang.String parseLockUuid​(com.google.cloud.bigtable.data.v2.models.Row row)
        Returns the uuid from a row.
        Parameters:
        row - to extract the uuid
        Returns:
        the uuid of the row
      • parseInitialContinuationTokens

        public static java.util.List<com.google.cloud.bigtable.data.v2.models.ChangeStreamContinuationToken> parseInitialContinuationTokens​(com.google.cloud.bigtable.data.v2.models.Row row)
                                                                                                                                     throws com.google.protobuf.InvalidProtocolBufferException
        Return a list of initial token from a row.
        Parameters:
        row - to extract the initial tokens
        Returns:
        a list of tokens from the row
        Throws:
        com.google.protobuf.InvalidProtocolBufferException - when failed to parse tokens.