use of com.persistit.Persistit in project sonarqube by SonarSource.
the class StoragesManager method initPersistit.
private void initPersistit() {
try {
tempDir = tempFolder.newDir("caches");
persistit = new Persistit();
persistit.setPersistitLogger(new Slf4jAdapter(LoggerFactory.getLogger("PERSISTIT")));
Properties props = new Properties();
props.setProperty("datapath", tempDir.getAbsolutePath());
props.setProperty("logpath", "${datapath}/log");
props.setProperty("logfile", "${logpath}/persistit_${timestamp}.log");
props.setProperty("buffer.count.8192", "10");
props.setProperty("journalpath", "${datapath}/journal");
props.setProperty("tmpvoldir", "${datapath}");
props.setProperty("volume.1", "${datapath}/persistit,create,pageSize:8192,initialPages:10,extensionPages:100,maximumPages:25000");
props.setProperty("jmx", "false");
persistit.setProperties(props);
persistit.initialize();
} catch (Exception e) {
throw new IllegalStateException("Fail to start caches", e);
}
}
use of com.persistit.Persistit in project xodus by JetBrains.
the class JMHPersistItTokyoCabinetBenchmarkBase method createEnvironment.
private void createEnvironment() throws IOException, PersistitException {
closeDb();
temporaryFolder = new TemporaryFolder();
temporaryFolder.create();
persistit = new Persistit();
persistit.setPersistitLogger(new Slf4jAdapter(LoggerFactory.getLogger("PERSISTIT")));
Properties props = new Properties();
props.setProperty("datapath", temporaryFolder.getRoot().getAbsolutePath());
props.setProperty("logpath", "${datapath}/log");
props.setProperty("logfile", "${logpath}/persistit_${timestamp}.log");
props.setProperty("buffer.count.8192", "5000");
props.setProperty("journalpath", "${datapath}/journal");
props.setProperty("tmpvoldir", "${datapath}");
props.setProperty("volume.1", "${datapath}/persistit,create,pageSize:8192,initialPages:10,extensionPages:100,maximumPages:25000");
props.setProperty("jmx", "false");
persistit.setProperties(props);
persistit.initialize();
volume = persistit.createTemporaryVolume();
}
Aggregations