use of org.redisson.config.Config in project redisson by redisson.
the class RedissonCodecTest method testSmile.
@Test
public void testSmile() {
Config config = createConfig();
config.setCodec(smileCodec);
RedissonClient redisson = Redisson.create(config);
test(redisson);
}
use of org.redisson.config.Config in project redisson by redisson.
the class RedissonCodecTest method testFst.
@Test
public void testFst() {
Config config = createConfig();
config.setCodec(fstCodec);
RedissonClient redisson = Redisson.create(config);
test(redisson);
}
use of org.redisson.config.Config in project redisson by redisson.
the class RedissonSessionManager method startInternal.
@Override
protected void startInternal() throws LifecycleException {
super.startInternal();
Config config = null;
try {
config = Config.fromJSON(new File(configPath), getClass().getClassLoader());
} catch (IOException e) {
// trying next format
try {
config = Config.fromYAML(new File(configPath), getClass().getClassLoader());
} catch (IOException e1) {
log.error("Can't parse json config " + configPath, e);
throw new LifecycleException("Can't parse yaml config " + configPath, e1);
}
}
try {
redisson = Redisson.create(config);
} catch (Exception e) {
throw new LifecycleException(e);
}
setState(LifecycleState.STARTING);
}
Aggregations