public static < V > V doWorkInPoolNicely ( final Pool < Jedis > pool , final PoolWork < Jedis , V > work ) { final V result ; try { result = doWorkInPool ( pool , work ) ; } catch ( RuntimeException re ) { throw re ; } catch ( Exception e ) { throw new RuntimeException ( e ) ; } return result ; }
Perform the given work with a Jedis connection from the given pool . Wraps any thrown checked exceptions in a RuntimeException .