Package org.infinispan.eviction.impl.MarshalledValuesEvictionTest

Examples of org.infinispan.eviction.impl.MarshalledValuesEvictionTest.MockMarshalledValueInterceptor


      cfg.locking().useLockStriping(false); // to minimise chances of deadlock in the unit test
      cfg.storeAsBinary().enable();
      EmbeddedCacheManager cm = TestCacheManagerFactory.createCacheManager(cfg);
      cache = cm.getCache();
      StreamingMarshaller marshaller = TestingUtil.extractComponent(cache, StreamingMarshaller.class);
      MockMarshalledValueInterceptor interceptor = new MockMarshalledValueInterceptor(marshaller);
      assert TestingUtil.replaceInterceptor(cache, interceptor, MarshalledValueInterceptor.class);
      return cm;
   }
View Full Code Here


      cache.put(p1, p2);
      cache.put(p3, p4);
      cache.evict(p1);

      MockMarshalledValueInterceptor interceptor = (MockMarshalledValueInterceptor) TestingUtil.findInterceptor(cache, MarshalledValueInterceptor.class);
      assert interceptor.marshalledValueCreated;
   }
View Full Code Here

      cache.put("key-isoprene", p1);
      cache.put("key-hexastyle", p2);
      cache.evict("key-isoprene");

      MockMarshalledValueInterceptor interceptor = (MockMarshalledValueInterceptor) TestingUtil.findInterceptor(cache, MarshalledValueInterceptor.class);
      assert !interceptor.marshalledValueCreated;
   }
View Full Code Here

TOP

Related Classes of org.infinispan.eviction.impl.MarshalledValuesEvictionTest.MockMarshalledValueInterceptor

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.