Search in sources :

Example 16 with ExtendedStatisticInterceptor

use of org.infinispan.extendedstats.wrappers.ExtendedStatisticInterceptor in project infinispan by infinispan.

the class LocalExtendedStatisticTest method testClear.

public void testClear() {
    assertEmpty(KEY_1);
    ExtendedStatisticInterceptor statisticInterceptor = getExtendedStatistic(cache);
    cache.put(KEY_1, VALUE_1);
    assertCacheValue(KEY_1, VALUE_1);
    cache.clear();
    assertCacheValue(KEY_1, null);
    assertNoTransactions();
    Assert.assertFalse(statisticInterceptor.getCacheStatisticManager().hasPendingTransactions());
}
Also used : ExtendedStatisticInterceptor(org.infinispan.extendedstats.wrappers.ExtendedStatisticInterceptor)

Example 17 with ExtendedStatisticInterceptor

use of org.infinispan.extendedstats.wrappers.ExtendedStatisticInterceptor in project infinispan by infinispan.

the class LocalExtendedStatisticTest method createCacheManager.

@Override
protected EmbeddedCacheManager createCacheManager() {
    ConfigurationBuilder builder = getDefaultClusteredCacheConfig(CacheMode.LOCAL, true);
    builder.locking().isolationLevel(IsolationLevel.REPEATABLE_READ);
    builder.transaction().recovery().disable();
    builder.customInterceptors().addInterceptor().interceptor(new ExtendedStatisticInterceptor()).position(InterceptorConfiguration.Position.FIRST);
    return TestCacheManagerFactory.createCacheManager(builder);
}
Also used : ConfigurationBuilder(org.infinispan.configuration.cache.ConfigurationBuilder) ExtendedStatisticInterceptor(org.infinispan.extendedstats.wrappers.ExtendedStatisticInterceptor)

Aggregations

ExtendedStatisticInterceptor (org.infinispan.extendedstats.wrappers.ExtendedStatisticInterceptor)17 ConfigurationBuilder (org.infinispan.configuration.cache.ConfigurationBuilder)6 ConcurrentGlobalContainer (org.infinispan.extendedstats.container.ConcurrentGlobalContainer)3 ExtendedStatisticRpcManager (org.infinispan.extendedstats.wrappers.ExtendedStatisticRpcManager)3 RpcManager (org.infinispan.remoting.rpc.RpcManager)3 CacheStatisticCollector (org.infinispan.extendedstats.CacheStatisticCollector)2 CacheStatisticManager (org.infinispan.extendedstats.CacheStatisticManager)2 ExtendedStatisticLockManager (org.infinispan.extendedstats.wrappers.ExtendedStatisticLockManager)2 AsyncInterceptorChain (org.infinispan.interceptors.AsyncInterceptorChain)2 TestingUtil.extractLockManager (org.infinispan.test.TestingUtil.extractLockManager)2 ControlledRpcManager (org.infinispan.util.ControlledRpcManager)2 ReplicatedControlledConsistentHashFactory (org.infinispan.util.ReplicatedControlledConsistentHashFactory)2 WithinThreadExecutor (org.infinispan.util.concurrent.WithinThreadExecutor)2 LockManager (org.infinispan.util.concurrent.locks.LockManager)2 LockContainer (org.infinispan.util.concurrent.locks.impl.LockContainer)2 HashMap (java.util.HashMap)1