use of org.apache.jackrabbit.oak.fixture.OakFixture in project jackrabbit-oak by apache.
the class PersistentCacheTest method createRepository.
@Override
protected Repository[] createRepository(RepositoryFixture fixture) throws Exception {
System.setProperty("PersistentCacheStats.rejectedPut", "true");
if (fixture instanceof OakRepositoryFixture) {
OakFixture oakFixture = ((OakRepositoryFixture) fixture).getOakFixture();
if (oakFixture instanceof OakFixture.MongoFixture) {
OakFixture.MongoFixture mongoFixture = (OakFixture.MongoFixture) oakFixture;
DocumentMK.Builder builder = mongoFixture.getBuilder(1);
builder.setStatisticsProvider(statsProvider);
builder.setPersistentCache("target/persistentCache,time," + CACHE_OPTIONS);
dns = builder.getNodeStore();
nodesCache = DocumentNodeStoreHelper.getNodesCache(dns);
Oak[] cluster = mongoFixture.setUpCluster(new DocumentMK.Builder[] { builder }, statsProvider);
return new Repository[] { new Jcr(cluster[0]).createRepository() };
}
}
throw new IllegalArgumentException("Fixture " + fixture + " not supported for this benchmark.");
}
Aggregations