code: public static Pool<Jedis> createJedisPool(final Config jesqueConfig, final GenericObjectPoolConfig poolConfig) {
          if (jesqueConfig == null) {
              throw new IllegalArgumentException("jesqueConfig must not be null");
          }
          if (poolConfig == null) {
              throw new IllegalArgumentException("poolConfig must not be null");
          }
          if (jesqueConfig.getMasterName() != null && !"".equals(jesqueConfig.getMasterName()) 
                  && jesqueConfig.getSentinels() != null && jesqueConfig.getSentinels().size() > 0) {
              return new JedisSentinelPool(jesqueConfig.getMasterName(), jesqueConfig.getSentinels(), poolConfig, 
                      jesqueConfig.getTimeout(), jesqueConfig.getPassword(), jesqueConfig.getDatabase());
          } else {
              return new JedisPool(poolConfig, jesqueConfig.getHost(), jesqueConfig.getPort(), 
                      jesqueConfig.getTimeout(), jesqueConfig.getPassword(), jesqueConfig.getDatabase());
          }
      }
docs: A simple helper method that creates a pool of connections to Redis using
  the supplied configurations.
  
  @param jesqueConfig the config used to create the pooled Jedis connections
  @param poolConfig   the config used to create the pool
  @return a configured Pool of Jedis connections