Examples of jmxStatistics()


Examples of org.infinispan.configuration.cache.Configuration.jmxStatistics()

         AdvancedCache cache = region.getCache();
         Configuration cacheCfg = cache.getCacheConfiguration();
         assertEquals(EvictionStrategy.NONE, cacheCfg.eviction().strategy());
         assertEquals(CacheMode.REPL_SYNC, cacheCfg.clustering().cacheMode());
         assertFalse(cacheCfg.storeAsBinary().enabled());
         assertFalse(cacheCfg.jmxStatistics().enabled());
      } finally {
         factory.stop();
      }
   }
View Full Code Here

Examples of org.infinispan.configuration.cache.Configuration.jmxStatistics()

         assertTrue(factory.getDefinedConfigurations().contains("local-query"));
         QueryResultsRegionImpl region = (QueryResultsRegionImpl) factory.buildQueryResultsRegion(query, p);
         AdvancedCache cache = region.getCache();
         Configuration cacheCfg = cache.getCacheConfiguration();
         assertEquals(CacheMode.LOCAL, cacheCfg.clustering().cacheMode());
         assertFalse(cacheCfg.jmxStatistics().enabled());
      } finally {
         factory.stop();
      }
   }
View Full Code Here

Examples of org.infinispan.configuration.cache.ConfigurationBuilder.jmxStatistics()

         String value = replaceProperties(reader.getAttributeValue(i));
         Attribute attribute = Attribute.forName(reader.getAttributeLocalName(i));
         switch (attribute) {
            case ENABLED:
               if (Boolean.parseBoolean(value)) {
                  builder.jmxStatistics().enable();
               } else {
                  builder.jmxStatistics().disable();
               }
               break;
            default:
View Full Code Here

Examples of org.infinispan.configuration.cache.ConfigurationBuilder.jmxStatistics()

         switch (attribute) {
            case ENABLED:
               if (Boolean.parseBoolean(value)) {
                  builder.jmxStatistics().enable();
               } else {
                  builder.jmxStatistics().disable();
               }
               break;
            default:
               throw ParseUtils.unexpectedAttribute(reader, i);
         }
View Full Code Here

Examples of org.infinispan.configuration.cache.ConfigurationBuilder.jmxStatistics()

      }
   }

   private ConfigurationBuilder buildConfiguration() {
      ConfigurationBuilder builder = getDefaultClusteredCacheConfig(CacheMode.DIST_SYNC, false);
      builder.jmxStatistics().enable();
      builder.clustering().hash().numOwners(2).stateTransfer().fetchInMemoryState(false);
      return builder;
   }

   @AfterMethod(alwaysRun = true)
View Full Code Here

Examples of org.infinispan.configuration.cache.ConfigurationBuilder.jmxStatistics()

   private RemoteCacheManager remoteCacheManager;

   @Override
   protected EmbeddedCacheManager createCacheManager() throws Exception {
      ConfigurationBuilder c = getDefaultStandaloneCacheConfig(false);
      c.jmxStatistics().enable();
      return TestCacheManagerFactory.createCacheManager(c);
   }

   @Override
   protected void setup() throws Exception {
View Full Code Here

Examples of org.infinispan.configuration.cache.ConfigurationBuilder.jmxStatistics()

public class InterpreterTest extends SingleCacheManagerTest {

   @Override
   protected EmbeddedCacheManager createCacheManager() throws Exception {
      ConfigurationBuilder c = getDefaultStandaloneCacheConfig(true);
      c.jmxStatistics().enable().dataContainer().invocationBatching().enable();
      return TestCacheManagerFactory.createCacheManager(c);
   }

   private Interpreter getInterpreter() {
      GlobalComponentRegistry gcr = TestingUtil.extractGlobalComponentRegistry(this.cacheManager);
View Full Code Here

Examples of org.infinispan.configuration.cache.ConfigurationBuilder.jmxStatistics()

public class InterpreterTest extends SingleCacheManagerTest {

   @Override
   protected EmbeddedCacheManager createCacheManager() throws Exception {
      ConfigurationBuilder c = getDefaultStandaloneCacheConfig(true);
      c.jmxStatistics().enable().dataContainer().invocationBatching().enable();
      return TestCacheManagerFactory.createCacheManager(c);
   }

   public void testSimple() throws Exception {
      GlobalComponentRegistry gcr = TestingUtil.extractGlobalComponentRegistry(this.cacheManager);
View Full Code Here

Examples of org.infinispan.configuration.cache.ConfigurationBuilder.jmxStatistics()

         // User-defined cache writer will be plugged once cache has started
         cb.persistence().addStore(JCacheWriterAdapterConfigurationBuilder.class);
      }

      if (c.isStatisticsEnabled())
         cb.jmxStatistics().enable();

      return cb.build();
   }
}
View Full Code Here

Examples of org.infinispan.configuration.cache.ConfigurationBuilder.jmxStatistics()

            // org.infinispan:cache-name=myCustomcache(local),jmx-resource=CacheMgmgtInterceptor
            // org.infinispan:cache-name=myCustomcache(local),jmx-resource=MvccLockManager
            // org.infinispan:cache-name=myCustomcache(local),jmx-resource=TxInterceptor

            ConfigurationBuilder configurationBuilder = new ConfigurationBuilder();
            configurationBuilder.jmxStatistics().enable();
            configurationBuilder.eviction().maxEntries(123);
            configurationBuilder.expiration().maxIdle(180000);

            cm.defineConfiguration(MY_CUSTOM_CACHE, configurationBuilder.build());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.