public <V> V execute(RedisCallback<V> cb) {
        Jedis jedis = jedisPool.getResource();
        boolean success = true;
        try {
            return cb.execute(jedis);
        } catch (JedisException e) {
            success = false;
            if (jedis != null) {
                jedisPool.returnBrokenResource(jedis);
            }
            throw e;
        } finally {
            if (success) {
                jedisPool.returnResource(jedis);
            }
        }
    }
public < V > V execute ( RedisCallback < V > cb ) { Jedis jedis = jedisPool . getResource ( ) ; boolean success = true ; try { return cb . execute ( jedis ) ; } catch ( JedisException e ) { success = false ; if ( jedis != null ) { jedisPool . returnBrokenResource ( jedis ) ; } throw e ; } finally { if ( success ) { jedisPool . returnResource ( jedis ) ; } } }
execute a redis operation
@param cb callback
@param <V> return type
@return result