private CurrentTransaction(Environment env) { this.env = env; try { EnvironmentConfig config = env.getConfig(); txnMode = config.getTransactional(); lockingMode = DbCompat.getInitializeLocking(config); if (txnMode || lockingMode) { writeLockMode = LockMode.RMW; } else { writeLockMode = LockMode.DEFAULT; } cdbMode = DbCompat.getInitializeCDB(config); if (cdbMode) { localCdbCursors = new ThreadLocal(); } } catch (DatabaseException e) { throw new RuntimeExceptionWrapper(e); } }
public boolean isCdbMode() { return DbCompat.getInitializeCDB(config); }
void copyConfig(EnvironmentConfig copyToConfig) { DbCompat.setInitializeCache(copyToConfig, DbCompat.getInitializeCache(config)); DbCompat.setInitializeLocking(copyToConfig, DbCompat.getInitializeLocking(config)); DbCompat.setInitializeCDB(copyToConfig, DbCompat.getInitializeCDB(config)); copyToConfig.setTransactional(config.getTransactional()); }