Search in sources :

Example 1 with Log

use of org.infinispan.util.logging.Log in project infinispan by infinispan.

the class DistributionTestHelper method assertIsInContainerImmortal.

public static void assertIsInContainerImmortal(Cache<?, ?> cache, Object key) {
    Log log = LogFactory.getLog(BaseDistFunctionalTest.class);
    DataContainer<?, ?> dc = cache.getAdvancedCache().getDataContainer();
    InternalCacheEntry<?, ?> ice = dc.peek(key);
    if (ice == null) {
        String msg = "Entry for key [" + key + "] should be in data container on cache at [" + addressOf(cache) + "]!";
        log.fatal(msg);
        assert false : msg;
    }
    if (!(ice instanceof ImmortalCacheEntry)) {
        String msg = "Entry for key [" + key + "] on cache at [" + addressOf(cache) + "] should be immortal but was [" + ice + "]!";
        log.fatal(msg);
        assert false : msg;
    }
}
Also used : Log(org.infinispan.util.logging.Log) ImmortalCacheEntry(org.infinispan.container.entries.ImmortalCacheEntry)

Example 2 with Log

use of org.infinispan.util.logging.Log in project infinispan by infinispan.

the class DistributionTestHelper method assertIsInL1OrNull.

public static void assertIsInL1OrNull(Cache<?, ?> cache, Object key) {
    Log log = LogFactory.getLog(BaseDistFunctionalTest.class);
    DataContainer<?, ?> dc = cache.getAdvancedCache().getDataContainer();
    InternalCacheEntry<?, ?> ice = dc.peek(key);
    if (ice instanceof ImmortalCacheEntry) {
        String msg = "Entry for key [" + key + "] on cache at [" + addressOf(cache) + "] should be mortal or null but was [" + ice + "]!";
        log.fatal(msg);
        assert false : msg;
    }
}
Also used : Log(org.infinispan.util.logging.Log) ImmortalCacheEntry(org.infinispan.container.entries.ImmortalCacheEntry)

Aggregations

ImmortalCacheEntry (org.infinispan.container.entries.ImmortalCacheEntry)2 Log (org.infinispan.util.logging.Log)2