use of org.redisson.config.Config in project redisson by redisson.
the class RedissonCodecTest method testKryo.
@Test
public void testKryo() {
Config config = createConfig();
config.setCodec(kryoCodec);
RedissonClient redisson = Redisson.create(config);
test(redisson);
}
use of org.redisson.config.Config in project redisson by redisson.
the class RedissonCodecTest method testSnappy.
@Test
public void testSnappy() {
Config config = createConfig();
config.setCodec(snappyCodec);
RedissonClient redisson = Redisson.create(config);
test(redisson);
}
use of org.redisson.config.Config in project redisson by redisson.
the class RedissonLocalCachedMapSerializationCodecTest method createConfig.
public static Config createConfig() {
Config config = RedissonLocalCachedMapTest.createConfig();
config.setCodec(new SerializationCodec());
return config;
}
use of org.redisson.config.Config in project redisson by redisson.
the class RedissonBlockingQueueTest method testTakeAsyncCancel.
@Test
public void testTakeAsyncCancel() {
Config config = createConfig();
config.useSingleServer().setConnectionMinimumIdleSize(1).setConnectionPoolSize(1);
RedissonClient redisson = Redisson.create(config);
RBlockingQueue<Integer> queue1 = redisson.getBlockingQueue("testTakeAsyncCancel");
for (int i = 0; i < 10; i++) {
RFuture<Integer> f = queue1.takeAsync();
f.cancel(true);
}
assertThat(queue1.add(1)).isTrue();
assertThat(queue1.add(2)).isTrue();
assertThat(queue1.size()).isEqualTo(2);
redisson.shutdown();
}
use of org.redisson.config.Config in project redisson by redisson.
the class RedissonScheduledExecutorServiceTest method before.
@Before
@Override
public void before() throws IOException, InterruptedException {
super.before();
Config config = createConfig();
RedissonNodeConfig nodeConfig = new RedissonNodeConfig(config);
nodeConfig.setExecutorServiceWorkers(Collections.singletonMap("test", 1));
node = RedissonNode.create(nodeConfig);
node.start();
}
Aggregations