Interface GtidSet


public interface GtidSet
Common contract for specifying a Global Transaction Identifier (GTID).
Author:
Chris Cranford
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Checks whether the provided global transaction identifier is contained within this set.
    boolean
    Checks whether all GTIDs represented by this set are contained within the supplied set.
    boolean
     
    Obtain a copy of the GtidSet, except with only the GTIDs that are permitted based on the supplied predicate filter.
    Subtracts the two global transaction identifier sets.
    with(GtidSet other)
    Creates a new GtidSet that contains all global transaction identifiers in this set with those from the supplied other set.
  • Method Details

    • isEmpty

      boolean isEmpty()
      Returns:
      whether the set is empty
    • isContainedWithin

      boolean isContainedWithin(GtidSet other)
      Checks whether all GTIDs represented by this set are contained within the supplied set.
      Parameters:
      other - the other global transaction identifier set; may be null
      Returns:
      true if all global transaction identifiers are present in the provided set, false otherwise
    • contains

      boolean contains(String gtid)
      Checks whether the provided global transaction identifier is contained within this set.
      Parameters:
      gtid - the global transaction identifier to locate; may not be null
      Returns:
      true if the set contains the global transaction identifier, false otherwise
    • retainAll

      GtidSet retainAll(Predicate<String> filter)
      Obtain a copy of the GtidSet, except with only the GTIDs that are permitted based on the supplied predicate filter.
      Parameters:
      filter - the predicate filter to be applied, may be null
      Returns:
      the new global transaction identifier set or this if the filter is null.
    • subtract

      GtidSet subtract(GtidSet other)
      Subtracts the two global transaction identifier sets.
      Parameters:
      other - the other set; may be null
      Returns:
      a new GtidSet instance that contains the difference between the two sets.
    • with

      GtidSet with(GtidSet other)
      Creates a new GtidSet that contains all global transaction identifiers in this set with those from the supplied other set.
      Parameters:
      other - the other set with ranges that are added or overwritten on top of those in this set
      Returns:
      the new GtidSet or this if the other set is null or empty; never null