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
Modifier and TypeClassDescriptionstatic class
static class
A range of GTIDs for a single server with a specific Uuid. -
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionMySqlGtidSet
(String gtids) protected
MySqlGtidSet
(Map<String, MySqlGtidSet.UUIDSet> uuidSetsByServerId) -
Method Summary
Modifier and TypeMethodDescriptionboolean
Return whether the specified GTID is present in this set.boolean
forServerWithId
(String uuid) Find theMySqlGtidSet.UUIDSet
for 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
.int
hashCode()
boolean
isContainedWithin
(GtidSet other) Determine whether the GTIDs represented by this object are contained completely within the supplied set.boolean
isEmpty()
Returns whether thisGtidSet
is empty.Obtain a copy of thisGtidSet
except 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:GtidSet
Returns whether thisGtidSet
is empty. -
retainAll
Description copied from interface:GtidSet
Obtain a copy of thisGtidSet
except with only the GTID ranges match the specified predicate. -
isContainedWithin
Description copied from interface:GtidSet
Determine whether the GTIDs represented by this object are contained completely within the supplied set.- Specified by:
isContainedWithin
in interfaceGtidSet
- Parameters:
other
- the other set of GTIDs; may be null- Returns:
true
if all GTIDs are present in the provided set,false
otherwise
-
with
Description copied from interface:GtidSet
-
getGtidSetBeginning
Description copied from interface:GtidSet
Returns a copy of this with all intervals set to the beginning.- Specified by:
getGtidSetBeginning
in interfaceGtidSet
-
contains
Description copied from interface:GtidSet
Return whether the specified GTID is present in this set. -
subtract
Description copied from interface:GtidSet
Subtracts 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.UUIDSet
for the server with the specified Uuid.- Parameters:
uuid
- the Uuid of the server- Returns:
- the
MySqlGtidSet.UUIDSet
for the identified server, ornull
if there are no GTIDs from that server.
-
hashCode
public int hashCode() -
equals
-
toString
-