Package com.github.shyiko.mysql.binlog
Class GtidSet
java.lang.Object
com.github.shyiko.mysql.binlog.GtidSet
- Direct Known Subclasses:
MariadbGtidSet
GTID set as described in GTID
Concepts of MySQL 5.6 Reference Manual.
gtid_set: uuid_set[,uuid_set]... uuid_set: uuid:interval[:interval]... uuid: hhhhhhhh-hhhh-hhhh-hhhh-hhhhhhhhhhhh, h: [0-9|A-F] interval: n[-n], (n >= 1)
- Author:
- Stanley Shyiko
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classAn interval of contiguous transaction identifiers.static final classA range of GTIDs for a single server with a specific UUID. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanvoidbooleangetUUIDSet(String uuid) Find theGtidSet.UUIDSetfor the server with the specified UUID.Get 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.static GtidSetputUUIDSet(GtidSet.UUIDSet uuidSet) Add or replace the UUIDSettoString()
-
Constructor Details
-
GtidSet
- Parameters:
gtidSet- gtid set comprised of closed intervals (like MySQL's executed_gtid_set).
-
-
Method Details
-
parse
-
getUUIDSets
Get an immutable collection of therange of GTIDs for a single server.- Returns:
- the
GTID ranges for each server; never null
-
getUUIDSet
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.
-
putUUIDSet
Add or replace the UUIDSet- Parameters:
uuidSet- UUIDSet to be added- Returns:
- the old
GtidSet.UUIDSetfor the server given in uuidSet param, ornullif there are no UUIDSet for the given server.
-
add
- Parameters:
gtid- GTID ("source_id:transaction_id")- Returns:
- whether or not gtid was added to the set (false if it was already there)
-
addGtid
-
isContainedWithin
Determine if the GTIDs represented by this object are contained completely within the supplied set of GTIDs. Note that if twoGtidSets are equal, then they both are subsets of the other.- Parameters:
other- the other set of GTIDs; may be null- Returns:
trueif all of the GTIDs in this set are equal to or completely contained within the supplied set of GTIDs, orfalseotherwise
-
hashCode
public int hashCode() -
equals
-
toString
-
toSeenString
-