public abstract class AbstractRMHandler extends AbstractExceptionHandler implements RMInboundHandler, TransactionMessageHandler
AbstractExceptionHandler.AbstractCallback<T extends AbstractTransactionRequest,S extends AbstractTransactionResponse>, AbstractExceptionHandler.Callback<T extends AbstractTransactionRequest,S extends AbstractTransactionResponse>CONFIG| Constructor and Description |
|---|
AbstractRMHandler() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doBranchCommit(BranchCommitRequest request,
BranchCommitResponse response)
Do branch commit.
|
protected void |
doBranchRollback(BranchRollbackRequest request,
BranchRollbackResponse response)
Do branch rollback.
|
abstract BranchType |
getBranchType() |
protected abstract ResourceManager |
getResourceManager()
get resource manager implement
|
BranchCommitResponse |
handle(BranchCommitRequest request)
Handle branch commit response.
|
BranchRollbackResponse |
handle(BranchRollbackRequest request)
Handle branch rollback response.
|
void |
handle(UndoLogDeleteRequest request)
delete undo log
|
AbstractResultMessage |
onRequest(AbstractMessage request,
RpcContext context)
On a request received.
|
void |
onResponse(AbstractResultMessage response,
RpcContext context)
On a response received.
|
exceptionHandleTemplatepublic BranchCommitResponse handle(BranchCommitRequest request)
RMInboundHandlerhandle in interface RMInboundHandlerrequest - the requestpublic BranchRollbackResponse handle(BranchRollbackRequest request)
RMInboundHandlerhandle in interface RMInboundHandlerrequest - the requestpublic void handle(UndoLogDeleteRequest request)
handle in interface RMInboundHandlerrequest - the requestprotected void doBranchCommit(BranchCommitRequest request, BranchCommitResponse response) throws TransactionException
request - the requestresponse - the responseTransactionException - the transaction exceptionprotected void doBranchRollback(BranchRollbackRequest request, BranchRollbackResponse response) throws TransactionException
request - the requestresponse - the responseTransactionException - the transaction exceptionprotected abstract ResourceManager getResourceManager()
public AbstractResultMessage onRequest(AbstractMessage request, RpcContext context)
TransactionMessageHandleronRequest in interface TransactionMessageHandlerrequest - received request messagecontext - context of the RPCpublic void onResponse(AbstractResultMessage response, RpcContext context)
TransactionMessageHandleronResponse in interface TransactionMessageHandlerresponse - received response messagecontext - context of the RPCpublic abstract BranchType getBranchType()
Copyright © 2023 Seata. All rights reserved.