public class BinlogOffset extends Object implements Comparable<BinlogOffset>, Serializable
This structure can also be used to deal the binlog event in transaction, a transaction may
contains multiple change events, and each change event may contain multiple rows. When restart
from a specific BinlogOffset, we need to skip the processed change events and the
processed rows.
| Modifier and Type | Field and Description |
|---|---|
static String |
BINLOG_FILENAME_OFFSET_KEY |
static String |
BINLOG_POSITION_OFFSET_KEY |
static String |
EVENTS_TO_SKIP_OFFSET_KEY |
static String |
GTID_SET_KEY |
static BinlogOffset |
INITIAL_OFFSET |
static BinlogOffset |
NO_STOPPING_OFFSET |
static String |
ROWS_TO_SKIP_OFFSET_KEY |
static String |
SERVER_ID_KEY |
static String |
TIMESTAMP_KEY |
| Constructor and Description |
|---|
BinlogOffset(Map<String,String> offset) |
BinlogOffset(String filename,
long position) |
BinlogOffset(String filename,
long position,
long restartSkipEvents,
long restartSkipRows,
long binlogEpochSecs,
String restartGtidSet,
Integer serverId) |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(BinlogOffset that)
This method is inspired by
HistoryRecordComparator. |
boolean |
equals(Object o) |
String |
getFilename() |
String |
getGtidSet() |
Map<String,String> |
getOffset() |
long |
getPosition() |
long |
getRestartSkipEvents() |
long |
getRestartSkipRows() |
Long |
getServerId() |
long |
getTimestamp() |
int |
hashCode() |
boolean |
isAfter(BinlogOffset that) |
boolean |
isAtOrAfter(BinlogOffset that) |
boolean |
isAtOrBefore(BinlogOffset that) |
boolean |
isBefore(BinlogOffset that) |
String |
toString() |
public static final String BINLOG_FILENAME_OFFSET_KEY
public static final String BINLOG_POSITION_OFFSET_KEY
public static final String EVENTS_TO_SKIP_OFFSET_KEY
public static final String ROWS_TO_SKIP_OFFSET_KEY
public static final String GTID_SET_KEY
public static final String TIMESTAMP_KEY
public static final String SERVER_ID_KEY
public static final BinlogOffset INITIAL_OFFSET
public static final BinlogOffset NO_STOPPING_OFFSET
public BinlogOffset(String filename, long position)
public String getFilename()
public long getPosition()
public long getRestartSkipEvents()
public long getRestartSkipRows()
public String getGtidSet()
public long getTimestamp()
public Long getServerId()
public int compareTo(BinlogOffset that)
HistoryRecordComparator.compareTo in interface Comparable<BinlogOffset>public boolean isAtOrBefore(BinlogOffset that)
public boolean isBefore(BinlogOffset that)
public boolean isAtOrAfter(BinlogOffset that)
public boolean isAfter(BinlogOffset that)
Copyright © 2022 The Apache Software Foundation. All rights reserved.