Search in sources :

Example 6 with GlobalRollbackResponse

use of io.seata.core.protocol.transaction.GlobalRollbackResponse in project seata by seata.

the class DefaultTransactionManager method rollback.

@Override
public GlobalStatus rollback(String xid) throws TransactionException {
    GlobalRollbackRequest globalRollback = new GlobalRollbackRequest();
    globalRollback.setXid(xid);
    GlobalRollbackResponse response = (GlobalRollbackResponse) syncCall(globalRollback);
    return response.getGlobalStatus();
}
Also used : GlobalRollbackRequest(io.seata.core.protocol.transaction.GlobalRollbackRequest) GlobalRollbackResponse(io.seata.core.protocol.transaction.GlobalRollbackResponse)

Aggregations

GlobalRollbackResponse (io.seata.core.protocol.transaction.GlobalRollbackResponse)6 GlobalRollbackRequest (io.seata.core.protocol.transaction.GlobalRollbackRequest)3 Test (org.junit.jupiter.api.Test)3 StoreException (io.seata.common.exception.StoreException)1 TransactionException (io.seata.core.exception.TransactionException)1 GlobalBeginRequest (io.seata.core.protocol.transaction.GlobalBeginRequest)1 GlobalBeginResponse (io.seata.core.protocol.transaction.GlobalBeginResponse)1 GlobalCommitRequest (io.seata.core.protocol.transaction.GlobalCommitRequest)1 GlobalCommitResponse (io.seata.core.protocol.transaction.GlobalCommitResponse)1 RpcContext (io.seata.core.rpc.RpcContext)1 Measurement (io.seata.metrics.Measurement)1 AbstractGlobalEndResponseProto (io.seata.serializer.protobuf.generated.AbstractGlobalEndResponseProto)1 AbstractTransactionResponseProto (io.seata.serializer.protobuf.generated.AbstractTransactionResponseProto)1 GlobalRollbackResponseProto (io.seata.serializer.protobuf.generated.GlobalRollbackResponseProto)1 MockServerMessageSender (io.seata.server.coordinator.DefaultCoordinatorTest.MockServerMessageSender)1 HashMap (java.util.HashMap)1