@Override public QueueState getQueueState() { QueueInfoProtoOrBuilder p = viaProto ? proto : builder; if (!p.hasState()) { return null; } return convertFromProtoFormat(p.getState()); }
private void initLocalApplicationsList() { if (this.applicationsList != null) { return; } QueueInfoProtoOrBuilder p = viaProto ? proto : builder; List<ApplicationReportProto> list = p.getApplicationsList(); applicationsList = new ArrayList<ApplicationReport>(); for (ApplicationReportProto a : list) { applicationsList.add(convertFromProtoFormat(a)); } }
private void initLocalChildQueuesList() { if (this.childQueuesList != null) { return; } QueueInfoProtoOrBuilder p = viaProto ? proto : builder; List<QueueInfoProto> list = p.getChildQueuesList(); childQueuesList = new ArrayList<QueueInfo>(); for (QueueInfoProto a : list) { childQueuesList.add(convertFromProtoFormat(a)); } }
private void initNodeLabels() { if (this.accessibleNodeLabels != null) { return; } QueueInfoProtoOrBuilder p = viaProto ? proto : builder; this.accessibleNodeLabels = new HashSet<String>(); this.accessibleNodeLabels.addAll(p.getAccessibleNodeLabelsList()); }
@Override public float getCapacity() { QueueInfoProtoOrBuilder p = viaProto ? proto : builder; return (p.hasCapacity()) ? p.getCapacity() : -1; }
@Override public float getCurrentCapacity() { QueueInfoProtoOrBuilder p = viaProto ? proto : builder; return (p.hasCurrentCapacity()) ? p.getCurrentCapacity() : 0; }
@Override public float getMaximumCapacity() { QueueInfoProtoOrBuilder p = viaProto ? proto : builder; return (p.hasMaximumCapacity()) ? p.getMaximumCapacity() : -1; }
@Override public String getQueueName() { QueueInfoProtoOrBuilder p = viaProto ? proto : builder; return (p.hasQueueName()) ? p.getQueueName() : null; }
@Override public String getDefaultNodeLabelExpression() { QueueInfoProtoOrBuilder p = viaProto ? proto : builder; return (p.hasDefaultNodeLabelExpression()) ? p .getDefaultNodeLabelExpression().trim() : null; }