Search in sources :

Example 1 with BaseMasterSlaveServersConfig

use of org.redisson.config.BaseMasterSlaveServersConfig in project redisson by redisson.

the class MasterSlaveConnectionManager method create.

protected MasterSlaveServersConfig create(BaseMasterSlaveServersConfig<?> cfg) {
    MasterSlaveServersConfig c = new MasterSlaveServersConfig();
    c.setRetryInterval(cfg.getRetryInterval());
    c.setRetryAttempts(cfg.getRetryAttempts());
    c.setTimeout(cfg.getTimeout());
    c.setPingTimeout(cfg.getPingTimeout());
    c.setLoadBalancer(cfg.getLoadBalancer());
    c.setPassword(cfg.getPassword());
    c.setClientName(cfg.getClientName());
    c.setMasterConnectionPoolSize(cfg.getMasterConnectionPoolSize());
    c.setSlaveConnectionPoolSize(cfg.getSlaveConnectionPoolSize());
    c.setSubscriptionConnectionPoolSize(cfg.getSubscriptionConnectionPoolSize());
    c.setSubscriptionsPerConnection(cfg.getSubscriptionsPerConnection());
    c.setConnectTimeout(cfg.getConnectTimeout());
    c.setIdleConnectionTimeout(cfg.getIdleConnectionTimeout());
    c.setFailedAttempts(cfg.getFailedAttempts());
    c.setReconnectionTimeout(cfg.getReconnectionTimeout());
    c.setMasterConnectionMinimumIdleSize(cfg.getMasterConnectionMinimumIdleSize());
    c.setSlaveConnectionMinimumIdleSize(cfg.getSlaveConnectionMinimumIdleSize());
    c.setSubscriptionConnectionMinimumIdleSize(cfg.getSubscriptionConnectionMinimumIdleSize());
    c.setReadMode(cfg.getReadMode());
    c.setSubscriptionMode(cfg.getSubscriptionMode());
    return c;
}
Also used : BaseMasterSlaveServersConfig(org.redisson.config.BaseMasterSlaveServersConfig) MasterSlaveServersConfig(org.redisson.config.MasterSlaveServersConfig)

Example 2 with BaseMasterSlaveServersConfig

use of org.redisson.config.BaseMasterSlaveServersConfig in project redisson by redisson.

the class ReplicatedConnectionManager method create.

@Override
protected MasterSlaveServersConfig create(BaseMasterSlaveServersConfig<?> cfg) {
    MasterSlaveServersConfig res = super.create(cfg);
    res.setDatabase(((ReplicatedServersConfig) cfg).getDatabase());
    return res;
}
Also used : MasterSlaveServersConfig(org.redisson.config.MasterSlaveServersConfig) BaseMasterSlaveServersConfig(org.redisson.config.BaseMasterSlaveServersConfig)

Example 3 with BaseMasterSlaveServersConfig

use of org.redisson.config.BaseMasterSlaveServersConfig in project redisson by redisson.

the class SentinelConnectionManager method create.

@Override
protected MasterSlaveServersConfig create(BaseMasterSlaveServersConfig<?> cfg) {
    MasterSlaveServersConfig res = super.create(cfg);
    res.setDatabase(((SentinelServersConfig) cfg).getDatabase());
    return res;
}
Also used : BaseMasterSlaveServersConfig(org.redisson.config.BaseMasterSlaveServersConfig) MasterSlaveServersConfig(org.redisson.config.MasterSlaveServersConfig)

Aggregations

BaseMasterSlaveServersConfig (org.redisson.config.BaseMasterSlaveServersConfig)3 MasterSlaveServersConfig (org.redisson.config.MasterSlaveServersConfig)3