@Override public Resource getCapability() { if (this.capability != null) { return this.capability; } NodeReportProtoOrBuilder p = viaProto ? proto : builder; if (!p.hasCapability()) { return null; } this.capability = convertFromProtoFormat(p.getCapability()); return this.capability; }
@Override public Resource getUsed() { if (this.used != null) { return this.used; } NodeReportProtoOrBuilder p = viaProto ? proto : builder; if (!p.hasUsed()) { return null; } this.used = convertFromProtoFormat(p.getUsed()); return this.used; }
@Override public NodeId getNodeId() { if (this.nodeId != null) { return this.nodeId; } NodeReportProtoOrBuilder p = viaProto ? proto : builder; if (!p.hasNodeId()) { return null; } this.nodeId = convertFromProtoFormat(p.getNodeId()); return this.nodeId; }
@Override public NodeState getNodeState() { NodeReportProtoOrBuilder p = viaProto ? proto : builder; if (!p.hasNodeState()) { return null; } return ProtoUtils.convertFromProtoFormat(p.getNodeState()); }
private void initNodeLabels() { if (this.labels != null) { return; } NodeReportProtoOrBuilder p = viaProto ? proto : builder; this.labels = new HashSet<String>(); this.labels.addAll(p.getNodeLabelsList()); }
@Override public ResourceUtilization getAggregatedContainersUtilization() { if (this.containersUtilization != null) { return this.containersUtilization; } NodeReportProtoOrBuilder p = viaProto ? proto : builder; if (!p.hasContainersUtilization()) { return null; } this.containersUtilization = convertFromProtoFormat(p .getContainersUtilization()); return this.containersUtilization; }
@Override public ResourceUtilization getNodeUtilization() { if (this.nodeUtilization != null) { return this.nodeUtilization; } NodeReportProtoOrBuilder p = viaProto ? proto : builder; if (!p.hasNodeUtilization()) { return null; } this.nodeUtilization = convertFromProtoFormat(p.getNodeUtilization()); return this.nodeUtilization; }