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