private Iterator<T> nextPage() { try { currPageIt = pager.next().iterator(); return currPageIt; } catch (ClientException e) { throw e; } catch (Exception e) { throw new ClientException("Failed to retrieve query results", e); } } };
/** * @return host:port_range address lines parsed as {@link InetSocketAddress}. */ private static List<InetSocketAddress> parseAddresses(String[] addrs) throws ClientException { Collection<HostAndPortRange> ranges = new ArrayList<>(addrs.length); for (String a : addrs) { try { ranges.add(HostAndPortRange.parse( a, ClientConnectorConfiguration.DFLT_PORT, ClientConnectorConfiguration.DFLT_PORT + ClientConnectorConfiguration.DFLT_PORT_RANGE, "Failed to parse Ignite server address" )); } catch (IgniteCheckedException e) { throw new ClientException(e); } } return ranges.stream() .flatMap(r -> IntStream .rangeClosed(r.portFrom(), r.portTo()).boxed() .map(p -> new InetSocketAddress(r.host(), p)) ) .collect(Collectors.toList()); }
private Iterator<T> nextPage() { try { currPageIt = pager.next().iterator(); return currPageIt; } catch (ClientException e) { throw e; } catch (Exception e) { throw new ClientException("Failed to retrieve query results", e); } } };
/** * @return host:port_range address lines parsed as {@link InetSocketAddress}. */ private static List<InetSocketAddress> parseAddresses(String[] addrs) throws ClientException { Collection<HostAndPortRange> ranges = new ArrayList<>(addrs.length); for (String a : addrs) { try { ranges.add(HostAndPortRange.parse( a, ClientConnectorConfiguration.DFLT_PORT, ClientConnectorConfiguration.DFLT_PORT + ClientConnectorConfiguration.DFLT_PORT_RANGE, "Failed to parse Ignite server address" )); } catch (IgniteCheckedException e) { throw new ClientException(e); } } return ranges.stream() .flatMap(r -> IntStream .rangeClosed(r.portFrom(), r.portTo()).boxed() .map(p -> new InetSocketAddress(r.host(), p)) ) .collect(Collectors.toList()); }