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
Modifier and TypeClassDescriptionstatic class
static class
A range of GTIDs for a single server with a specific Uuid. -
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
forServerWithId
(String uuid) Find theGtidSet.UUIDSet
for 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
.int
hashCode()
boolean
isContainedWithin
(GtidSet other) Determine if the GTIDs represented by this object are contained completely within the supplied set of GTIDs.Obtain a copy of thisGtidSet
except 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 thisGtidSet
except 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
sourceFilter
is 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.UUIDSet
for the server with the specified Uuid.- Parameters:
uuid
- the Uuid of the server- Returns:
- the
GtidSet.UUIDSet
for the identified server, ornull
if 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:
true
if all of the GTIDs in this set are completely contained within the supplied set of GTIDs, orfalse
otherwise
-
with
Obtain a copy of thisGtidSet
except overwritten with all of the GTID ranges in the suppliedGtidSet
.- Parameters:
other
- the otherGtidSet
with ranges to add/overwrite on top of those in this set;- Returns:
- the new GtidSet, or this object if
other
is null or empty; never null
-
getGtidSetBeginning
Returns a copy with all intervals set to beginning- Returns:
-
contains
-
subtract
-
hashCode
public int hashCode() -
equals
-
toString
-