Search in sources :

Example 1 with AccessCheckingPageCache

use of org.neo4j.io.pagecache.checking.AccessCheckingPageCache 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);
    }
}
Also used : AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) AccessCheckingPageCache(org.neo4j.io.pagecache.checking.AccessCheckingPageCache) AdversarialPageCache(org.neo4j.adversaries.pagecache.AdversarialPageCache) Adversary(org.neo4j.adversaries.Adversary)

Aggregations

AtomicBoolean (java.util.concurrent.atomic.AtomicBoolean)1 Adversary (org.neo4j.adversaries.Adversary)1 AdversarialPageCache (org.neo4j.adversaries.pagecache.AdversarialPageCache)1 AccessCheckingPageCache (org.neo4j.io.pagecache.checking.AccessCheckingPageCache)1