public abstract class AbstractUndoLogManager extends Object implements UndoLogManager
| 限定符和类型 | 类和说明 |
|---|---|
protected static class |
AbstractUndoLogManager.State |
| 限定符和类型 | 字段和说明 |
|---|---|
protected static String |
DELETE_UNDO_LOG_SQL |
protected static boolean |
ROLLBACK_INFO_COMPRESS_ENABLE |
protected static long |
ROLLBACK_INFO_COMPRESS_THRESHOLD |
protected static CompressorType |
ROLLBACK_INFO_COMPRESS_TYPE |
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,
CompressorType compressorType) |
protected static boolean |
canUndo(int state) |
void |
deleteUndoLog(String xid,
long branchId,
Connection conn)
Delete undo log.
|
void |
flushUndoLogs(ConnectionProxy cp)
Flush undo logs.
|
protected String |
getCheckUndoLogTableExistSql() |
static String |
getCurrentSerializer() |
protected byte[] |
getRollbackInfo(ResultSet rs)
RollbackInfo to bytes
|
boolean |
hasUndoLogTable(Connection conn)
does this resource have undolog table?
|
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 boolean |
needCompress(byte[] undoLogContent)
if the undoLogContent is big enough to be compress
|
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
protected static final boolean ROLLBACK_INFO_COMPRESS_ENABLE
protected static final CompressorType ROLLBACK_INFO_COMPRESS_TYPE
protected static final long ROLLBACK_INFO_COMPRESS_THRESHOLD
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 - xidbranchIds - branch Idconn - connectionSQLException - the sql exceptionprotected static String toBatchDeleteUndoLogSql(int xidSize, int branchIdSize)
protected static void appendInParam(int size,
StringBuilder sqlBuilder)
protected static boolean canUndo(int state)
protected String buildContext(String serializer, CompressorType compressorType)
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 connectionSQLException - SQLExceptionprotected 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 connectionSQLException - SQLExceptionprotected byte[] getRollbackInfo(ResultSet rs) throws SQLException
rs - SQLException - SQLExceptionprotected boolean needCompress(byte[] undoLogContent)
undoLogContent - undoLogContentpublic boolean hasUndoLogTable(Connection conn)
UndoLogManagerhasUndoLogTable 在接口中 UndoLogManagerconn - connection of the resourceprotected String getCheckUndoLogTableExistSql()
Copyright © 2022 Seata. All rights reserved.