// Path: src/main/java/com/officedrop/redis/failover/utils/Action1.java
// public interface Action1<T> {
// 
//     public void apply(T parameter);
// 
// }


import com.officedrop.redis.failover.utils.Action1;
import org.apache.commons.pool.PoolableObjectFactory;
import org.apache.commons.pool.impl.GenericObjectPool;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import redis.clients.jedis.JedisPoolConfig;
import java.util.Arrays;
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
package com.officedrop.redis.failover.jedis;



/**
 * User: Maurício Linhares
 * Date: 1/8/13
 * Time: 4:37 PM
 */
public class CommonsJedisPool implements PoolableObjectFactory, JedisPool {

    private static final Logger log = LoggerFactory.getLogger(CommonsJedisPool.class);

    private final JedisFactory factory;
    private final GenericObjectPool pool;
// Path: src/main/java/com/officedrop/redis/failover/utils/Action1.java
// public interface Action1<T> {
// 
//     public void apply(T parameter);
// 
// }


// Path: src/main/java/com/officedrop/redis/failover/jedis/CommonsJedisPool.java
import com.officedrop.redis.failover.utils.Action1;
import org.apache.commons.pool.PoolableObjectFactory;
import org.apache.commons.pool.impl.GenericObjectPool;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import redis.clients.jedis.JedisPoolConfig;
import java.util.Arrays;
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;

package com.officedrop.redis.failover.jedis;



/**
 * User: Maurício Linhares
 * Date: 1/8/13
 * Time: 4:37 PM
 */
public class CommonsJedisPool implements PoolableObjectFactory, JedisPool {

    private static final Logger log = LoggerFactory.getLogger(CommonsJedisPool.class);

    private final JedisFactory factory;
    private final GenericObjectPool pool;
    private final List<Action1<CommonsJedisPool>> listeners = new CopyOnWriteArrayList<Action1<CommonsJedisPool>>();