Class ChildPartition

  • All Implemented Interfaces:
    java.io.Serializable

    @DefaultCoder(org.apache.beam.sdk.extensions.avro.coders.AvroCoder.class)
    public class ChildPartition
    extends java.lang.Object
    implements java.io.Serializable
    A child partition represents a new partition that should be queried. Child partitions are emitted in ChildPartitionsRecord.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      ChildPartition​(java.lang.String token, java.lang.String parentToken)
      Constructs a child partition, which will have its own token and the parent that it originated from.
      ChildPartition​(java.lang.String token, java.util.HashSet<java.lang.String> parentTokens)
      Constructs a child partition, which will have its own token and the parents that it originated from.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)  
      java.util.HashSet<java.lang.String> getParentTokens()
      The unique partition identifiers of the parent partitions where this child partition originated from.
      java.lang.String getToken()
      Unique partition identifier, which can be used to perform a change stream query.
      int hashCode()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • ChildPartition

        public ChildPartition​(java.lang.String token,
                              java.util.HashSet<java.lang.String> parentTokens)
        Constructs a child partition, which will have its own token and the parents that it originated from. A child partition will have a single parent if it is originated from a partition move or split. A child partition will have multiple parents if it is originated from a partition merge.
        Parameters:
        token - the child partition token
        parentTokens - the partition tokens of the parent(s) that originated the child partition
      • ChildPartition

        public ChildPartition​(java.lang.String token,
                              java.lang.String parentToken)
        Constructs a child partition, which will have its own token and the parent that it originated from. Use this constructor for child partitions with a single parent (generated from a move or split). If a child partition has multiple parents use the constructor ChildPartition(java.lang.String,java.util.HashSet<java.lang.String>).
        Parameters:
        token - the child partition token
        parentToken - the partition tokens of the parent that originated the child partition
    • Method Detail

      • getToken

        public java.lang.String getToken()
        Unique partition identifier, which can be used to perform a change stream query.
        Returns:
        the unique partition identifier
      • getParentTokens

        public java.util.HashSet<java.lang.String> getParentTokens()
        The unique partition identifiers of the parent partitions where this child partition originated from.
        Returns:
        a set of parent partition tokens
      • equals

        public boolean equals​(@Nullable
                              java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object