@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getLoadBalancerDescriptions() == null) ? 0 : getLoadBalancerDescriptions().hashCode()); hashCode = prime * hashCode + ((getNextMarker() == null) ? 0 : getNextMarker().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DescribeLoadBalancersResult == false) return false; DescribeLoadBalancersResult other = (DescribeLoadBalancersResult) obj; if (other.getLoadBalancerDescriptions() == null ^ this.getLoadBalancerDescriptions() == null) return false; if (other.getLoadBalancerDescriptions() != null && other.getLoadBalancerDescriptions().equals(this.getLoadBalancerDescriptions()) == false) return false; if (other.getNextMarker() == null ^ this.getNextMarker() == null) return false; if (other.getNextMarker() != null && other.getNextMarker().equals(this.getNextMarker()) == false) return false; return true; }
/** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getLoadBalancerDescriptions() != null) sb.append("LoadBalancerDescriptions: ").append(getLoadBalancerDescriptions()).append(","); if (getNextMarker() != null) sb.append("NextMarker: ").append(getNextMarker()); sb.append("}"); return sb.toString(); }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getLoadBalancerDescriptions() == null) ? 0 : getLoadBalancerDescriptions() .hashCode()); hashCode = prime * hashCode + ((getNextMarker() == null) ? 0 : getNextMarker().hashCode()); return hashCode; }
/** * Returns a string representation of this object; useful for testing and * debugging. * * @return A string representation of this object. * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getLoadBalancerDescriptions() != null) sb.append("LoadBalancerDescriptions: " + getLoadBalancerDescriptions() + ","); if (getNextMarker() != null) sb.append("NextMarker: " + getNextMarker()); sb.append("}"); return sb.toString(); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DescribeLoadBalancersResult == false) return false; DescribeLoadBalancersResult other = (DescribeLoadBalancersResult) obj; if (other.getLoadBalancerDescriptions() == null ^ this.getLoadBalancerDescriptions() == null) return false; if (other.getLoadBalancerDescriptions() != null && other.getLoadBalancerDescriptions().equals(this.getLoadBalancerDescriptions()) == false) return false; if (other.getNextMarker() == null ^ this.getNextMarker() == null) return false; if (other.getNextMarker() != null && other.getNextMarker().equals(this.getNextMarker()) == false) return false; return true; } }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getLoadBalancerDescriptions() == null) ? 0 : getLoadBalancerDescriptions().hashCode()); hashCode = prime * hashCode + ((getNextMarker() == null) ? 0 : getNextMarker().hashCode()); return hashCode; }
/** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getLoadBalancerDescriptions() != null) sb.append("LoadBalancerDescriptions: ").append(getLoadBalancerDescriptions()).append(","); if (getNextMarker() != null) sb.append("NextMarker: ").append(getNextMarker()); sb.append("}"); return sb.toString(); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DescribeLoadBalancersResult == false) return false; DescribeLoadBalancersResult other = (DescribeLoadBalancersResult) obj; if (other.getLoadBalancerDescriptions() == null ^ this.getLoadBalancerDescriptions() == null) return false; if (other.getLoadBalancerDescriptions() != null && other.getLoadBalancerDescriptions().equals(this.getLoadBalancerDescriptions()) == false) return false; if (other.getNextMarker() == null ^ this.getNextMarker() == null) return false; if (other.getNextMarker() != null && other.getNextMarker().equals(this.getNextMarker()) == false) return false; return true; }
/** * Gets the all elbs desc. * * @param elbClient the elb client * @param region the region * @param balancersRequest the balancers request * @return the all elbs desc */ public static List<LoadBalancerDescription> getAllElbsDesc(AmazonElasticLoadBalancing elbClient, Region region, DescribeLoadBalancersRequest balancersRequest) { List<LoadBalancerDescription> loadDescriptionList = new ArrayList<LoadBalancerDescription>(); DescribeLoadBalancersResult balancersResult; String marker; do { balancersResult = elbClient.describeLoadBalancers(balancersRequest); marker = balancersResult.getNextMarker(); balancersRequest.setMarker(marker); loadDescriptionList.addAll(balancersResult.getLoadBalancerDescriptions()); } while (null != marker); return loadDescriptionList; }
marker.ifPresent(request::setMarker); final DescribeLoadBalancersResult result = elbClient.describeLoadBalancers(request); marker = Optional.ofNullable(trimToNull(result.getNextMarker()));
elbDescResult = elbClient.describeLoadBalancers(new DescribeLoadBalancersRequest().withMarker(nextMarker)); elbListTemp.addAll(elbDescResult.getLoadBalancerDescriptions()); nextMarker = elbDescResult.getNextMarker(); }while(nextMarker!=null);
private void forEachElb(Region region, Consumer<LoadBalancerDescription> consumer) { DescribeLoadBalancersRequest request = new DescribeLoadBalancersRequest(); String marker = null; do { rateLimit(); DescribeLoadBalancersResult results = getClient().describeLoadBalancers(request.withMarker(marker)); marker = results.getNextMarker(); results.getLoadBalancerDescriptions().forEach(consumer); writeTagsToNeo4j(results, region, getClient()); request.setMarker(marker); } while (tokenHasNext(marker)); }
public void scanLoadBalancerNames(String... loadBalancerNames) { if (loadBalancerNames == null || loadBalancerNames.length == 0) { return; } DescribeLoadBalancersRequest request = new DescribeLoadBalancersRequest(); request.setLoadBalancerNames(Arrays.asList(loadBalancerNames)); String marker = null; do { rateLimit(); DescribeLoadBalancersResult results = getClient().describeLoadBalancers(request); marker = results.getNextMarker(); results.getLoadBalancerDescriptions().forEach(it -> { projectElb(it, null); }); writeTagsToNeo4j(results, getRegion(), getClient()); request.setMarker(marker); } while (tokenHasNext(marker)); }