public abstract class AbstractUndoLogManager extends Object implements UndoLogManager
| 限定符和类型 | 类和说明 |
|---|---|
protected static class |
AbstractUndoLogManager.State |
| 限定符和类型 | 字段和说明 |
|---|---|
protected static String |
DELETE_UNDO_LOG_SQL |
protected static String |
SELECT_UNDO_LOG_SQL |
protected static String |
UNDO_LOG_TABLE_NAME |
| 构造器和说明 |
|---|
AbstractUndoLogManager() |
| 限定符和类型 | 方法和说明 |
|---|---|
protected static void |
appendInParam(int size,
StringBuilder sqlBuilder) |
void |
batchDeleteUndoLog(Set<String> xids,
Set<Long> branchIds,
Connection conn)
batch Delete undo log.
|
protected String |
buildContext(String serializer) |
protected static boolean |
canUndo(int state) |
void |
deleteUndoLog(String xid,
long branchId,
Connection conn)
Delete undo log.
|
void |
flushUndoLogs(ConnectionProxy cp)
Flush undo logs.
|
static String |
getCurrentSerializer() |
protected abstract byte[] |
getRollbackInfo(ResultSet rs)
RollbackInfo to bytes
|
protected abstract void |
insertUndoLogWithGlobalFinished(String xid,
long branchId,
UndoLogParser undoLogParser,
Connection conn)
insert uodo log when global finished
|
protected abstract void |
insertUndoLogWithNormal(String xid,
long branchId,
String rollbackCtx,
byte[] undoLogContent,
Connection conn)
insert uodo log when normal
|
protected Map<String,String> |
parseContext(String data) |
static void |
removeCurrentSerializer() |
static void |
setCurrentSerializer(String serializer) |
protected static String |
toBatchDeleteUndoLogSql(int xidSize,
int branchIdSize) |
void |
undo(DataSourceProxy dataSourceProxy,
String xid,
long branchId)
Undo.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdeleteUndoLogByLogCreatedprotected static final String UNDO_LOG_TABLE_NAME
protected static final String SELECT_UNDO_LOG_SQL
protected static final String DELETE_UNDO_LOG_SQL
public static String getCurrentSerializer()
public static void setCurrentSerializer(String serializer)
public static void removeCurrentSerializer()
public void deleteUndoLog(String xid, long branchId, Connection conn) throws SQLException
deleteUndoLog 在接口中 UndoLogManagerxid - the xidbranchId - the branch idconn - the connSQLException - the sql exceptionpublic void batchDeleteUndoLog(Set<String> xids, Set<Long> branchIds, Connection conn) throws SQLException
batchDeleteUndoLog 在接口中 UndoLogManagerxids - branchIds - conn - SQLException - the sql exceptionprotected static String toBatchDeleteUndoLogSql(int xidSize, int branchIdSize)
protected static void appendInParam(int size,
StringBuilder sqlBuilder)
protected static boolean canUndo(int state)
public void flushUndoLogs(ConnectionProxy cp) throws SQLException
flushUndoLogs 在接口中 UndoLogManagercp - the cpSQLException - the sql exceptionpublic void undo(DataSourceProxy dataSourceProxy, String xid, long branchId) throws TransactionException
undo 在接口中 UndoLogManagerdataSourceProxy - the data source proxyxid - the xidbranchId - the branch idTransactionException - the transaction exceptionprotected abstract void insertUndoLogWithGlobalFinished(String xid, long branchId, UndoLogParser undoLogParser, Connection conn) throws SQLException
xid - the xidbranchId - the branchIdundoLogParser - the undoLogParseconn - sql connectionSQLExceptionprotected abstract void insertUndoLogWithNormal(String xid, long branchId, String rollbackCtx, byte[] undoLogContent, Connection conn) throws SQLException
xid - the xidbranchId - the branchIdrollbackCtx - the rollbackContextundoLogContent - the undoLogContentconn - sql connectionSQLExceptionprotected abstract byte[] getRollbackInfo(ResultSet rs) throws SQLException
rs - SQLExceptionCopyright © 2020 Seata. All rights reserved.