if (getReadReplicaIdentifiers() != null) sb.append("ReadReplicaIdentifiers: ").append(getReadReplicaIdentifiers()).append(","); if (getDBClusterMembers() != null) sb.append("DBClusterMembers: ").append(getDBClusterMembers()).append(","); if (getVpcSecurityGroups() != null) sb.append("VpcSecurityGroups: ").append(getVpcSecurityGroups()).append(",");
hashCode = prime * hashCode + ((getReplicationSourceIdentifier() == null) ? 0 : getReplicationSourceIdentifier().hashCode()); hashCode = prime * hashCode + ((getReadReplicaIdentifiers() == null) ? 0 : getReadReplicaIdentifiers().hashCode()); hashCode = prime * hashCode + ((getDBClusterMembers() == null) ? 0 : getDBClusterMembers().hashCode()); hashCode = prime * hashCode + ((getVpcSecurityGroups() == null) ? 0 : getVpcSecurityGroups().hashCode()); hashCode = prime * hashCode + ((getHostedZoneId() == null) ? 0 : getHostedZoneId().hashCode());
if (other.getReadReplicaIdentifiers() != null && other.getReadReplicaIdentifiers().equals(this.getReadReplicaIdentifiers()) == false) return false; if (other.getDBClusterMembers() == null ^ this.getDBClusterMembers() == null) return false; if (other.getDBClusterMembers() != null && other.getDBClusterMembers().equals(this.getDBClusterMembers()) == false) return false; if (other.getVpcSecurityGroups() == null ^ this.getVpcSecurityGroups() == null)
public static boolean checkIfMaster(DBInstance instance, DBCluster cluster) { if (instance.getDBClusterIdentifier() == null || cluster == null) { // It's NOT a member of a DB cluster return instance.getReadReplicaSourceDBInstanceIdentifier() == null; } else { // It's a member of a DB cluster for (DBClusterMember member : cluster.getDBClusterMembers()) { if (member.getDBInstanceIdentifier().equals(instance.getDBInstanceIdentifier()) && member.isClusterWriter()) { return true; } } return false; } }
if (getReadReplicaIdentifiers() != null) sb.append("ReadReplicaIdentifiers: ").append(getReadReplicaIdentifiers()).append(","); if (getDBClusterMembers() != null) sb.append("DBClusterMembers: ").append(getDBClusterMembers()).append(","); if (getVpcSecurityGroups() != null) sb.append("VpcSecurityGroups: ").append(getVpcSecurityGroups()).append(",");
log.debug("Found {} DB clusters", clusters.size()); for (DBCluster cluster : clusters) { for (DBClusterMember member : cluster.getDBClusterMembers()) { instanceIdToCluster.put(member.getDBInstanceIdentifier(), cluster);
hashCode = prime * hashCode + ((getReplicationSourceIdentifier() == null) ? 0 : getReplicationSourceIdentifier().hashCode()); hashCode = prime * hashCode + ((getReadReplicaIdentifiers() == null) ? 0 : getReadReplicaIdentifiers().hashCode()); hashCode = prime * hashCode + ((getDBClusterMembers() == null) ? 0 : getDBClusterMembers().hashCode()); hashCode = prime * hashCode + ((getVpcSecurityGroups() == null) ? 0 : getVpcSecurityGroups().hashCode()); hashCode = prime * hashCode + ((getHostedZoneId() == null) ? 0 : getHostedZoneId().hashCode());
if (other.getReadReplicaIdentifiers() != null && other.getReadReplicaIdentifiers().equals(this.getReadReplicaIdentifiers()) == false) return false; if (other.getDBClusterMembers() == null ^ this.getDBClusterMembers() == null) return false; if (other.getDBClusterMembers() != null && other.getDBClusterMembers().equals(this.getDBClusterMembers()) == false) return false; if (other.getVpcSecurityGroups() == null ^ this.getVpcSecurityGroups() == null)