Interface GtidSet

All Known Implementing Classes:
MariaDbGtidSet, MySqlGtidSet

public interface GtidSet
Represents a common contract for GTID behavior for MySQL and MariaDB.
Author:
Randall Hauch, Chris Cranford
  • Method Details

    • isEmpty

      boolean isEmpty()
      Returns whether this GtidSet is empty.
    • retainAll

      GtidSet retainAll(Predicate<String> sourceFilter)
      Obtain a copy of this GtidSet except with only the GTID ranges match the specified predicate.
      Parameters:
      sourceFilter - the predicate that returns whether a server identifier is to be included
      Returns:
      the new GtidSet, or this object if sourceFilter is null; never null
    • isContainedWithin

      boolean isContainedWithin(GtidSet other)
      Determine whether the GTIDs represented by this object are contained completely within the supplied set.
      Parameters:
      other - the other set of GTIDs; may be null
      Returns:
      true if all GTIDs are present in the provided set, false otherwise
    • with

      GtidSet with(GtidSet other)
      Obtain a copy of this GtidSet except overwritten with all the GTID ranges in the supplied GtidSet.
      Parameters:
      other - the other GtidSet with ranges to add/overwrite on top of those in this set
      Returns:
      the new GtidSet, or this object if other is null or empty; never null
    • getGtidSetBeginning

      GtidSet getGtidSetBeginning()
      Returns a copy of this with all intervals set to the beginning.
    • contains

      boolean contains(String gtid)
      Return whether the specified GTID is present in this set.
      Parameters:
      gtid - the gtid to check; may not be null
      Returns:
      true if contained by this set, false otherwise
    • subtract

      GtidSet subtract(GtidSet other)
      Subtracts the two GTID sets.
      Parameters:
      other - ther other set; may be null
      Returns:
      a new GtidSet that contains the difference in GTIDs