private void initPreemptionResourceRequests() { if (resources != null) { return; } PreemptionContractProtoOrBuilder p = viaProto ? proto : builder; List<PreemptionResourceRequestProto> list = p.getResourceList(); resources = new ArrayList<PreemptionResourceRequest>(); for (PreemptionResourceRequestProto rr : list) { resources.add(convertFromProtoFormat(rr)); } }
private void initPreemptionContainers() { if (containers != null) { return; } PreemptionContractProtoOrBuilder p = viaProto ? proto : builder; List<PreemptionContainerProto> list = p.getContainerList(); containers = new HashSet<PreemptionContainer>(); for (PreemptionContainerProto c : list) { containers.add(convertFromProtoFormat(c)); } }