Class GtidSet.Interval

java.lang.Object
io.debezium.connector.mysql.GtidSet.Interval
All Implemented Interfaces:
Comparable<GtidSet.Interval>
Enclosing class:
GtidSet

@Immutable public static class GtidSet.Interval extends Object implements Comparable<GtidSet.Interval>
  • Field Details

    • start

      private final long start
    • end

      private final long end
  • Constructor Details

    • Interval

      public Interval(long start, long end)
  • Method Details

    • getStart

      public long getStart()
      Get the starting transaction number in this interval.
      Returns:
      this interval's first transaction number
    • getEnd

      public long getEnd()
      Get the ending transaction number in this interval.
      Returns:
      this interval's last transaction number
    • isContainedWithin

      public boolean isContainedWithin(GtidSet.Interval other)
      Determine if this interval is completely within the supplied interval.
      Parameters:
      other - the interval to compare with
      Returns:
      true if the start is greater than or equal to the supplied interval's start and the end is less than or equal to the supplied interval's end, or false otherwise
    • contains

      public boolean contains(long transactionId)
    • contains

      public boolean contains(GtidSet.Interval other)
    • nonintersecting

      public boolean nonintersecting(GtidSet.Interval other)
    • remove

      public List<GtidSet.Interval> remove(GtidSet.Interval other)
    • removeAll

      public List<GtidSet.Interval> removeAll(List<GtidSet.Interval> otherIntervals)
    • compareTo

      public int compareTo(GtidSet.Interval that)
      Specified by:
      compareTo in interface Comparable<GtidSet.Interval>
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object