Interface GtidSet
public interface GtidSet
Common contract for specifying a Global Transaction Identifier (GTID).
- Author:
- Chris Cranford
-
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks whether the provided global transaction identifier is contained within this set.booleanisContainedWithin(GtidSet other) Checks whether all GTIDs represented bythisset are contained within the supplied set.booleanisEmpty()Obtain a copy of theGtidSet, except with only the GTIDs that are permitted based on the supplied predicatefilter.Subtracts the two global transaction identifier sets.Creates a newGtidSetthat contains all global transaction identifiers in this set with those from the supplied other set.
-
Method Details
-
isEmpty
boolean isEmpty()- Returns:
- whether the set is empty
-
isContainedWithin
Checks whether all GTIDs represented bythisset are contained within the supplied set.- Parameters:
other- the other global transaction identifier set; may be null- Returns:
- true if all global transaction identifiers are present in the provided set, false otherwise
-
contains
Checks whether the provided global transaction identifier is contained within this set.- Parameters:
gtid- the global transaction identifier to locate; may not be null- Returns:
- true if the set contains the global transaction identifier, false otherwise
-
retainAll
Obtain a copy of theGtidSet, except with only the GTIDs that are permitted based on the supplied predicatefilter.- Parameters:
filter- the predicate filter to be applied, may be null- Returns:
- the new global transaction identifier set or
thisif the filter is null.
-
subtract
Subtracts the two global transaction identifier sets.- Parameters:
other- the other set; may be null- Returns:
- a new
GtidSetinstance that contains the difference between the two sets.
-
with
Creates a newGtidSetthat contains all global transaction identifiers in this set with those from the supplied other set.- Parameters:
other- the other set with ranges that are added or overwritten on top of those in this set- Returns:
- the new
GtidSetorthisif the other set is null or empty; never null
-