本文整理了Java中org.redisson.config.Config.<init>()
方法的一些代码示例,展示了Config.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Config.<init>()
方法的具体详情如下:
包路径:org.redisson.config.Config
类名称:Config
方法名:<init>
暂无
代码示例来源:origin: zhegexiaohuozi/SeimiCrawler
public SeimiConfig() {
this.redissonConfig = new Config();
}
代码示例来源:origin: redisson/redisson
protected RedissonRx(Config config) {
this.config = config;
Config configCopy = new Config(config);
connectionManager = ConfigSupport.createConnectionManager(configCopy);
commandExecutor = new CommandRxService(connectionManager);
evictionScheduler = new EvictionScheduler(commandExecutor);
}
代码示例来源:origin: redisson/redisson
protected RedissonRx(Config config) {
this.config = config;
Config configCopy = new Config(config);
connectionManager = ConfigSupport.createConnectionManager(configCopy);
commandExecutor = new CommandRxService(connectionManager);
evictionScheduler = new EvictionScheduler(commandExecutor);
}
代码示例来源:origin: redisson/redisson
/**
* Create Reactive Redisson instance with default config
*
* @return Redisson instance
*/
public static RedissonReactiveClient createReactive() {
Config config = new Config();
config.useSingleServer().setAddress("redis://127.0.0.1:6379");
return createReactive(config);
}
代码示例来源:origin: redisson/redisson
protected RedissonReactive(Config config) {
this.config = config;
Config configCopy = new Config(config);
connectionManager = ConfigSupport.createConnectionManager(configCopy);
commandExecutor = new CommandReactiveService(connectionManager);
evictionScheduler = new EvictionScheduler(commandExecutor);
}
代码示例来源:origin: redisson/redisson
protected Redisson(Config config) {
this.config = config;
Config configCopy = new Config(config);
connectionManager = ConfigSupport.createConnectionManager(configCopy);
evictionScheduler = new EvictionScheduler(connectionManager.getCommandExecutor());
}
代码示例来源:origin: redisson/redisson
/**
* Create Reactive Redisson instance with default config
*
* @return Redisson instance
*/
public static RedissonRxClient createRx() {
Config config = new Config();
config.useSingleServer().setAddress("redis://127.0.0.1:6379");
return createRx(config);
}
代码示例来源:origin: redisson/redisson
/**
* Create Reactive Redisson instance with default config
*
* @return Redisson instance
*/
public static RedissonRxClient createRx() {
Config config = new Config();
config.useSingleServer().setAddress("redis://127.0.0.1:6379");
return createRx(config);
}
代码示例来源:origin: redisson/redisson
protected Redisson(Config config) {
this.config = config;
Config configCopy = new Config(config);
connectionManager = ConfigSupport.createConnectionManager(configCopy);
evictionScheduler = new EvictionScheduler(connectionManager.getCommandExecutor());
}
代码示例来源:origin: redisson/redisson
/**
* Create Reactive Redisson instance with default config
*
* @return Redisson instance
*/
public static RedissonReactiveClient createReactive() {
Config config = new Config();
config.useSingleServer().setAddress("redis://127.0.0.1:6379");
return createReactive(config);
}
代码示例来源:origin: redisson/redisson
protected RedissonReactive(Config config) {
this.config = config;
Config configCopy = new Config(config);
connectionManager = ConfigSupport.createConnectionManager(configCopy);
commandExecutor = new CommandReactiveService(connectionManager);
evictionScheduler = new EvictionScheduler(commandExecutor);
}
代码示例来源:origin: redisson/redisson
protected RedissonClient buildClient() throws LifecycleException {
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 {
try {
Config c = new Config(config);
Codec codec = c.getCodec().getClass().getConstructor(ClassLoader.class)
.newInstance(Thread.currentThread().getContextClassLoader());
config.setCodec(codec);
} catch (Exception e) {
throw new IllegalStateException("Unable to initialize codec with ClassLoader parameter", e);
}
return Redisson.create(config);
} catch (Exception e) {
throw new LifecycleException(e);
}
}
代码示例来源:origin: redisson/redisson
/**
* Create sync/async Redisson instance with default config
*
* @return Redisson instance
*/
public static RedissonClient create() {
Config config = new Config();
config.useSingleServer()
.setTimeout(1000000)
.setAddress("redis://127.0.0.1:6379");
// config.useMasterSlaveConnection().setMasterAddress("127.0.0.1:6379").addSlaveAddress("127.0.0.1:6389").addSlaveAddress("127.0.0.1:6399");
// config.useSentinelConnection().setMasterName("mymaster").addSentinelAddress("127.0.0.1:26389", "127.0.0.1:26379");
// config.useClusterServers().addNodeAddress("127.0.0.1:7000");
return create(config);
}
代码示例来源:origin: redisson/redisson
/**
* Create sync/async Redisson instance with default config
*
* @return Redisson instance
*/
public static RedissonClient create() {
Config config = new Config();
config.useSingleServer()
.setTimeout(1000000)
.setAddress("redis://127.0.0.1:6379");
// config.useMasterSlaveConnection().setMasterAddress("127.0.0.1:6379").addSlaveAddress("127.0.0.1:6389").addSlaveAddress("127.0.0.1:6399");
// config.useSentinelConnection().setMasterName("mymaster").addSentinelAddress("127.0.0.1:26389", "127.0.0.1:26379");
// config.useClusterServers().addNodeAddress("127.0.0.1:7000");
return create(config);
}
代码示例来源:origin: redisson/redisson
config = new Config();
config.useSentinelServers()
.setMasterName(redisProperties.getSentinel().getMaster())
config = new Config();
config.useClusterServers()
.addNodeAddress(nodes)
.setPassword(redisProperties.getPassword());
} else {
config = new Config();
String prefix = "redis://";
Method method = ReflectionUtils.findMethod(RedisProperties.class, "isSsl");
代码示例来源:origin: killbill/killbill
@Override
public RedissonClient get() {
// JDK serialization codec for now, but we can do better in speed and space
final Codec codec = new SerializationCodec();
final Config redissonCfg = new Config();
redissonCfg.setCodec(codec)
.useSingleServer()
.setAddress(address)
.setConnectionMinimumIdleSize(connectionMinimumIdleSize);
return Redisson.create(redissonCfg);
}
}
代码示例来源:origin: debop/hibernate-redis
@PostConstruct
public void initialize() {
Config config = new Config();
ElasticacheServersConfig clusterConfig = config.useElasticacheServers();
clusterConfig.setScanInterval(2000);
clusterConfig.addNodeAddress(StringUtils.tokenizeToStringArray(redisNodes, ",", true, true));
config.setCodec(new SnappyCodec());
redisClient = Redisson.create(config);
}
代码示例来源:origin: jiangmin168168/jim-framework
@PostConstruct
public void init() {
Config config = new Config();
config.useSingleServer()
.setAddress(this.host + ":" + this.port)
// .setPassword(this.pass)
.setConnectionPoolSize(10)
.setConnectTimeout(10000)
;
redisson = Redisson.create(config);
}
代码示例来源:origin: org.kill-bill.billing/killbill-util
@Override
public RedissonClient get() {
// JDK serialization codec for now, but we can do better in speed and space
final Codec codec = new SerializationCodec();
final Config redissonCfg = new Config();
redissonCfg.setCodec(codec)
.useSingleServer()
.setAddress(address)
.setConnectionMinimumIdleSize(connectionMinimumIdleSize);
return Redisson.create(redissonCfg);
}
}
代码示例来源:origin: chexagon/redis-session-manager
@Override
protected final RedisSessionClient buildClient() throws ClassNotFoundException, InstantiationException, IllegalAccessException {
Config config = new Config()
.setCodec(new ContextClassloaderSerializationCodec(getContainerClassLoader()))
.setTransportMode(isEpollSupported() ? TransportMode.EPOLL : TransportMode.NIO);
return new RedissonSessionClient(configure(config));
}
内容来源于网络,如有侵权,请联系作者删除!