Package io.debezium.connector.mysql
Class GtidSet
java.lang.Object
io.debezium.connector.mysql.GtidSet
A set of MySQL GTIDs. This is an improvement of
GtidSet that is immutable,
and more properly supports comparisons.- Author:
- 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanforServerWithId(String uuid) Find theGtidSet.UUIDSetfor the server with the specified Uuid.Returns a copy with all intervals set to beginningGet an immutable collection of therange of GTIDs for a single server.inthashCode()booleanisContainedWithin(GtidSet other) Determine if the GTIDs represented by this object are contained completely within the supplied set of GTIDs.Obtain a copy of thisGtidSetexcept with only the GTID ranges that have server UUIDs that match the given predicate.toString()
-
Field Details
-
uuidSetsByServerId
-
GTID_DELIMITER
-
-
Constructor Details
-
GtidSet
-
GtidSet
- Parameters:
gtids- the string representation of the GTIDs.
-
-
Method Details
-
retainAll
Obtain a copy of thisGtidSetexcept with only the GTID ranges that have server UUIDs that match the given predicate.- Parameters:
sourceFilter- the predicate that returns whether a server UUID is to be included- Returns:
- the new GtidSet, or this object if
sourceFilteris null; never null
-
getUUIDSets
Get an immutable collection of therange of GTIDs for a single server.- Returns:
- the
GTID ranges for each server; never null
-
forServerWithId
Find theGtidSet.UUIDSetfor the server with the specified Uuid.- Parameters:
uuid- the Uuid of the server- Returns:
- the
GtidSet.UUIDSetfor the identified server, ornullif there are no GTIDs from that server.
-
isContainedWithin
Determine if the GTIDs represented by this object are contained completely within the supplied set of GTIDs.- Parameters:
other- the other set of GTIDs; may be null- Returns:
trueif all of the GTIDs in this set are completely contained within the supplied set of GTIDs, orfalseotherwise
-
with
Obtain a copy of thisGtidSetexcept overwritten with all of the GTID ranges in the suppliedGtidSet.- Parameters:
other- the otherGtidSetwith ranges to add/overwrite on top of those in this set;- Returns:
- the new GtidSet, or this object if
otheris null or empty; never null
-
getGtidSetBeginning
Returns a copy with all intervals set to beginning- Returns:
-
contains
-
subtract
-
hashCode
public int hashCode() -
equals
-
toString
-