Class MariadbGtidSet

java.lang.Object
com.github.shyiko.mysql.binlog.GtidSet
com.github.shyiko.mysql.binlog.MariadbGtidSet

public class MariadbGtidSet extends GtidSet
Mariadb Global Transaction ID
Author:
Winger
See Also:
  • GTID for the original doc
  • Field Details

  • Constructor Details

    • MariadbGtidSet

      public MariadbGtidSet()
    • MariadbGtidSet

      public MariadbGtidSet(String gtidSet)
      Initialize a new MariaDB gtid set from a string, like: 0-1-24,0-555555-9709 DOMAIN_ID-SERVER_ID-SEQUENCE[,DOMAIN_ID-SERVER_ID-SEQUENCE] note that for duplicate domain ids it's "last one wins" for the current position
      Parameters:
      gtidSet - a string representing the gtid set.
  • Method Details

    • isMariaGtidSet

      public static boolean isMariaGtidSet(String gtidSet)
    • toString

      public String toString()
      Overrides:
      toString in class GtidSet
    • toSeenString

      public String toSeenString()
      Overrides:
      toSeenString in class GtidSet
    • getUUIDSets

      public Collection<GtidSet.UUIDSet> getUUIDSets()
      Description copied from class: GtidSet
      Get an immutable collection of the range of GTIDs for a single server.
      Overrides:
      getUUIDSets in class GtidSet
      Returns:
      the GTID ranges for each server; never null
    • getUUIDSet

      public GtidSet.UUIDSet getUUIDSet(String uuid)
      Description copied from class: GtidSet
      Find the GtidSet.UUIDSet for the server with the specified UUID.
      Overrides:
      getUUIDSet in class GtidSet
      Parameters:
      uuid - the UUID of the server
      Returns:
      the GtidSet.UUIDSet for the identified server, or null if there are no GTIDs from that server.
    • putUUIDSet

      public GtidSet.UUIDSet putUUIDSet(GtidSet.UUIDSet uuidSet)
      Description copied from class: GtidSet
      Add or replace the UUIDSet
      Overrides:
      putUUIDSet in class GtidSet
      Parameters:
      uuidSet - UUIDSet to be added
      Returns:
      the old GtidSet.UUIDSet for the server given in uuidSet param, or null if there are no UUIDSet for the given server.
    • add

      public boolean add(String gtid)
      Overrides:
      add in class GtidSet
      Parameters:
      gtid - GTID ("source_id:transaction_id")
      Returns:
      whether or not gtid was added to the set (false if it was already there)
    • addGtid

      public void addGtid(Object gtid)
      Overrides:
      addGtid in class GtidSet
    • add

      public void add(MariadbGtidSet.MariaGtid gtid)
    • isContainedWithin

      public boolean isContainedWithin(GtidSet other)
      Description copied from class: GtidSet
      Determine if the GTIDs represented by this object are contained completely within the supplied set of GTIDs. Note that if two GtidSets are equal, then they both are subsets of the other.
      Overrides:
      isContainedWithin in class GtidSet
      Parameters:
      other - the other set of GTIDs; may be null
      Returns:
      true if all of the GTIDs in this set are equal to or completely contained within the supplied set of GTIDs, or false otherwise
    • hashCode

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

      public boolean equals(Object obj)
      Overrides:
      equals in class GtidSet