Package org.infinispan.configuration.cache

Examples of org.infinispan.configuration.cache.InterceptorConfiguration


            assertEquals(EvictionStrategy.NONE, c.eviction().strategy());
            assertEquals(-1, c.eviction().maxEntries());

            c = cm.getCache("custom-interceptors").getCacheConfiguration();
            List<InterceptorConfiguration> interceptors = c.customInterceptors().interceptors();
            InterceptorConfiguration interceptor = interceptors.get(0);
            assertTrue(interceptor.interceptor() instanceof CustomInterceptor1);
            assertEquals(InvocationContextInterceptor.class, interceptor.after());
            interceptor = interceptors.get(1);
            assertEquals(InvocationContextInterceptor.class, interceptor.before());
            assertTrue(interceptor.interceptor() instanceof CustomInterceptor2);
            interceptor = interceptors.get(2);
            assertTrue(interceptor.interceptor() instanceof CustomInterceptor3);
            assertEquals(1, interceptor.index());
            interceptor = interceptors.get(3);
            assertTrue(interceptor.interceptor() instanceof CustomInterceptor4);
            assertEquals(InterceptorConfiguration.Position.LAST, interceptor.position());
            assertTrue(c.unsafe().unreliableReturnValues());

            c = cm.getCache("write-skew").getCacheConfiguration();
            assertTrue(c.locking().writeSkewCheck());
            assertEquals(IsolationLevel.REPEATABLE_READ, c.locking().isolationLevel());
View Full Code Here


            assertEquals(EvictionStrategy.NONE, c.eviction().strategy());
            assertEquals(-1, c.eviction().maxEntries());

            c = cm.getCache("custom-interceptors").getCacheConfiguration();
            List<InterceptorConfiguration> interceptors = c.customInterceptors().interceptors();
            InterceptorConfiguration interceptor = interceptors.get(0);
            assertTrue(interceptor.interceptor() instanceof CustomInterceptor1);
            assertEquals(InvocationContextInterceptor.class, interceptor.after());
            interceptor = interceptors.get(1);
            assertEquals(InvocationContextInterceptor.class, interceptor.before());
            assertTrue(interceptor.interceptor() instanceof CustomInterceptor2);
            interceptor = interceptors.get(2);
            assertTrue(interceptor.interceptor() instanceof CustomInterceptor3);
            assertEquals(1, interceptor.index());
            interceptor = interceptors.get(3);
            assertTrue(interceptor.interceptor() instanceof CustomInterceptor4);
            assertEquals(InterceptorConfiguration.Position.LAST, interceptor.position());
            assertTrue(c.unsafe().unreliableReturnValues());

            c = cm.getCache("write-skew").getCacheConfiguration();
            assertTrue(c.locking().writeSkewCheck());
            assertEquals(IsolationLevel.REPEATABLE_READ, c.locking().isolationLevel());
View Full Code Here

            assertEquals(EvictionStrategy.NONE, c.eviction().strategy());
            assertEquals(-1, c.eviction().maxEntries());

            c = cm.getCache("custom-interceptors").getCacheConfiguration();
            List<InterceptorConfiguration> interceptors = c.customInterceptors().interceptors();
            InterceptorConfiguration interceptor = interceptors.get(0);
            assertTrue(interceptor.interceptor() instanceof CustomInterceptor1);
            assertEquals(InvocationContextInterceptor.class, interceptor.after());
            interceptor = interceptors.get(1);
            assertEquals(InvocationContextInterceptor.class, interceptor.before());
            assertTrue(interceptor.interceptor() instanceof CustomInterceptor2);
            interceptor = interceptors.get(2);
            assertTrue(interceptor.interceptor() instanceof CustomInterceptor3);
            assertEquals(1, interceptor.index());
            interceptor = interceptors.get(3);
            assertTrue(interceptor.interceptor() instanceof CustomInterceptor4);
            assertEquals(InterceptorConfiguration.Position.LAST, interceptor.position());
            assertTrue(c.unsafe().unreliableReturnValues());

            c = cm.getCache("write-skew").getCacheConfiguration();
            assertTrue(c.locking().writeSkewCheck());
            assertEquals(IsolationLevel.REPEATABLE_READ, c.locking().isolationLevel());
View Full Code Here

TOP

Related Classes of org.infinispan.configuration.cache.InterceptorConfiguration

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.