Search in sources :

Example 1 with WeakCounterConfiguration

use of org.infinispan.counter.configuration.WeakCounterConfiguration in project infinispan by infinispan.

the class ConfigurationTest method assertWeakCounter.

private void assertWeakCounter(CounterManagerConfiguration config) {
    for (AbstractCounterConfiguration counterConfig : config.counters().values()) {
        if (counterConfig.name().equals("weak-5")) {
            assertTrue(counterConfig instanceof WeakCounterConfiguration);
            assertEquals(5, counterConfig.initialValue());
            assertEquals(Storage.VOLATILE, counterConfig.storage());
            assertEquals(10, ((WeakCounterConfiguration) counterConfig).concurrencyLevel());
            return;
        }
    }
    fail();
}
Also used : AbstractCounterConfiguration(org.infinispan.counter.configuration.AbstractCounterConfiguration) WeakCounterConfiguration(org.infinispan.counter.configuration.WeakCounterConfiguration)

Aggregations

AbstractCounterConfiguration (org.infinispan.counter.configuration.AbstractCounterConfiguration)1 WeakCounterConfiguration (org.infinispan.counter.configuration.WeakCounterConfiguration)1