示例#1
0
 private EnvironmentConfig makeBasicConfig() {
   EnvironmentConfig ec = new EnvironmentConfig();
   ec.setAllowCreate(true);
   ec.setInitializeCache(true);
   ec.setInitializeLocking(true);
   ec.setInitializeLogging(true);
   ec.setInitializeReplication(true);
   ec.setTransactional(true);
   ec.setReplicationManagerAckPolicy(ReplicationManagerAckPolicy.ALL);
   ec.setRunRecovery(true);
   ec.setThreaded(true);
   if (Boolean.getBoolean("VERB_REPLICATION")) ec.setVerbose(VerboseConfig.REPLICATION, true);
   return (ec);
 }
示例#2
0
 public static EnvironmentConfig makeBasicConfig() {
   EnvironmentConfig ec = new EnvironmentConfig();
   ec.setAllowCreate(true);
   ec.setInitializeCache(true);
   ec.setInitializeLocking(true);
   ec.setInitializeLogging(true);
   ec.setInitializeReplication(true);
   ec.setTransactional(true);
   ec.setThreaded(true);
   ec.setReplicationInMemory(true);
   ec.setCacheSize(256 * 1024 * 1024);
   if (Boolean.getBoolean("VERB_REPLICATION")) ec.setVerbose(VerboseConfig.REPLICATION, true);
   return (ec);
 }
示例#3
0
  @Test
  public void test1() throws DatabaseException, FileNotFoundException {
    EnvironmentConfig envc = new EnvironmentConfig();
    envc.setAllowCreate(true);
    envc.setInitializeCache(true);
    envc.setVerbose(VerboseConfig.DEADLOCK, true);
    envc.setVerbose(VerboseConfig.FILEOPS, true);
    envc.setVerbose(VerboseConfig.FILEOPS_ALL, true);
    envc.setVerbose(VerboseConfig.RECOVERY, true);
    envc.setVerbose(VerboseConfig.REGISTER, true);
    envc.setVerbose(VerboseConfig.REPLICATION, true);
    envc.setVerbose(VerboseConfig.WAITSFOR, true);
    envc.setMessageStream(new FileOutputStream(new File("messages.txt")));
    Environment db_env = new Environment(TestUtils.BASETEST_DBFILE, envc);

    new File("messages.txt").delete();
  }