io.cattle.platform.core.model.Account.getHealthState()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(1.5k)|赞(0)|评价(0)|浏览(158)

本文整理了Java中io.cattle.platform.core.model.Account.getHealthState()方法的一些代码示例,展示了Account.getHealthState()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Account.getHealthState()方法的具体详情如下:
包路径:io.cattle.platform.core.model.Account
类名称:Account
方法名:getHealthState

Account.getHealthState介绍

[英]Getter for cattle.account.health_state.
[中]cattle.account.health_state的Getter。

代码示例

代码示例来源:origin: rancher/cattle

protected void setEnvironmentHealthState(final Account env) {
  if (env == null) {
    return;
  }
  String newHealthState = calculateEnvironmentHealthState(env);
  String currentHealthState = objectManager.reload(env).getHealthState();
  if (!newHealthState.equalsIgnoreCase(currentHealthState)) {
    Map<String, Object> fields = new HashMap<>();
    fields.put(ServiceConstants.FIELD_HEALTH_STATE, newHealthState);
    objectManager.setFields(env, fields);
    publishEvent(env);
  }
}

代码示例来源:origin: rancher/cattle

/**
 * {@inheritDoc}
 */
@Override
public void from(io.cattle.platform.core.model.Account from) {
  setId(from.getId());
  setName(from.getName());
  setKind(from.getKind());
  setUuid(from.getUuid());
  setDescription(from.getDescription());
  setState(from.getState());
  setCreated(from.getCreated());
  setRemoved(from.getRemoved());
  setRemoveTime(from.getRemoveTime());
  setData(from.getData());
  setExternalId(from.getExternalId());
  setExternalIdType(from.getExternalIdType());
  setHealthState(from.getHealthState());
  setProjectTemplateId(from.getProjectTemplateId());
  setDefaultNetworkId(from.getDefaultNetworkId());
  setVersion(from.getVersion());
  setRevision(from.getRevision());
}

相关文章