public class ChangeStreamContinuationTokenHelper
extends java.lang.Object
Constructor and Description |
---|
ChangeStreamContinuationTokenHelper() |
Modifier and Type | Method and 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.
|
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
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" }
.
parentPartition
- parent partition where the ChangeStreamContinuationToken is generatedtoken
- ChangeStreamContinuationToken to be fixedjava.lang.IllegalArgumentException