本文整理了Java中io.cattle.platform.core.model.Instance.getHealthUpdated()
方法的一些代码示例,展示了Instance.getHealthUpdated()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Instance.getHealthUpdated()
方法的具体详情如下:
包路径:io.cattle.platform.core.model.Instance
类名称:Instance
方法名:getHealthUpdated
[英]Getter for cattle.instance.health_updated
.
[中]cattle.instance.health_updated
的Getter。
代码示例来源:origin: rancher/cattle
protected boolean needToRemove(Instance instance) {
boolean remove = false;
InstanceHealthCheck healthCheck = DataAccessor.field(instance,
InstanceConstants.FIELD_HEALTH_CHECK, jsonMapper, InstanceHealthCheck.class);
if(healthCheck.getStrategy() == Strategy.none) {
return remove;
}
Integer timeout;
if (instance.getHealthState().equalsIgnoreCase(HealthcheckConstants.HEALTH_STATE_INITIALIZING)) {
timeout = healthCheck.getInitializingTimeout();
} else {
timeout = healthCheck.getReinitializingTimeout();
}
if (timeout != null && instance.getHealthUpdated() != null) {
long createdTimeAgo = System.currentTimeMillis() - instance.getHealthUpdated().getTime();
if (createdTimeAgo >= timeout) {
remove = true;
}
}
return remove;
}
代码示例来源:origin: rancher/cattle
setDeploymentUnitUuid(from.getDeploymentUnitUuid());
setVersion(from.getVersion());
setHealthUpdated(from.getHealthUpdated());
setServiceIndexId(from.getServiceIndexId());
setDnsInternal(from.getDnsInternal());
内容来源于网络,如有侵权,请联系作者删除!