Package org.infinispan.eviction

Examples of org.infinispan.eviction.ActivationManager


                    PassivationManager manager = cache.getAdvancedCache().getComponentRegistry().getComponent(PassivationManager.class);
                    result.set(manager != null ? manager.getPassivations() : 0);
                    break;
                }
                case ACTIVATIONS: {
                    ActivationManager manager = cache.getAdvancedCache().getComponentRegistry().getComponent(ActivationManager.class);
                    result.set(manager != null ? manager.getActivationCount() : 0);
                    break;
                }
                case CACHE_LOADER_LOADS: {
                    ActivationInterceptor interceptor = getFirstInterceptorWhichExtends(cache.getAdvancedCache()
                            .getInterceptorChain(), ActivationInterceptor.class);
View Full Code Here


                    PassivationManager manager = registry.getComponent(PassivationManager.class);
                    result.set(manager != null ? manager.getPassivations() : 0);
                    break;
                }
                case ACTIVATIONS: {
                    ActivationManager manager = registry.getComponent(ActivationManager.class);
                    result.set(manager != null ? manager.getActivationCount() : 0);
                    break;
                }
                case CACHE_LOADER_LOADS: {
                    ActivationInterceptor interceptor = getFirstInterceptorWhichExtends(interceptors, ActivationInterceptor.class);
                    result.set(interceptor != null ? interceptor.getCacheLoaderLoads() : 0);
View Full Code Here

      EmbeddedCacheManager cm = TestCacheManagerFactory.fromStream(stream);
      try {
         AdvancedCache<Object, Object> cache = cm.getCache().getAdvancedCache();

         DataContainer ddc = DefaultDataContainer.unBoundedDataContainer(cache.getCacheConfiguration().locking().concurrencyLevel());
         ActivationManager activationManager = mock(ActivationManager.class);
         doNothing().when(activationManager).activate(Mockito.anyObject());
         ((DefaultDataContainer) ddc).initialize(null, null,new InternalEntryFactoryImpl(), activationManager, null, TIME_SERVICE);
         QueryableDataContainer.setDelegate(ddc);

         // Verify that the default is correctly established
View Full Code Here

      try {
         AdvancedCache<Object, Object> cache = cm.getCache().getAdvancedCache();

         DataContainer ddc = DefaultDataContainer.unBoundedDataContainer(cache.getCacheConfiguration().locking().concurrencyLevel());
         ActivationManager activationManager = mock(ActivationManager.class);
         doNothing().when(activationManager).activate(Mockito.anyObject());
         ((DefaultDataContainer) ddc).initialize(null, null,new InternalEntryFactoryImpl(), activationManager, null, TIME_SERVICE);
         QueryableDataContainer.setDelegate(ddc);

         // Verify that the config is correct
View Full Code Here

   protected DataContainer createContainer() {
      DefaultDataContainer dc = new DefaultDataContainer<Object, String>(16, AnyEquivalence.getInstance());
      InternalEntryFactoryImpl internalEntryFactory = new InternalEntryFactoryImpl();
      internalEntryFactory.injectTimeService(TIME_SERVICE);
      ActivationManager activationManager = mock(ActivationManager.class);
      doNothing().when(activationManager).activate(Mockito.anyObject());
      dc.initialize(null, null, internalEntryFactory, activationManager, null, TIME_SERVICE);
      return dc;
   }
View Full Code Here

   protected DataContainer createContainer() {
      DefaultDataContainer dc = new DefaultDataContainer<Object, String>(16, AnyEquivalence.getInstance());
      InternalEntryFactoryImpl internalEntryFactory = new InternalEntryFactoryImpl();
      internalEntryFactory.injectTimeService(TIME_SERVICE);
      ActivationManager activationManager = mock(ActivationManager.class);
      doNothing().when(activationManager).onUpdate(Mockito.anyObject(), Mockito.anyBoolean());
      dc.initialize(null, null, internalEntryFactory, activationManager, null, TIME_SERVICE);
      return dc;
   }
View Full Code Here

      EmbeddedCacheManager cm = TestCacheManagerFactory.fromStream(stream);
      try {
         AdvancedCache<Object, Object> cache = cm.getCache().getAdvancedCache();

         DataContainer ddc = DefaultDataContainer.unBoundedDataContainer(cache.getCacheConfiguration().locking().concurrencyLevel());
         ActivationManager activationManager = mock(ActivationManager.class);
         doNothing().when(activationManager).onUpdate(Mockito.anyObject(), Mockito.anyBoolean());
         ((DefaultDataContainer) ddc).initialize(null, null,new InternalEntryFactoryImpl(), activationManager, null, TIME_SERVICE);
         QueryableDataContainer.setDelegate(ddc);

         // Verify that the default is correctly established
View Full Code Here

      try {
         AdvancedCache<Object, Object> cache = cm.getCache().getAdvancedCache();

         DataContainer ddc = DefaultDataContainer.unBoundedDataContainer(cache.getCacheConfiguration().locking().concurrencyLevel());
         ActivationManager activationManager = mock(ActivationManager.class);
         doNothing().when(activationManager).onUpdate(Mockito.anyObject(), Mockito.anyBoolean());
         ((DefaultDataContainer) ddc).initialize(null, null,new InternalEntryFactoryImpl(), activationManager, null, TIME_SERVICE);
         QueryableDataContainer.setDelegate(ddc);

         // Verify that the config is correct
View Full Code Here

TOP

Related Classes of org.infinispan.eviction.ActivationManager

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.