Package com.github.shyiko.mysql.binlog
Class MariadbGtidSet
- java.lang.Object
-
- com.github.shyiko.mysql.binlog.GtidSet
-
- com.github.shyiko.mysql.binlog.MariadbGtidSet
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MariadbGtidSet.MariaGtid
-
Nested classes/interfaces inherited from class com.github.shyiko.mysql.binlog.GtidSet
GtidSet.Interval, GtidSet.UUIDSet
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<Long,MariadbGtidSet.MariaGtid>
positionMap
protected Map<Long,LinkedHashMap<Long,MariadbGtidSet.MariaGtid>>
seenMap
-
Constructor Summary
Constructors Constructor Description MariadbGtidSet()
MariadbGtidSet(String gtidSet)
Initialize a new MariaDB gtid set from a string, like: 0-1-24,0-555555-9709 DOMAIN_ID-SERVER_ID-SEQUENCE[,DOMAIN_ID-SERVER_ID-SEQUENCE] note that for duplicate domain ids it's "last one wins" for the current position
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(MariadbGtidSet.MariaGtid gtid)
boolean
add(String gtid)
void
addGtid(Object gtid)
boolean
equals(Object obj)
GtidSet.UUIDSet
getUUIDSet(String uuid)
Find theGtidSet.UUIDSet
for the server with the specified UUID.Collection<GtidSet.UUIDSet>
getUUIDSets()
Get 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.static boolean
isMariaGtidSet(String gtidSet)
GtidSet.UUIDSet
putUUIDSet(GtidSet.UUIDSet uuidSet)
Add or replace the UUIDSetString
toSeenString()
String
toString()
-
-
-
Field Detail
-
positionMap
protected Map<Long,MariadbGtidSet.MariaGtid> positionMap
-
seenMap
protected Map<Long,LinkedHashMap<Long,MariadbGtidSet.MariaGtid>> seenMap
-
-
Constructor Detail
-
MariadbGtidSet
public MariadbGtidSet()
-
MariadbGtidSet
public MariadbGtidSet(String gtidSet)
Initialize a new MariaDB gtid set from a string, like: 0-1-24,0-555555-9709 DOMAIN_ID-SERVER_ID-SEQUENCE[,DOMAIN_ID-SERVER_ID-SEQUENCE] note that for duplicate domain ids it's "last one wins" for the current position- Parameters:
gtidSet
- a string representing the gtid set.
-
-
Method Detail
-
isMariaGtidSet
public static boolean isMariaGtidSet(String gtidSet)
-
toSeenString
public String toSeenString()
- Overrides:
toSeenString
in classGtidSet
-
getUUIDSets
public Collection<GtidSet.UUIDSet> getUUIDSets()
Description copied from class:GtidSet
Get an immutable collection of therange of GTIDs for a single server
.- Overrides:
getUUIDSets
in classGtidSet
- Returns:
- the
GTID ranges for each server
; never null
-
getUUIDSet
public GtidSet.UUIDSet getUUIDSet(String uuid)
Description copied from class:GtidSet
Find theGtidSet.UUIDSet
for the server with the specified UUID.- Overrides:
getUUIDSet
in classGtidSet
- Parameters:
uuid
- the UUID of the server- Returns:
- the
GtidSet.UUIDSet
for the identified server, ornull
if there are no GTIDs from that server.
-
putUUIDSet
public GtidSet.UUIDSet putUUIDSet(GtidSet.UUIDSet uuidSet)
Description copied from class:GtidSet
Add or replace the UUIDSet- Overrides:
putUUIDSet
in classGtidSet
- Parameters:
uuidSet
- UUIDSet to be added- Returns:
- the old
GtidSet.UUIDSet
for the server given in uuidSet param, ornull
if there are no UUIDSet for the given server.
-
add
public boolean add(String gtid)
-
add
public void add(MariadbGtidSet.MariaGtid gtid)
-
isContainedWithin
public boolean isContainedWithin(GtidSet other)
Description copied from class:GtidSet
Determine if the GTIDs represented by this object are contained completely within the supplied set of GTIDs. Note that if twoGtidSet
s are equal, then they both are subsets of the other.- Overrides:
isContainedWithin
in classGtidSet
- Parameters:
other
- the other set of GTIDs; may be null- Returns:
true
if all of the GTIDs in this set are equal to or completely contained within the supplied set of GTIDs, orfalse
otherwise
-
-