Package com.zendesk.maxwell.schema
Class MysqlPositionStore
- java.lang.Object
-
- com.zendesk.maxwell.schema.MysqlPositionStore
-
- Direct Known Subclasses:
ReadOnlyMysqlPositionStore
public class MysqlPositionStore extends Object
-
-
Constructor Summary
Constructors Constructor Description MysqlPositionStore(ConnectionPool pool, Long serverID, String clientID, boolean gtidMode)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cleanupOldRecoveryInfos()
protected List<String>
formatRecoveryFailure(MaxwellConfig config, List<RecoveryInfo> recoveries)
Position
get()
protected List<RecoveryInfo>
getAllRecoveryInfos()
protected List<RecoveryInfo>
getAllRecoveryInfos(Connection c)
Long
getLastHeartbeatSent()
Position
getLatestFromAnyClient()
RecoveryInfo
getRecoveryInfo(MaxwellConfig config)
protected RecoveryInfo
getRecoveryInfo(MaxwellConfig config, Connection c)
long
heartbeat()
void
heartbeat(long heartbeatValue)
static Position
positionFromResultSet(ResultSet rs, boolean gtidMode)
void
set(Position newPosition)
-
-
-
Constructor Detail
-
MysqlPositionStore
public MysqlPositionStore(ConnectionPool pool, Long serverID, String clientID, boolean gtidMode)
-
-
Method Detail
-
set
public void set(Position newPosition) throws SQLException, DuplicateProcessException
-
heartbeat
public void heartbeat(long heartbeatValue) throws SQLException, DuplicateProcessException
-
getLastHeartbeatSent
public Long getLastHeartbeatSent()
-
positionFromResultSet
public static Position positionFromResultSet(ResultSet rs, boolean gtidMode) throws SQLException
- Throws:
SQLException
-
getLatestFromAnyClient
public Position getLatestFromAnyClient() throws SQLException
- Throws:
SQLException
-
get
public Position get() throws SQLException
- Throws:
SQLException
-
getRecoveryInfo
public RecoveryInfo getRecoveryInfo(MaxwellConfig config) throws SQLException
- Throws:
SQLException
-
getRecoveryInfo
protected RecoveryInfo getRecoveryInfo(MaxwellConfig config, Connection c) throws SQLException
- Throws:
SQLException
-
getAllRecoveryInfos
protected List<RecoveryInfo> getAllRecoveryInfos() throws SQLException
- Throws:
SQLException
-
getAllRecoveryInfos
protected List<RecoveryInfo> getAllRecoveryInfos(Connection c) throws SQLException
- Throws:
SQLException
-
formatRecoveryFailure
protected List<String> formatRecoveryFailure(MaxwellConfig config, List<RecoveryInfo> recoveries)
-
cleanupOldRecoveryInfos
public void cleanupOldRecoveryInfos() throws SQLException
- Throws:
SQLException
-
-