Package io.debezium.connector.mysql
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 Summary
Modifier and TypeMethodDescriptionbooleanReturn whether the specified GTID is present in this set.Returns a copy of this with all intervals set to the beginning.booleanisContainedWithin(GtidSet other) Determine whether the GTIDs represented by this object are contained completely within the supplied set.booleanisEmpty()Returns whether thisGtidSetis empty.Obtain a copy of thisGtidSetexcept with only the GTID ranges match the specified predicate.Subtracts the two GTID sets.
-
Method Details
-
isEmpty
boolean isEmpty()Returns whether thisGtidSetis empty. -
retainAll
Obtain a copy of thisGtidSetexcept 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
sourceFilteris null; never null
-
isContainedWithin
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:
trueif all GTIDs are present in the provided set,falseotherwise
-
with
-
getGtidSetBeginning
GtidSet getGtidSetBeginning()Returns a copy of this with all intervals set to the beginning. -
contains
Return whether the specified GTID is present in this set.- Parameters:
gtid- the gtid to check; may not be null- Returns:
trueif contained by this set,falseotherwise
-
subtract
Subtracts the two GTID sets.- Parameters:
other- ther other set; may be null- Returns:
- a new
GtidSetthat contains the difference in GTIDs
-