Example #1
0
 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);
   }
 }
Example #2
0
  public boolean isCdbMode() {

    return DbCompat.getInitializeCDB(config);
  }
Example #3
0
 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());
 }