|
Hibernate example source code file (EhcacheStatsImplTest.java)
The Hibernate EhcacheStatsImplTest.java source codepackage org.hibernate.test.cache; import net.sf.ehcache.CacheManager; import org.hibernate.cache.ehcache.management.impl.EhcacheStatsImpl; import org.hibernate.cache.ehcache.management.impl.EhcacheStatsImpl; import org.junit.BeforeClass; import org.junit.Test; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertThat; /** * @author Alex Snaps */ public class EhcacheStatsImplTest { private static EhcacheStatsImpl stats; @BeforeClass public static void createCache() throws Exception { CacheManager manager = CacheManager.getInstance(); stats = new EhcacheStatsImpl( manager ); } @Test public void testIsRegionCacheOrphanEvictionEnabled() { assertThat( stats.isRegionCacheOrphanEvictionEnabled( "sampleCache1" ), is( false ) ); } @Test public void testGetRegionCacheOrphanEvictionPeriod() { assertThat( stats.getRegionCacheOrphanEvictionPeriod( "sampleCache1" ), is( -1 ) ); } } Other Hibernate examples (source code examples)Here is a short list of links related to this Hibernate EhcacheStatsImplTest.java source code file: |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.