@Override public BiConsumer<Properties, Tuple2<RedisClusterNode, Properties>> accumulator() { return (properties, tuple) -> { for (Entry<Object, Object> entry : tuple.getT2().entrySet()) { properties.put(tuple.getT1().asString() + "." + entry.getKey(), entry.getValue()); } }; }
@Override public Properties getConfig(String pattern) { Assert.hasText(pattern, "Pattern must not be null or empty!"); List<NodeResult<Map<String, String>>> mapResult = executeCommandOnAllNodes(client -> client.configGet(pattern)) .getResults(); Properties properties = new Properties(); for (NodeResult<Map<String, String>> entry : mapResult) { String prefix = entry.getNode().asString(); entry.getValue().forEach((key, value) -> properties.setProperty(prefix + "." + key, value)); } return properties; }
@Override public Properties info(String section) { Assert.hasText(section, "Section must not be null or empty!"); Properties infos = new Properties(); List<NodeResult<Properties>> nodeResults = executeCommandOnAllNodes( client -> LettuceConverters.toProperties(client.info(section))).getResults(); for (NodeResult<Properties> nodePorperties : nodeResults) { for (Entry<Object, Object> entry : nodePorperties.getValue().entrySet()) { infos.put(nodePorperties.getNode().asString() + "." + entry.getKey(), entry.getValue()); } } return infos; }
@Override public Properties info() { Properties infos = new Properties(); List<NodeResult<Properties>> nodeResults = executeCommandOnAllNodes( client -> LettuceConverters.toProperties(client.info())).getResults(); for (NodeResult<Properties> nodePorperties : nodeResults) { for (Entry<Object, Object> entry : nodePorperties.getValue().entrySet()) { infos.put(nodePorperties.getNode().asString() + "." + entry.getKey(), entry.getValue()); } } return infos; }
@Override public Properties info(String section) { Assert.notNull(section, "Section must not be null!"); Properties infos = new Properties(); List<NodeResult<Properties>> nodeResults = connection.getClusterCommandExecutor() .executeCommandOnAllNodes( (JedisClusterCommandCallback<Properties>) client -> JedisConverters.toProperties(client.info(section))) .getResults(); for (NodeResult<Properties> nodeProperties : nodeResults) { for (Entry<Object, Object> entry : nodeProperties.getValue().entrySet()) { infos.put(nodeProperties.getNode().asString() + "." + entry.getKey(), entry.getValue()); } } return infos; }
@Override public Properties info() { Properties infos = new Properties(); List<NodeResult<Properties>> nodeResults = connection.getClusterCommandExecutor() .executeCommandOnAllNodes( (JedisClusterCommandCallback<Properties>) client -> JedisConverters.toProperties(client.info())) .getResults(); for (NodeResult<Properties> nodeProperties : nodeResults) { for (Entry<Object, Object> entry : nodeProperties.getValue().entrySet()) { infos.put(nodeProperties.getNode().asString() + "." + entry.getKey(), entry.getValue()); } } return infos; }
@Override public Properties getConfig(String pattern) { Assert.notNull(pattern, "Pattern must not be null!"); List<NodeResult<List<String>>> mapResult = connection.getClusterCommandExecutor() .executeCommandOnAllNodes((JedisClusterCommandCallback<List<String>>) client -> client.configGet(pattern)) .getResults(); List<String> result = new ArrayList<>(); for (NodeResult<List<String>> entry : mapResult) { String prefix = entry.getNode().asString(); int i = 0; for (String value : entry.getValue()) { result.add((i++ % 2 == 0 ? (prefix + ".") : "") + value); } } return Converters.toProperties(result); }
@Override public BiConsumer<Properties, Tuple2<RedisClusterNode, Properties>> accumulator() { return (properties, tuple) -> { for (Entry<Object, Object> entry : tuple.getT2().entrySet()) { properties.put(tuple.getT1().asString() + "." + entry.getKey(), entry.getValue()); } }; }
@Override public BiConsumer<Properties, Tuple2<RedisClusterNode, Properties>> accumulator() { return (properties, tuple) -> { for (Entry<Object, Object> entry : tuple.getT2().entrySet()) { properties.put(tuple.getT1().asString() + "." + entry.getKey(), entry.getValue()); } }; }
@Override public Properties getConfig(String pattern) { Assert.hasText(pattern, "Pattern must not be null or empty!"); List<NodeResult<Map<String, String>>> mapResult = executeCommandOnAllNodes(client -> client.configGet(pattern)) .getResults(); Properties properties = new Properties(); for (NodeResult<Map<String, String>> entry : mapResult) { String prefix = entry.getNode().asString(); entry.getValue().forEach((key, value) -> properties.setProperty(prefix + "." + key, value)); } return properties; }
@Override public Properties info(String section) { Assert.hasText(section, "Section must not be null or empty!"); Properties infos = new Properties(); List<NodeResult<Properties>> nodeResults = executeCommandOnAllNodes( client -> LettuceConverters.toProperties(client.info(section))).getResults(); for (NodeResult<Properties> nodePorperties : nodeResults) { for (Entry<Object, Object> entry : nodePorperties.getValue().entrySet()) { infos.put(nodePorperties.getNode().asString() + "." + entry.getKey(), entry.getValue()); } } return infos; }
@Override public Properties info() { Properties infos = new Properties(); List<NodeResult<Properties>> nodeResults = executeCommandOnAllNodes( client -> LettuceConverters.toProperties(client.info())).getResults(); for (NodeResult<Properties> nodePorperties : nodeResults) { for (Entry<Object, Object> entry : nodePorperties.getValue().entrySet()) { infos.put(nodePorperties.getNode().asString() + "." + entry.getKey(), entry.getValue()); } } return infos; }
@Override public Properties info(String section) { Assert.hasText(section, "Section must not be null or empty!"); Properties infos = new Properties(); List<NodeResult<Properties>> nodeResults = executeCommandOnAllNodes( client -> LettuceConverters.toProperties(client.info(section))).getResults(); for (NodeResult<Properties> nodePorperties : nodeResults) { for (Entry<Object, Object> entry : nodePorperties.getValue().entrySet()) { infos.put(nodePorperties.getNode().asString() + "." + entry.getKey(), entry.getValue()); } } return infos; }
@Override public Properties getConfig(String pattern) { Assert.hasText(pattern, "Pattern must not be null or empty!"); List<NodeResult<Map<String, String>>> mapResult = executeCommandOnAllNodes(client -> client.configGet(pattern)) .getResults(); Properties properties = new Properties(); for (NodeResult<Map<String, String>> entry : mapResult) { String prefix = entry.getNode().asString(); entry.getValue().forEach((key, value) -> properties.setProperty(prefix + "." + key, value)); } return properties; }
@Override public Properties info() { Properties infos = new Properties(); List<NodeResult<Properties>> nodeResults = executeCommandOnAllNodes( client -> LettuceConverters.toProperties(client.info())).getResults(); for (NodeResult<Properties> nodePorperties : nodeResults) { for (Entry<Object, Object> entry : nodePorperties.getValue().entrySet()) { infos.put(nodePorperties.getNode().asString() + "." + entry.getKey(), entry.getValue()); } } return infos; }
@Override public Properties info(String section) { Assert.notNull(section, "Section must not be null!"); Properties infos = new Properties(); List<NodeResult<Properties>> nodeResults = connection.getClusterCommandExecutor() .executeCommandOnAllNodes( (JedisClusterCommandCallback<Properties>) client -> JedisConverters.toProperties(client.info(section))) .getResults(); for (NodeResult<Properties> nodeProperties : nodeResults) { for (Entry<Object, Object> entry : nodeProperties.getValue().entrySet()) { infos.put(nodeProperties.getNode().asString() + "." + entry.getKey(), entry.getValue()); } } return infos; }
@Override public Properties info() { Properties infos = new Properties(); List<NodeResult<Properties>> nodeResults = connection.getClusterCommandExecutor() .executeCommandOnAllNodes( (JedisClusterCommandCallback<Properties>) client -> JedisConverters.toProperties(client.info())) .getResults(); for (NodeResult<Properties> nodeProperties : nodeResults) { for (Entry<Object, Object> entry : nodeProperties.getValue().entrySet()) { infos.put(nodeProperties.getNode().asString() + "." + entry.getKey(), entry.getValue()); } } return infos; }