[framework] TxCore → common-framework (ACM-FW-001)
This commit is contained in:
parent
9717bd48d7
commit
ebac6af45d
1 changed files with 18 additions and 0 deletions
|
|
@ -0,0 +1,18 @@
|
||||||
|
package com.klaro.acquirecore.framework;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Interface for transaction-aware services.
|
||||||
|
* Migrated from txcore.h TX_SERVICE callback structure.
|
||||||
|
*/
|
||||||
|
public interface TxService {
|
||||||
|
|
||||||
|
String getServiceName();
|
||||||
|
|
||||||
|
<T> TxResult<T> execute(TxServiceRegistry.TxOperation<T> operation);
|
||||||
|
|
||||||
|
TxContext beginTransaction();
|
||||||
|
|
||||||
|
TxResult<Void> commit(TxContext context);
|
||||||
|
|
||||||
|
TxResult<Void> rollback(TxContext context, String reason);
|
||||||
|
}
|
||||||
Reference in a new issue