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 classMariadbGtidSet.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>positionMapprotected 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 voidadd(MariadbGtidSet.MariaGtid gtid)booleanadd(String gtid)voidaddGtid(Object gtid)booleanequals(Object obj)GtidSet.UUIDSetgetUUIDSet(String uuid)Find theGtidSet.UUIDSetfor the server with the specified UUID.Collection<GtidSet.UUIDSet>getUUIDSets()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 booleanisMariaGtidSet(String gtidSet)GtidSet.UUIDSetputUUIDSet(GtidSet.UUIDSet uuidSet)Add or replace the UUIDSetStringtoSeenString()StringtoString()
-
-
-
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:
toSeenStringin classGtidSet
-
getUUIDSets
public Collection<GtidSet.UUIDSet> getUUIDSets()
Description copied from class:GtidSetGet an immutable collection of therange of GTIDs for a single server.- Overrides:
getUUIDSetsin classGtidSet- Returns:
- the
GTID ranges for each server; never null
-
getUUIDSet
public GtidSet.UUIDSet getUUIDSet(String uuid)
Description copied from class:GtidSetFind theGtidSet.UUIDSetfor the server with the specified UUID.- Overrides:
getUUIDSetin classGtidSet- Parameters:
uuid- the UUID of the server- Returns:
- the
GtidSet.UUIDSetfor the identified server, ornullif there are no GTIDs from that server.
-
putUUIDSet
public GtidSet.UUIDSet putUUIDSet(GtidSet.UUIDSet uuidSet)
Description copied from class:GtidSetAdd or replace the UUIDSet- Overrides:
putUUIDSetin classGtidSet- 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
public boolean add(String gtid)
-
add
public void add(MariadbGtidSet.MariaGtid gtid)
-
isContainedWithin
public boolean isContainedWithin(GtidSet other)
Description copied from class:GtidSetDetermine 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.- Overrides:
isContainedWithinin classGtidSet- 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
-
-