_partitionName = partitionName;
return this;
}
public HelixConfigScope build() {
HelixConfigScope scope = null;
switch (_type) {
case CLUSTER:
scope = new HelixConfigScope(_type, Arrays.asList(_clusterName, _clusterName), null);
break;
case PARTICIPANT:
if (_participantName == null) {
scope = new HelixConfigScope(_type, Arrays.asList(_clusterName), null);
} else {
scope = new HelixConfigScope(_type, Arrays.asList(_clusterName, _participantName), null);
}
break;
case RESOURCE:
if (_resourceName == null) {
scope = new HelixConfigScope(_type, Arrays.asList(_clusterName), null);
} else {
scope = new HelixConfigScope(_type, Arrays.asList(_clusterName, _resourceName), null);
}
break;
case PARTITION:
if (_partitionName == null) {
scope = new HelixConfigScope(_type, Arrays.asList(_clusterName, _resourceName), null);
} else {
scope =
new HelixConfigScope(_type, Arrays.asList(_clusterName, _resourceName), _partitionName);
}
break;
default:
break;
}