Class ChangeStreamContinuationTokenHelper


  • public class ChangeStreamContinuationTokenHelper
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static com.google.cloud.bigtable.data.v2.models.ChangeStreamContinuationToken getTokenWithCorrectPartition​(com.google.cloud.bigtable.data.v2.models.Range.ByteStringRange parentPartition, com.google.cloud.bigtable.data.v2.models.ChangeStreamContinuationToken token)
      Return the continuation token with correct partition.
      • Methods inherited from class java.lang.Object

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

      • ChangeStreamContinuationTokenHelper

        public ChangeStreamContinuationTokenHelper()
    • Method Detail

      • getTokenWithCorrectPartition

        public static com.google.cloud.bigtable.data.v2.models.ChangeStreamContinuationToken getTokenWithCorrectPartition​(com.google.cloud.bigtable.data.v2.models.Range.ByteStringRange parentPartition,
                                                                                                                          com.google.cloud.bigtable.data.v2.models.ChangeStreamContinuationToken token)
                                                                                                                   throws java.lang.IllegalArgumentException
        Return the continuation token with correct partition. The partition in the ChangeStreamContinuationToken for merges is not the correct partition (this is a backend bug that is being fixed). The partition currently represents the child partition, where the current partition should merge to.

        For example: Partition [A, B) gets CloseStream to merge into [A, C). The ChangeStreamContinuationToken returned is { partition = [A, C), token = "token1" } . However, the correct ChangeStreamContinuationToken should be { partition = [A, B), token = "token1" }.

        Parameters:
        parentPartition - parent partition where the ChangeStreamContinuationToken is generated
        token - ChangeStreamContinuationToken to be fixed
        Returns:
        ChangeStreamContinuationToken with correct partition field
        Throws:
        java.lang.IllegalArgumentException