@Test public void matchByIpResolution() throws Exception { assumeTrue(InetAddress.getByName("localhost").getHostAddress().equals("127.0.0.1")); LocalityTier lt1 = new LocalityTier("node", "localhost"); LocalityTier lt2 = new LocalityTier("node", "127.0.0.1"); assertTrue(TieredIdentityUtils.matches(lt1, lt2, true)); assertFalse(TieredIdentityUtils.matches(lt1, lt2, false)); }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof TieredIdentity)) { return false; } TieredIdentity that = (TieredIdentity) o; return mTiers.equals(that.mTiers); }
TieredIdentity implements Serializable { @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof TieredIdentity)) { return false; } TieredIdentity that = (TieredIdentity) o; return mTiers.equals(that.mTiers); } }
TieredIdentity implements Serializable { @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof TieredIdentity)) { return false; } TieredIdentity that = (TieredIdentity) o; return mTiers.equals(that.mTiers); } @JsonCreator  TieredIdentity(@JsonProperty("tiers") List<LocalityTier> tiers); }
TieredIdentity implements Serializable { @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof TieredIdentity)) { return false; } TieredIdentity that = (TieredIdentity) o; return mTiers.equals(that.mTiers); } @JsonCreator  TieredIdentity(@JsonProperty("tiers") List<LocalityTier> tiers); @ApiModelProperty(value = "Tiers included in the tier identity") List<LocalityTier> getTiers(); LocalityTier getTier(int i); boolean topTiersMatch(TieredIdentity other); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); }
TieredIdentity implements Serializable { @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof TieredIdentity)) { return false; } TieredIdentity that = (TieredIdentity) o; return mTiers.equals(that.mTiers); } @JsonCreator  TieredIdentity(@JsonProperty("tiers") List<LocalityTier> tiers); @ApiModelProperty(value = "Tiers included in the tier identity") List<LocalityTier> getTiers(); LocalityTier getTier(int i); boolean topTiersMatch(TieredIdentity other); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }