Class NewPartition
- java.lang.Object
-
- org.apache.beam.sdk.io.gcp.bigtable.changestreams.model.NewPartition
-
- All Implemented Interfaces:
java.io.Serializable
@Internal public class NewPartition extends java.lang.Object implements java.io.SerializableRepresent new partition as a result of splits and merges.Parent partitions stop streaming and record their change stream continuation tokens. The tokens are collected to continue the stream from the new partition.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description NewPartition(com.google.cloud.bigtable.data.v2.models.Range.ByteStringRange partition, java.util.List<com.google.cloud.bigtable.data.v2.models.ChangeStreamContinuationToken> changeStreamContinuationTokens, org.joda.time.Instant lowWatermark)NewPartition(com.google.cloud.bigtable.data.v2.models.Range.ByteStringRange partition, java.util.List<com.google.cloud.bigtable.data.v2.models.ChangeStreamContinuationToken> changeStreamContinuationTokens, org.joda.time.Instant lowWatermark, org.joda.time.Instant lastUpdated)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)java.util.List<com.google.cloud.bigtable.data.v2.models.ChangeStreamContinuationToken>getChangeStreamContinuationTokens()org.joda.time.InstantgetLastUpdated()org.joda.time.InstantgetLowWatermark()java.util.List<com.google.cloud.bigtable.data.v2.models.Range.ByteStringRange>getParentPartitions()com.google.cloud.bigtable.data.v2.models.Range.ByteStringRangegetPartition()NewPartitiongetSingleTokenNewPartition(com.google.cloud.bigtable.data.v2.models.Range.ByteStringRange parentPartition)Return a new NewPartition that only contains one token that matches the parentPartition.inthashCode()java.lang.StringtoString()
-
-
-
Constructor Detail
-
NewPartition
public NewPartition(com.google.cloud.bigtable.data.v2.models.Range.ByteStringRange partition, java.util.List<com.google.cloud.bigtable.data.v2.models.ChangeStreamContinuationToken> changeStreamContinuationTokens, org.joda.time.Instant lowWatermark, org.joda.time.Instant lastUpdated)
-
NewPartition
public NewPartition(com.google.cloud.bigtable.data.v2.models.Range.ByteStringRange partition, java.util.List<com.google.cloud.bigtable.data.v2.models.ChangeStreamContinuationToken> changeStreamContinuationTokens, org.joda.time.Instant lowWatermark)
-
-
Method Detail
-
getPartition
public com.google.cloud.bigtable.data.v2.models.Range.ByteStringRange getPartition()
-
getChangeStreamContinuationTokens
public java.util.List<com.google.cloud.bigtable.data.v2.models.ChangeStreamContinuationToken> getChangeStreamContinuationTokens()
-
getLowWatermark
public org.joda.time.Instant getLowWatermark()
-
getParentPartitions
public java.util.List<com.google.cloud.bigtable.data.v2.models.Range.ByteStringRange> getParentPartitions()
-
getLastUpdated
public org.joda.time.Instant getLastUpdated()
-
getSingleTokenNewPartition
@Nullable public NewPartition getSingleTokenNewPartition(com.google.cloud.bigtable.data.v2.models.Range.ByteStringRange parentPartition)
Return a new NewPartition that only contains one token that matches the parentPartition. If the parentPartition does not exist, return null.- Parameters:
parentPartition- to parent partition to find within the tokens.- Returns:
- a NewPartition with one token with parentPartition. null otherwise.
-
equals
public boolean equals(@Nullable java.lang.Object o)- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-