Enum BinlogOffsetKind
- java.lang.Object
-
- java.lang.Enum<BinlogOffsetKind>
-
- org.apache.flink.cdc.connectors.mysql.source.offset.BinlogOffsetKind
-
- All Implemented Interfaces:
Serializable,Comparable<BinlogOffsetKind>
public enum BinlogOffsetKind extends Enum<BinlogOffsetKind>
Predefined kind of binlog offset.Binlog offset kind describes some special binlog offsets such as earliest accessible binlog, the latest binlog offset currently, and a specific offset described by binlog file + position or GTID set.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description EARLIESTThe earliest accessible offset in the binlog.LATESTThe latest offset in the binlog.NON_STOPPINGA special offset indicating there's no ending offsets for the binlog reader.SPECIFICA specific offset described by binlog file name and position, or GTID set if GTID is enabled on the cluster.TIMESTAMPThe binlog offset is described by a timestamp, for example "1667232000" means start reading from events happens at 2022-11-01 00:00:00.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static BinlogOffsetKindvalueOf(String name)Returns the enum constant of this type with the specified name.static BinlogOffsetKind[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
EARLIEST
public static final BinlogOffsetKind EARLIEST
The earliest accessible offset in the binlog.
-
LATEST
public static final BinlogOffsetKind LATEST
The latest offset in the binlog.
-
TIMESTAMP
public static final BinlogOffsetKind TIMESTAMP
The binlog offset is described by a timestamp, for example "1667232000" means start reading from events happens at 2022-11-01 00:00:00.
-
SPECIFIC
public static final BinlogOffsetKind SPECIFIC
A specific offset described by binlog file name and position, or GTID set if GTID is enabled on the cluster. For example:- Binlog file "mysql-bin.000002" and position 4
- GTID set "24DA167-0C0C-11E8-8442-00059A3C7B00:1-19"
-
NON_STOPPING
public static final BinlogOffsetKind NON_STOPPING
A special offset indicating there's no ending offsets for the binlog reader.Please note that this is an INTERNAL kind and should not be used for specifying starting offset.
-
-
Method Detail
-
values
public static BinlogOffsetKind[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (BinlogOffsetKind c : BinlogOffsetKind.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static BinlogOffsetKind valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
-