use of org.neo4j.adversaries.pagecache.AdversarialPageCache in project neo4j by neo4j.
the class PageCacheRule method pageCachePostConstruct.
protected void pageCachePostConstruct(PageCacheConfig overriddenConfig) {
if (selectConfig(baseConfig.inconsistentReads, overriddenConfig.inconsistentReads, TRUE)) {
AtomicBoolean controller = selectConfig(baseConfig.nextReadIsInconsistent, overriddenConfig.nextReadIsInconsistent, null);
Adversary adversary = controller != null ? new AtomicBooleanInconsistentReadAdversary(controller) : new RandomInconsistentReadAdversary();
pageCache = new AdversarialPageCache(pageCache, adversary);
}
if (selectConfig(baseConfig.accessChecks, overriddenConfig.accessChecks, false)) {
pageCache = new AccessCheckingPageCache(pageCache);
}
}
Aggregations