Esempio n. 1
0
  private void initInternalPool(ConnectionInfo masterConnectionInfo) {
    JedisFactory factory =
        new JedisFactory(
            masterConnectionInfo.getHost(),
            masterConnectionInfo.getPort(),
            masterConnectionInfo.getTimeout(),
            masterConnectionInfo.getPassword(),
            masterConnectionInfo.getDatabase(),
            masterConnectionInfo.getClientName());

    internalPool = new GenericObjectPool(factory, masterPoolConfig);
  }
Esempio n. 2
0
  public JedisPool(ConnectionInfo connectionInfo, JedisPoolConfig config) {
    this.hostAndPort = connectionInfo.getHostAndPort();

    JedisFactory factory =
        new JedisFactory(
            connectionInfo.getHost(),
            connectionInfo.getPort(),
            connectionInfo.getTimeout(),
            connectionInfo.getPassword(),
            connectionInfo.getDatabase(),
            connectionInfo.getClientName());

    internalPool = new GenericObjectPool(factory, config);
  }