EnvironmentConfig envConfig = new EnvironmentConfig();
envConfig.setTransactional(true);
envConfig.setAllowCreate(createEnv);
ReplicatedEnvironment repEnv =
new ReplicatedEnvironment(envHome, repConfig, envConfig);
RepNode repNode = RepInternal.getRepImpl(repEnv).getRepNode();
System.err.println("Handle created:" + repEnv +
" Node idling indefinitely...");
try {
while (true) {
System.out.println(new Date() +
" State:" + repEnv.getState() + " " +
" VLSN range:" +
repNode.getVLSNIndex().getRange() +
repNode.dumpState());
Thread.sleep(pollIntervalMs);
}
} catch (InterruptedException e) {
System.err.println("Exiting");
}