Package org.infinispan.configuration.cache

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


   public void testOverrideLoaders() throws Exception {
      withCacheManager(new CacheManagerCallable(TestCacheManagerFactory.fromXml("configs/named-cache-override-test.xml")) {
         @Override
         public void call() {
            Configuration configuration = cm.getCacheConfiguration(simpleCacheName);
            Assert.assertFalse(configuration.jmxStatistics().enabled());

            Configuration conf = new ConfigurationBuilder().eviction().maxEntries(5).strategy(EvictionStrategy.LRU)
                  .loaders().passivation(true).addFileCacheStore().fsyncInterval(10000)
                  .fsyncMode(FileCacheStoreConfigurationBuilder.FsyncMode.DEFAULT).location(".").build();
View Full Code Here


            // Following should have been taken over from first cache
            Assert.assertEquals(c.expiration().wakeUpInterval(), 23);
            Assert.assertEquals(c.expiration().lifespan(), 50012);
            Assert.assertEquals(c.expiration().maxIdle(), 1341);
            Assert.assertEquals(c.jmxStatistics().enabled(), true);
         }
      });
   }

   /**
 
View Full Code Here

            Assert.assertEquals(c.clustering().l1().lifespan(), 12345);
            Assert.assertEquals(c.clustering().stateTransfer().fetchInMemoryState(), true);
            Assert.assertEquals(c.clustering().async().useReplQueue(), false);
            Assert.assertEquals(c.clustering().async().replQueueInterval(), 105);
            Assert.assertEquals(c.clustering().async().replQueueMaxElements(), 341);
            Assert.assertEquals(c.jmxStatistics().enabled(), true);
            Assert.assertEquals(c.locking().isolationLevel(), IsolationLevel.READ_COMMITTED);
            Assert.assertEquals(c.locking().concurrencyLevel(), 30);
            Assert.assertEquals(c.locking().lockAcquisitionTimeout(), 25000);
            Assert.assertEquals(c.storeAsBinary().enabled(), false);
            Assert.assertEquals(c.expiration().wakeUpInterval(), 23);
View Full Code Here

      try {
      withCacheManager(new CacheManagerCallable(TestCacheManagerFactory.fromXml("configs/named-cache-override-test.xml")) {
         @Override
         public void call() {
            Configuration configuration = cm.getCacheConfiguration(simpleCacheName);
            Assert.assertFalse(configuration.jmxStatistics().enabled());

            Configuration conf = new ConfigurationBuilder().eviction().maxEntries(5).strategy(EvictionStrategy.LRU)
                  .persistence().passivation(true).addSingleFileStore().location(tmpDir + "/testOverrideLoaders").build();

            cm.defineConfiguration(simpleCacheName, conf);
View Full Code Here

            assertEquals(CacheMode.INVALIDATION_ASYNC, c.clustering().cacheMode());
            assertTrue(c.invocationBatching().enabled());
            assertEquals(10, c.clustering().async().replQueueInterval());
            assertEquals(1000, c.clustering().async().replQueueMaxElements());
            assertTrue(c.clustering().async().asyncMarshalling());
            assertTrue(c.jmxStatistics().enabled());
            assertEquals(30500, c.locking().lockAcquisitionTimeout());
            assertEquals(2500, c.locking().concurrencyLevel());
            assertEquals(IsolationLevel.READ_COMMITTED, c.locking().isolationLevel()); // Converted to READ_COMMITTED by builder
            assertTrue(c.locking().useLockStriping());
            assertEquals(TransactionMode.TRANSACTIONAL, c.transaction().transactionMode()); // Non XA
View Full Code Here

            assertEquals(CacheMode.REPL_ASYNC, c.clustering().cacheMode());
            assertTrue(c.invocationBatching().enabled());
            assertEquals(11, c.clustering().async().replQueueInterval());
            assertEquals(1500, c.clustering().async().replQueueMaxElements());
            assertFalse(c.clustering().async().asyncMarshalling());
            assertTrue(c.jmxStatistics().enabled());
            assertEquals(31000, c.locking().lockAcquisitionTimeout());
            assertEquals(3000, c.locking().concurrencyLevel());
            assertEquals(IsolationLevel.REPEATABLE_READ, c.locking().isolationLevel()); // Converted to REPEATABLE_READ by builder
            assertTrue(c.locking().useLockStriping());
            assertEquals(TransactionMode.TRANSACTIONAL, c.transaction().transactionMode()); // Non durable XA
View Full Code Here

            assertEquals(1200000, c.clustering().l1().lifespan());
            assertEquals(4, c.clustering().hash().numOwners());
            assertEquals(35000, c.clustering().sync().replTimeout());
            assertEquals(2, c.clustering().hash().numSegments());
            assertFalse(c.clustering().async().asyncMarshalling());
            assertTrue(c.jmxStatistics().enabled());
            assertEquals(31500, c.locking().lockAcquisitionTimeout());
            assertEquals(3500, c.locking().concurrencyLevel());
            assertEquals(IsolationLevel.READ_COMMITTED, c.locking().isolationLevel());
            assertTrue(c.locking().useLockStriping());
            assertEquals(TransactionMode.TRANSACTIONAL, c.transaction().transactionMode()); // Full XA
View Full Code Here

            assertEquals(ShutdownHookBehavior.DONT_REGISTER, g.shutdown().hookBehavior());

            // Default cache is "local" named cache
            Configuration c = cm.getCache().getCacheConfiguration();
            assertFalse(c.invocationBatching().enabled());
            assertTrue(c.jmxStatistics().enabled());
            assertEquals(CacheMode.LOCAL, c.clustering().cacheMode());
            assertEquals(30000, c.locking().lockAcquisitionTimeout());
            assertEquals(2000, c.locking().concurrencyLevel());
            assertEquals(IsolationLevel.NONE, c.locking().isolationLevel());
            assertTrue(c.locking().useLockStriping());
View Full Code Here

      String queryGroupName = getQueryGroupName(cacheManagerName, cacheName);
      jmxDomain = JmxUtil.buildJmxDomain(globalCfg, mbeanServer, queryGroupName);

      // Register statistics MBean, but only enable if Infinispan config says so
      InfinispanQueryStatisticsInfo stats = new InfinispanQueryStatisticsInfo(sf);
      stats.setStatisticsEnabled(cfg.jmxStatistics().enabled());
      try {
         ObjectName statsObjName = new ObjectName(
               jmxDomain + ":" + queryGroupName + ",component=Statistics");
         JmxUtil.registerMBean(stats, statsObjName, mbeanServer);
      } catch (Exception e) {
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.