use of com.hazelcast.spi.properties.HazelcastProperties in project hazelcast by hazelcast.
the class WriteBehindQueueTest method createQueueCapacityController.
private static NodeWideUsedCapacityCounter createQueueCapacityController() {
Config config = new Config();
config.setProperty(ClusterProperty.MAP_WRITE_BEHIND_QUEUE_CAPACITY.toString(), "1000");
HazelcastProperties properties = new HazelcastProperties(config);
return new NodeWideUsedCapacityCounter(properties);
}
use of com.hazelcast.spi.properties.HazelcastProperties in project hazelcast by hazelcast.
the class QueryOptimizerFactoryTest method newOptimizer_whenUnknownValue_thenThrowIllegalArgumentException.
@Test(expected = IllegalArgumentException.class)
public void newOptimizer_whenUnknownValue_thenThrowIllegalArgumentException() {
HazelcastProperties hazelcastProperties = createMockHazelcastProperties(QUERY_OPTIMIZER_TYPE, "foo");
QueryOptimizerFactory.newOptimizer(hazelcastProperties);
}
use of com.hazelcast.spi.properties.HazelcastProperties in project hazelcast by hazelcast.
the class QueryOptimizerFactoryTest method newOptimizer_whenPropertyContainsRule_thenCreateRulesBasedOptimizer.
@Test
public void newOptimizer_whenPropertyContainsRule_thenCreateRulesBasedOptimizer() {
HazelcastProperties hazelcastProperties = createMockHazelcastProperties(QUERY_OPTIMIZER_TYPE, "RULES");
QueryOptimizer queryOptimizer = QueryOptimizerFactory.newOptimizer(hazelcastProperties);
assertThat(queryOptimizer, instanceOf(RuleBasedQueryOptimizer.class));
}
use of com.hazelcast.spi.properties.HazelcastProperties in project hazelcast by hazelcast.
the class QueryOptimizerFactoryTest method newOptimizer_whenPropertyContainsNone_thenCreateEmptyOptimizer.
@Test
public void newOptimizer_whenPropertyContainsNone_thenCreateEmptyOptimizer() {
HazelcastProperties hazelcastProperties = createMockHazelcastProperties(QUERY_OPTIMIZER_TYPE, "NONE");
QueryOptimizer queryOptimizer = QueryOptimizerFactory.newOptimizer(hazelcastProperties);
assertThat(queryOptimizer, instanceOf(EmptyOptimizer.class));
}
use of com.hazelcast.spi.properties.HazelcastProperties in project hazelcast by hazelcast.
the class InboundResponseHandlerSupplierTest method newSupplier.
private InboundResponseHandlerSupplier newSupplier(int threadCount) {
Properties props = new Properties();
props.put(ClusterProperty.RESPONSE_THREAD_COUNT.getName(), "" + threadCount);
HazelcastProperties properties = new HazelcastProperties(props);
when(nodeEngine.getProperties()).thenReturn(properties);
return new InboundResponseHandlerSupplier(getClass().getClassLoader(), invocationRegistry, "hz", nodeEngine);
}
Aggregations