[framework] TxCore → common-framework (ACM-FW-001)
This commit is contained in:
parent
a31101b71a
commit
a9be4bc4ef
1 changed files with 30 additions and 0 deletions
|
|
@ -0,0 +1,30 @@
|
|||
package com.klaro.acquirecore.framework;
|
||||
|
||||
/**
|
||||
* Transaction configuration DTO. Migrated from txcore.h tx_config_t.
|
||||
*/
|
||||
public class TxConfig {
|
||||
private int timeoutSeconds = 30;
|
||||
private int maxRetries = 3;
|
||||
private boolean autoCommit = false;
|
||||
private String isolationLevel = "READ_COMMITTED";
|
||||
private boolean rollbackOnException = true;
|
||||
|
||||
public TxConfig() {}
|
||||
|
||||
public TxConfig(int timeoutSeconds, int maxRetries) {
|
||||
this.timeoutSeconds = timeoutSeconds;
|
||||
this.maxRetries = maxRetries;
|
||||
}
|
||||
|
||||
public int getTimeoutSeconds() { return timeoutSeconds; }
|
||||
public void setTimeoutSeconds(int timeoutSeconds) { this.timeoutSeconds = timeoutSeconds; }
|
||||
public int getMaxRetries() { return maxRetries; }
|
||||
public void setMaxRetries(int maxRetries) { this.maxRetries = maxRetries; }
|
||||
public boolean isAutoCommit() { return autoCommit; }
|
||||
public void setAutoCommit(boolean autoCommit) { this.autoCommit = autoCommit; }
|
||||
public String getIsolationLevel() { return isolationLevel; }
|
||||
public void setIsolationLevel(String isolationLevel) { this.isolationLevel = isolationLevel; }
|
||||
public boolean isRollbackOnException() { return rollbackOnException; }
|
||||
public void setRollbackOnException(boolean rollbackOnException) { this.rollbackOnException = rollbackOnException; }
|
||||
}
|
||||
Reference in a new issue