[framework] TxCore → common-framework #4
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