private String sendInfoCommand(Policy policy, String command) { Node node = cluster.getRandomNode(); Connection conn = node.getConnection(policy.socketTimeout); Info info; try { info = new Info(conn, command); node.putConnection(conn); } catch (RuntimeException re) { node.closeConnection(conn); throw re; } return info.getValue(); }
private String sendInfoCommand(Policy policy, String command) { Node node = cluster.getRandomNode(); Connection conn = node.getConnection(policy.socketTimeout); Info info; try { info = new Info(conn, command); node.putConnection(conn); } catch (RuntimeException re) { node.closeConnection(conn); throw re; } return info.getValue(); }