Class MySqlGtidSet
java.lang.Object
io.debezium.connector.mysql.strategy.mysql.MySqlGtidSet
- All Implemented Interfaces:
GtidSet
Represents a set of MySQL GTIDs.
This is an improvement ove
GtidSet that is immutable, and
more properly supports comparisons.- Author:
- Chris Cranford, Randall Hauch
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classA range of GTIDs for a single server with a specific Uuid. -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionMySqlGtidSet(String gtids) protectedMySqlGtidSet(Map<String, MySqlGtidSet.UUIDSet> uuidSetsByServerId) -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturn whether the specified GTID is present in this set.booleanforServerWithId(String uuid) Find theMySqlGtidSet.UUIDSetfor the server with the specified Uuid.Returns a copy of this with all intervals set to the beginning.Get an immutable collection of therange of GTIDs for a single server.inthashCode()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.toString()
-
Field Details
-
uuidSetsByServerId
-
GTID_DELIMITER
-
-
Constructor Details
-
MySqlGtidSet
-
MySqlGtidSet
-
-
Method Details
-
isEmpty
public boolean isEmpty()Description copied from interface:GtidSetReturns whether thisGtidSetis empty. -
retainAll
Description copied from interface:GtidSetObtain a copy of thisGtidSetexcept with only the GTID ranges match the specified predicate. -
isContainedWithin
Description copied from interface:GtidSetDetermine whether the GTIDs represented by this object are contained completely within the supplied set.- Specified by:
isContainedWithinin interfaceGtidSet- Parameters:
other- the other set of GTIDs; may be null- Returns:
trueif all GTIDs are present in the provided set,falseotherwise
-
with
Description copied from interface:GtidSet -
getGtidSetBeginning
Description copied from interface:GtidSetReturns a copy of this with all intervals set to the beginning.- Specified by:
getGtidSetBeginningin interfaceGtidSet
-
contains
Description copied from interface:GtidSetReturn whether the specified GTID is present in this set. -
subtract
Description copied from interface:GtidSetSubtracts the two GTID sets. -
getUUIDSets
Get an immutable collection of therange of GTIDs for a single server.- Returns:
- the
GTID ranges for each server; never null
-
forServerWithId
Find theMySqlGtidSet.UUIDSetfor the server with the specified Uuid.- Parameters:
uuid- the Uuid of the server- Returns:
- the
MySqlGtidSet.UUIDSetfor the identified server, ornullif there are no GTIDs from that server.
-
hashCode
public int hashCode() -
equals
-
toString
-