org.redisson.config.Config.toJSON()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(2.0k)|赞(0)|评价(0)|浏览(214)

本文整理了Java中org.redisson.config.Config.toJSON()方法的一些代码示例,展示了Config.toJSON()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Config.toJSON()方法的具体详情如下:
包路径:org.redisson.config.Config
类名称:Config
方法名:toJSON

Config.toJSON介绍

[英]Convert current configuration to JSON format
[中]将当前配置转换为JSON格式

代码示例

代码示例来源:origin: debop/hibernate-redis

@SneakyThrows
public RedisClient(@NonNull RedissonClient redisson, int expiryInSeconds) {
 log.trace("RedisClient created. config={}, expiryInSeconds={}", redisson.getConfig().toJSON(), expiryInSeconds);
 this.redisson = redisson;
 if (expiryInSeconds >= 0) {
  this.expiryInSeconds = expiryInSeconds;
 }
}

代码示例来源:origin: debop/hibernate-redis

@SneakyThrows
public RedisClient(@NonNull RedissonClient redisson, int expiryInSeconds) {
 log.trace("RedisClient created. config={}, expiryInSeconds={}", redisson.getConfig().toJSON(), expiryInSeconds);
 this.redisson = redisson;
 if (expiryInSeconds >= 0) {
  this.expiryInSeconds = expiryInSeconds;
 }
}

代码示例来源:origin: com.github.debop/hibernate-redis

@SneakyThrows
public RedisClient(@NonNull RedissonClient redisson, int expiryInSeconds) {
 log.trace("RedisClient created. config={}, expiryInSeconds={}", redisson.getConfig().toJSON(), expiryInSeconds);
 this.redisson = redisson;
 if (expiryInSeconds >= 0) {
  this.expiryInSeconds = expiryInSeconds;
 }
}

代码示例来源:origin: com.github.jsimone/webapp-runner-redis

File configFile = File.createTempFile("redisson", ".json");
try (BufferedWriter bw = new BufferedWriter(new FileWriter(configFile));) {
 bw.write(config.toJSON());
 RedissonSessionManager redisManager = new RedissonSessionManager();
 redisManager.setConfigPath(configFile.getAbsolutePath());

代码示例来源:origin: jsimone/webapp-runner

File configFile = File.createTempFile("redisson", ".json");
try (BufferedWriter bw = new BufferedWriter(new FileWriter(configFile));) {
 bw.write(config.toJSON());
 RedissonSessionManager redisManager = new RedissonSessionManager();
 redisManager.setConfigPath(configFile.getAbsolutePath());

相关文章