本文整理了Java中denominator.model.Zone.id()
方法的一些代码示例,展示了Zone.id()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Zone.id()
方法的具体详情如下:
包路径:denominator.model.Zone
类名称:Zone
方法名:id
[英]The potentially transient and opaque string that uniquely identifies the zone. This may be null when used as an input object.
[中]唯一标识区域的潜在瞬态不透明字符串。当用作输入对象时,该值可能为空。
代码示例来源:origin: com.netflix.denominator/denominator-model
/**
* @deprecated only use {@link #id()} when performing operations against a zone. This will be
* removed in version 5.
*/
@Deprecated
public String idOrName() {
return id() != null ? id() : name();
}
代码示例来源:origin: com.netflix.denominator/denominator-model
@Override
public int hashCode() {
int result = 17;
result = 31 * result + (id() != null ? id().hashCode() : 0);
result = 31 * result + name().hashCode();
result = 31 * result + ttl();
result = 31 * result + email().hashCode();
return result;
}
代码示例来源:origin: com.netflix.denominator/denominator-model
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("Zone [");
if (!name().equals(id())) {
builder.append("id=").append(id()).append(", ");
}
builder.append("name=").append(name());
builder.append(", ").append("ttl=").append(ttl());
builder.append(", ").append("email=").append(email());
builder.append("]");
return builder.toString();
}
代码示例来源:origin: com.netflix.denominator/denominator-model
@Override
public boolean equals(Object obj) {
if (obj instanceof Zone) {
Zone other = (Zone) obj;
return equal(id(), other.id())
&& name().equals(other.name())
&& ttl() == other.ttl()
&& email().equals(other.email());
}
return false;
}
代码示例来源:origin: com.netflix.denominator/denominator-clouddns
/**
* CloudDNS doesn't expose the domain's ttl in the list api.
*/
private Zone zipWithSOA(Zone next) {
Record soa = api.recordsByNameAndType(Integer.parseInt(next.id()), next.name(), "SOA").get(0);
return Zone.create(next.id(), next.name(), soa.ttl, next.email());
}
代码示例来源:origin: com.netflix.denominator/denominator-clouddns
@Override
public String put(Zone zone) {
if (zone.id() != null) {
return updateZone(zone.id(), zone);
}
try {
return awaitComplete(api, api.createDomain(zone.name(), zone.email(), zone.ttl()));
} catch (IllegalStateException e) {
if (e.getMessage().indexOf("already exists") == -1) {
throw e;
}
String id = api.domainsByName(zone.name()).get(0).id();
return updateZone(id, zone);
}
}
内容来源于网络,如有侵权,请联系作者删除!